pms-mlx (12-04-01 v0.7)

Download and discuss official beta builds here

Re: pms-mlx <- media library extension (01.10.11 v0.5 [beta]

Postby taconaut » Thu Oct 13, 2011 8:02 am

ExSport wrote:It is possible to filter some words like in MovieInfo plugin? Sometimes my movie names or folders includes something what breaks correct finds on movie pages like genre or audio/source format.

http://sourceforge.net/apps/mediawiki/p ... neral#TMDb

@renszarv
That looks mighty interesting! I'll have to look into the flicklib to see if I want to keep the current idea going. I've defined the interface to collect movie infos as
Code: Select all
public void importMovieInfo(String title, String filePath)

The importer implementation can then decide which of the two parameters it will use. The title is the clean file name (as per the above link), the file path can be used to e.g. create a plugin reading metadata from mkvs or look for an nfo file.
Additionally there is a method importMovieInfoById(String id), that will be used from the library view. E.g. when the info has been badly imported by name, it will be possible to update the stored data by selecting an engine and specifying the ID for this enfine.

What's even more interesting for me is to see how you've done the table in movie-browser. I'd love to get some help with this one if you're good at swingin' ;)
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 955
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

Re: pms-mlx <- media library extension (01.10.11 v0.5 [beta]

Postby renszarv » Thu Oct 13, 2011 10:20 am

taconaut wrote:@renszarv
That looks mighty interesting! I'll have to look into the flicklib to see if I want to keep the current idea going. I've defined the interface to collect movie infos as
Code: Select all
public void importMovieInfo(String title, String filePath)

The importer implementation can then decide which of the two parameters it will use. The title is the clean file name (as per the above link), the file path can be used to e.g. create a plugin reading metadata from mkvs or look for an nfo file.
Additionally there is a method importMovieInfoById(String id), that will be used from the library view. E.g. when the info has been badly imported by name, it will be possible to update the stored data by selecting an engine and specifying the ID for this enfine.

What's even more interesting for me is to see how you've done the table in movie-browser. I'd love to get some help with this one if you're good at swingin' ;)


:-) thanks, but honestly, the most of the UI is not done by me :) I'm only worked on the 'importer wizard', and on the webcrawler, and on the heuristics to guess the correct name. The manual importer was needed, because I've discovered that neither alone me were able to follow the same convention naming the folders, so manual adjusting is needed :) I guess, it will be needed for pms-mlx too ;-)
renszarv
Project Member
 
Posts: 105
Joined: Sun Aug 21, 2011 7:37 pm

Re: pms-mlx <- media library extension (01.10.11 v0.5 [beta]

Postby taconaut » Thu Oct 13, 2011 12:31 pm

Too bad, I usually also feel more comfortable in the hidden business layers hehe
I think the import will be fully automatic (no asking for confirmation and such), but it will be possible to update the data in the library view.
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 955
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

Re: pms-mlx <- media library extension (01.10.11 v0.5 [beta]

Postby taconaut » Wed Oct 19, 2011 8:27 am

Some updates about the upcoming plugin system for configuring the engines used to import additional information about files. The GUI has made good progress; it won't win a beauty contest but is functional. The database part required to to store/restore configurations hasn't been done yet. The interface which will have to be implemented by the plugins has been defined and shouldn't change any more:
Code: Select all
package net.pms.medialibrary.external;

import java.util.List;

import net.pms.medialibrary.commons.enumarations.FileProperty;
import net.pms.medialibrary.commons.enumarations.FileType;

/**
 * Classes implementing this interface and packaged as plugins will be used by
 * pms-mlx to import additional informations about files. A file can be of type
 * video, audio or a picture.
 *
 * @author pw
 *
 */
public interface FileInfoPlugin {

   /**
    * The plugin should import the properties that will be available through
    * getFileProperty and getTags when this method is being called.<br>
    * This method will only be called if a required file type or tag is needed.<br>
    * It's up to the plugin developer to decide if he wants to use the title or
    * the filePath.
    *
    * @param title
    *            the title for which to search. It usually corresponds to the
    *            file name but it might have been modified (cleaned)
    * @param filePath
    *            the absolute path of the file to import
    */
   public void importFile(String title, String filePath);

   /**
    * The plugin should import the properties that will be available through
    * getFileProperty and getTags when this method is being called.<br>
    * This method will only be called if isImportByIdPossible returns true.
    *
    * @param id
    *            the id for which the plugin should search. E.g. the tmdb
    *            plugin will accept the tmdbId, the one for imdb the imdbId
    */
   public void importById(String id);

   /**
    * Tells if it is possible to call importById
    *
    * @return true if it is possible to import file info by id, false otherwise
    */
   public boolean isImportByIdPossible();

   /**
    * Returns a list containing all file properties for which it is possible to
    * call getFileProperty()
    *
    * @return the list of supported file properties
    */
   public List<FileProperty> getSupportedFileProperties();

   /**
    * Returns the value for the file property. A generic object can be
    * returned, but it will be checked in pms-mlx if the correct type has been
    * returned for the FileProperty. TODO: add reference to table describing
    * types If no value could be found, default values should be 0 for
    * numerical types and null otherwise for pms-mlx to successfully detect a
    * failure
    *
    * @param property
    *            The file property for which to get the value
    * @return the value associated with the file property
    */
   public Object getFileProperty(FileProperty property);

   /**
    * Beside the predefined FileProperty, custom tags consisting of a key-value
    * pair can be configured. E.g. key=Artist, value=Jeff Bridges or
    * key=language, value=German
    *
    * @return the list of tag names for which getTags can be called
    */
   public List<String> getSupportedTags();

   /**
    * Returns a list of values for the tag. A key can have multiple values!
    *
    * @param tagName
    *            name of the tag
    * @return list of values for the tag
    */
   public List<String> getTags(String tagName);

   /**
    * The name of the plugin
    *
    * @return plugin name
    */
   public String getName();

   /**
    * Version of the plugin. This number should be increased for every release
    *
    * @return version of the plugin
    */
   public int getVersion();

   /**
    * Returns the list of supported file types (audio, video, picture)
    *
    * @return supported file types
    */
   public List<FileType> getSupportedFileTypes();
}

The FileProperty enumeration isn't available in the repository yet, but this should give you a pretty clear idea of what will be possible to do with the plugins. The tags part wont be implemented right away, as some GUI stuff has to be done first (e.g. allow to add a condition depending on tags). The business logic to handle tags has been fully implemented for quite some time though.

Example plugins will be added when the feature is functional.
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 955
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

Re: pms-mlx <- media library extension (01.10.11 v0.5 [beta]

Postby taconaut » Wed Oct 19, 2011 10:13 am

I'd like to add a watch functionality for managed folders. This way, if a file is being added, renamed, moved or deleted, it will be possible to update the stored information upon detection of the change and it won't be necessary to scan or clean the library manually.
The downside with all this is that this functionality is only available in jdk7 (http://download.oracle.com/javase/tutor ... ation.html) and thus would require the jre7 to be installed on every machine pms-mlx runs. What do you think?
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 955
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

Re: pms-mlx <- media library extension (01.10.11 v0.5 [beta]

Postby squadjot » Wed Oct 19, 2011 11:52 am

jr7 go! :D
User avatar
squadjot
 
Posts: 243
Joined: Thu Mar 25, 2010 10:03 pm

Re: pms-mlx <- media library extension (01.10.11 v0.5 [beta]

Postby killa339 » Thu Oct 20, 2011 1:32 am

Auto detect ability for managed folders is something I've always hoped for. Requiring the latest JRE is a big leap, but the files system API changes I've seen introduced really do make the dev's life easier. It's just a matter of time anyway before it becomes mainstream. I'd say go for it as long as we know other PMS features don't break. And obviously make sure you state it quite clearly that MLX requires the latest java and provide a link to get it. Oracle doesn't make it too obvious where to get it, since it isn't yet considered ready for the general public.

And it sounds like good work being done on the plugin system. Can't wait to test that.
killa339
 
Posts: 35
Joined: Thu Mar 17, 2011 2:46 pm

Re: pms-mlx <- media library extension (01.10.11 v0.5 [beta]

Postby taconaut » Thu Oct 20, 2011 7:27 am

Nice to see I'm not the only one wanting this feature :)
I'll first finish the basics for the file import plugins and release a beta for you guys to test and write some importers, which can be included in the next non-beta release ;) Some gui improvements will remain (e.g. allow to enable/disable importers, make it configurable what tags should be imported by which importer).

I'll try to make two releases, one targettet towards java7 with watch folders and one as it is now. This way we will be able to see if there are side effects with j7 and can also check how the watch behaves (I don't want it to wake up the drives when they're not in use; don't know how it will work with e.g. a NAS, probably changes will be polled at a certain interval; aso)
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 955
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

new beta release

Postby taconaut » Sat Nov 05, 2011 7:59 pm

New beta release for developers. v06b1 adds a plugin system, where other importers then tmdb can be added. Check the wiki page for more information, and the examples for some inspiration :)

I've only tested the import functionalities with the two included plugins, some more testing would probably be good.
You'll find an additional logger fileimport.log containing only entries about scanning; it can be handy to debug file import plugins.
Tags will be added to conditions soon, but for now, they are only visible in the library view when showing the tags column.

:!: Hope to see some nice import plugins :!: :D

[Edit] it's recommended to make a backup of the profile dir as the db gets changed and isn't backwards compatible
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 955
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

Re: pms-mlx <- media library extension (01.10.11 v0.5 [beta]

Postby taconaut » Mon Nov 07, 2011 9:48 am

I've added an importer for imdb. It uses http://imdbapi.com (thanks for the tip chocolateboy), but it can be painfully slow

Download IMDB importer
If you always wanted to have your most recent videos at the top of the folder in the ps3 or wished you could group all videos with the same genre in one folder, have a look at pms-mlx
taconaut
Project Member
 
Posts: 955
Joined: Sat Apr 11, 2009 12:29 am
Location: Switzerland

PreviousNext

Return to Beta Builds

Who is online

Users browsing this forum: No registered users and 6 guests