Implementing support for local fanart (1 Viewer)

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,397
    6,966
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #1
    MP2 already supports online sources to download information about movies and series, along with fanart images.

    We also have a MedadataExtractor ("MDE") plugin (https://forum.team-mediaportal.com/threads/nfo-metadata-extractor-plugin.110673/) to read .nfo files. This is used to fill in movie details, like full name, year, cast, rating a.s.o.
    But fanart is missing in this support. Here's a good quote (german post) why we should support local fanart:
    Punkt 3 Die Scrapper. Grundsätzlich funktionieren die Srapper ja. Aber bei solch großen Sammlungen wie Meiner ist es unumgänglich, auch Offline- Datenquellen nutzen zu können. Ich habe ca 6 GB Fanart allein für TV Serien. Die kann ich nicht andauernd wieder neu aus dem Netz laden. Mein Internet Zugang ist auf 5 GB pro Monat mit vollem (UMTS) Tempo begrenzt, da sind 6 GB Fanart Arbeit für mehrere Monate... Ich denke, hier kann man "schamlos" bei XBMC "abkupfern" und dabei das Ganze natürlich noch mal viel besser machen. ;) Die Scrapper für die Meta Daten sollten zuerst nach Metatags in den Dateien schauen. (das geht aktuell ja schon, sogar bei Videos und ist z.Z. ein echtes Highlight und Alleinstellungsmerkmal). Sind diese nicht vorhanden (z.B. weil es sich nicht um MKV Videos handelt), so sollte als nächstes nach lokalen und XBMC/Ember kompatiblen .nfo Dateien geschaut werden. Und erst dann, also wenn sonst gar nichts geht, werden Online Daten abgerufen. Ich kann gerne diverse entsprechende .nfo Dateien (auch für Serien) zur Verfügung stellen. Bei Fanart (Background, Cover, Poster, Banner, Thumbnails,...) sollte auch zuerst lokal nach Dateien geschaut werden, bevor diese Online geladen werden.
    How does MP2 deal with fanart?

    Import:
    • MDEs are running in specific order: "low level" to detect video files, "extended" to read external local content (like .nfo, .xml) and "online" which downloads content
    • MDEs detect movies and series and download information from internet. The result is stored in local cache.
    • The matching of original title <-> online resource is also stored locally and will be used for identifying the associated fanart to given movie name later
    Storage:
    • Retrieved content is stored inside so called MediaAspects (MovieAspect, SeriesAspect). It also contains info like IMDBID
    Fanart in MP2-Client GUI:
    The fanart image is retrieved via http from MP2-Server. The full chain is like this:

    [Style] -> [FanartImageSource] -> http -> [FanartService] -> [IFanartProvider] -> local storage (library cache)

    There are already multiple IFanartProviders registered (series, movies, TV channel logos), all implement the interface: https://github.com/MediaPortal/Medi...tService.Interfaces/IFanArtService.cs#L53-L71

    To add support for local fanart storage, a new IFanartProvider must be developed that is able to lookup correct results from local filesystem.

    Current implementation has a problem with this approach: the fanart is only loaded by "Name". So we probably need to extent this interface to pass other information, like MediaItem's GUID, which can be used to look into MediaLibrary for real local filesystem path and than check for associated fanart.

    @hafblade, would you like to continue your work on https://forum.team-mediaportal.com/threads/nfo-metadata-extractor-plugin.110673/ and extend it with "local fanart" support? I think @Lehmden can provide help and probably a good testing playground for this feature ;)

    I'm ready to extend/change fanart retrieval to use more detailed parameters then the plain "Name" only.

    What do you think about this idea?
    :)
     
    Last edited:

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,130
    1,630
    Dresden / Munich / Maastricht
    Germany Germany
    I already talked with hafblade about the NFO MDEs. Since this NFO files are widely used I would like to have the MDEs for reading them within the official MP2 installation.

    Extending the FanartService with a new provider from the nfo-MDE is a great idea. This prevents copying the images from the folder of the media file to MP2 internal fanart storage (ProgramData directory).
    But there is something we need to keep in mind:
    In the case the drive is not available, i.e. it's USB drive, you can still browse the database within MP2, but you won't get any artwork.
    If the nfo MDE copies the fanarts from the media files directory to the MP2 internal fanart storage, you can browse you media including artwork even if the file to the media itself it not available anymore.

    hafblade is going to create a fork of MP2 asap and commits the NFO MDE code there, so we can develop and review together.
    Before continue coding on the NFO feature, I would like to document specification first in the wiki, so we have a clear definition how the NFO MDE should work.
    Here we need support by the people using the NFO files to store their metadata and also store the images like fanarts and posters next to the media files.

    Within the wiki we have several pages for the meta data of various aspects:
    http://wiki.team-mediaportal.com/2_...ncepts/Metadata_system/1_MediaAspects/3_Video
    http://wiki.team-mediaportal.com/2_...ncepts/Metadata_system/1_MediaAspects/4_Movie
    http://wiki.team-mediaportal.com/2_...cepts/Metadata_system/1_MediaAspects/5_Series
    The column "NFO file" should be filled with xml element used in NFO files.

    Additional information about the specification should be added to
    http://wiki.team-mediaportal.com/2_...ment/3_Concepts/Metadata_system/NfoFileFormat
    including examples on sub-pages, similar to the MatroskaTags section:
    http://wiki.team-mediaportal.com/2_...pment/3_Concepts/Metadata_system/MatroskaTags

    @Lehmden
    Could you give us support with this, please?
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,082
    3,685
    Lehmden
    Germany Germany
    Country flag
    Hi.
    Good to read this, thanks.
    I will try to translate the quoted post for all who can't read german...
    3. Scrapper. In general the scrappers are working. But if you have such a big collection like mine it's necessary to use local sources also. I've got 6 GB of Fanart for TV Series only. This amount I can't download over and over again. My Internet connection is limited to 5 GB per Month, so 6 GB Fanart will last some month to complete...
    We should have a look and "borrow" some ideas and suggestions from XBMC without being ashamed. But we will make it even better...;) First the scrapper should look if there's any Metatags available. This is working already not only for music but also for Matroska Video files. This is a real highlight and unique feature up to now. If there are no Metatags (e.g. because the Video isn't a mkv) the scrapper should look after local and XBMC/Ember compatible .nfo files to get the Metadata from. And finally, if all this fails then (and only then) do an online lookup. For Fanart this should be similar. First have a look inside Metatags (mp3 often have covers inside ID3 Tags), then look after local available artwork and if there is nothing finally try to download the artwork from online sources.
    As it comes to movies we definitely should use the .nfo Files generated from "MovPicNfo" Tool but on series there is nothing like that as MPTVSeries did not support any local data source at all. Here we really should use those files generated by XBMC as it's not necessary to reinvent the wheel over and over again. For me, I finally have managed to remux all my 15.000 series episodes to mkv and have them tagged properly with Chefkoch's MKVTagger. So personally I'm not in a need for .nfo support in series but I'm sure lots of other didn't have all episodes in MKV containers. I can provide various .nfo files generated by both, MovPicNfo and XBMC including name schemes, path- structures,... to get this fully working. Being compatible as long as it comes to the "other" solutions will make it more easy for people to change over to MP2 as all the hours they spend to get their databases in a good shape are "conserved" for the future (means MP2)...

    I think @Lehmden can provide help and probably a good testing playground for this feature ;)
    I'm happy to help on this...

    BTW... Is it possible to write a "translation" tool to get all data from Moving Pictures (MyFilms, MyVideos) and TVSeries Database directly into MP2 Database??? This can speedup the migration process a lot, if it's possible. I imagine to start this tool, wait until it's ready and after that all Data I have inside Moving Pictures and TVSeries are inside MP2 Datatbase...
     

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,130
    1,630
    Dresden / Munich / Maastricht
    Germany Germany
    BTW... Is it possible to write a "translation" tool to get all data from Moving Pictures (MyFilms, MyVideos) and TVSeries Database directly into MP2 Database??? This can speedup the migration process a lot, if it's possible. I imagine to start this tool, wait until it's ready and after that all Data I have inside Moving Pictures and TVSeries are inside MP2 Datatbase...
    It is possible, but this definitely won't be included in MP2 itself.
    I also expect that we won't write it, it needs to be done by someone else, but like you said, I already wrote the MkvTagger, which already reads MPTVSeries and writes Matroska tags to Mkv files or as XML files next to the media files. I won't be able to extend this tool within the next weeks/months, so everybody is free to fork it and provide patches, supporting MovingPictures, MyFilms or MyVideos as datasource and exporting the meta data besides Matroska tags to NFO files as well.
    If nobody comes up with something, I will take a look at it during autumn.

    OFC. I'm happy to...
    (y) Cool, if you have any questions about the structure or formatting within the wiki, feel free to create a new thread about the "Documentation of NFO file specification" within the MP2 general forums.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,082
    3,685
    Lehmden
    Germany Germany
    Country flag
    Hi.
    Here are some examples for nfo files, local artwork and naming schemes. Series are compatible with XBMC, Movies are compatible with MyVideos, Moving Pictures and XBMC. The MKV inside are dummies, but the rest is the real stuff.
     

    Attachments

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Canada Canada
    While I totally agree with Lehmden's original post/point about accessing local fanart, I think it is equally important to establish a standard for all plugins to use.
    One of the things that drives me crazy in MP1 is every plugin downloading the same fanart images over and over ;)
    think about OnlineVideos Trailers, Showtimes, Trakt, MovPics vs Videos vs MyFilms (god help you if you want to switch - it ends up easier to redownload 6GB than to restructure the fanart folders and names!), TVSeries, mvCentral aso.

    The same applies to all images/artwork like covers/posters, artist images, album covers, even channel logos (especially for radio which every plugin downloads over and over again).

    Basically all images should be stored consistently and in a way that every plugin can use, which I would assume makes it easier for plugin devs to add support. And then easier to also add the artwork for media aspects to TV ;) which looks like a below the poverty line country cousin in MP1 without movie covers, TV Series posters/covers fanart, etc. :p

    I just wanted to mention it so you can keep that in mind morpheus_xx while extending/changing fanart retrieval to use more detailed parameters then the plain "Name" only and implementing fanart in NFO.

    This could also help users convert all their MP1 fanart/images - as chefkoch states, it is beyond the scope of MP2 to provide that as part of the core. However there are many good file renamer packages around that I could use to copy/move all my images to MP2 IF I new the standards for filepaths/names. So if we come up with something, and test it, we can simply add a tutorial to Wiki (not everything has to be done in code ;))
     
    Last edited:

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    B [Finished] [MP2-817] Implement NotifyOnSourceUpdated and NotifyOnTargetUpdated binding events MediaPortal 2 3
    JJDoherty Designing & implementing a new skin... Skins and Design 8
    C Is there an ideot save how-to implement madVR incl. HDR? Codecs, External Players 1
    CyberSimian Support for control.isvisible() in expressions MediaPortal 1 8
    morpheus_xx [WiP] OnlineVideos: New browser based playback support using WebDriver, new Amazon siteutil MediaPortal 2 6
    M 2nd (Touch-)Display Support on MediaPortal 2 such MPDisplay++? General 2
    J Support waipu TV TV-Server 0
    doskabouter WebDAV support OnlineVideos 0
    K Multichannel audio and subtitles for TV not properly supported General Support 4
    CyberSimian Support pack for Ortek VRC-1100 and Hama 00052451 Remotes 6
    cbr954rr [Finished] [MP2-801] Support for tag image extraction Archive 7
    catavolt [solved] FanartHandler - Skin - Holiday and Spotlight support Fanart Handler 9
    C Drive Type is not supported by system Allgemeines Support- und Diskussionsforum 3
    raffe [solved] Export tool and import support from MP-TVSeries & Moving Pictures to MP2 General 22
    morpheus_xx General Testing TVE 3.5 Sat>IP support (MP2 only) TV Engine 47
    E M3U Playlist and EPG Support/Configuration Installation, configuration support 1
    G Mediaportal2 supported formats General 1
    M [solved] Stub Support General 11
    morpheus_xx [WiP] Adding 64 bit support to MP2 MediaPortal 2 15
    A Mediaportal 1.20 support MediaPortal 1 Talk 3
    Lehmden FTP and WebDAV support. MediaPortal 2 0
    MClements13 TV CARD NOT SUPPORTED General 0
    D "attempt to index local `zf' (a nil value)" General Support 0
    S TV server -. trying to rescan for a local channel Installation, configuration support 0
    Lehmden [Videos] More filename possibility for MyVideos local fanart. Improvement Suggestions 26
    Similar threads

























    Top Bottom