1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[New Plugin] MyMovies

Discussion in 'MediaPortal 1 Plugins' started by sixgun, March 2, 2013.

  1. sixgun
    • Premium Supporter

    sixgun MP Donator

    Joined:
    March 31, 2008
    Messages:
    80
    Likes Received:
    12
    Occupation:
    Software Developer
    Ratings:
    +12 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Hello,

    For the last 3 weeks I have been busy working on a new plugin. Firstly, I'll give a little background to try and explain why I'm doing it. I have a multi-seat setup with a DroboFS storing all my movies/pictures/music and a HP MicroServer running the TV Server. I have 4 client PCs each of which has MP-TVSeries and MovingPictures plugins installed. I recently built a new client PC and started to get a bit frustrated when the Moving Pictures plugin took a couple of hours to download all the images and movie information. I just kept thinking "But I've done this 4 times already" !! So, what I've come up with is a system with 2 parts.

    The first part is a windows service which monitors a list of folders and will use the api at themoviedb.org to pull down the information about each movie it finds. I name all my movies with the IMDB ID embedded in the file name within square brackets, for example ...
    The service will only get the information for movies with the IMDB ID in the file name. I've done this because it take any ambiguity away, and I've done it that way for some time with Moving Pictures, as it gets a 100% success rate with the files like that. The backdrop and poster images are also downloaded by the service and stored in a central location, a share on my DroboFS. Only 3 images are downloaded of each type (posters/backdrops) and it will try and get images in the preferred language (themoviedg.org api has that feature now). For 329 movies I have 891MB used in my share. The service only download the images in the original resolution. I guess I could save space/bandwidth by limiting it to a lower resolution. The movie information is stored in RavenDB. The service will also grab the video/audio/text stream information at the same time (using MediaInfo.dll).

    The second part is a MediaPortal plugin which connects to RavenDB. All the path names for the images are also stored in RavenDB, so the plugin just uses the centrally stored images. On the PC I am developing this plugin on, it takes about a second to load 329 movies. Obviously there is occasionally a slight delay in getting the images from the network share, but it's generally well under a second. The plugin configuration (apart from the RavenDB connection string) is also stored in RavenDB. So any changes are reflected in all instances of the plugin.

    It's still early days but it is in a usable state as it stands. I have a seemingly ever growing list of features I want to add, but I'm using trello to split them into essential and future stuff. I'm only supporting the detailed list view currently. If there is any/enough interest I could be persuaded to extend that. I've written this thing for purely selfish reasons, I wanted a consistent setup across all my client PCs and I didn't want to waste space/time on each PC storing/downloading the same information over and over again. As I've got it now it does pretty much everything I use Moving Pictures for but I can spin up a new client PC in about 20 minutes (that included windows install) with virtually zero config for my movies. If I do release this then it'll be open source, as that's a condition of using RavenDB for free. It's currently in a private mercurial repository on BitBucket.





    PS - I didn't realise until I came to write this message that there is something else called MyMovies. So suggestions on a postcard for a better name. MyMovies is a lot better than what I called it originally, believe me!!
     
    Last edited: March 2, 2013
    • Like Like x 4
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Guzzi
    • Team MediaPortal

    Guzzi Retired Team Member

    Joined:
    August 20, 2007
    Messages:
    2,159
    Likes Received:
    704
    Ratings:
    +921 / 0
    Why don't you just add this feature to Moving Pictures? There was already a patch existing for MoPi using e.g. MSSQL as central data backend - that could be used as a base - then splitting the necessary parts for a central service (data grabbing) and using the existing frontend for browsing (saving a lot of work to create a new frontend).
    From my own experience I can tell you, you'll have to add much more stuff to be able to properly use such approach (all artwork on remote storage), if you want to keep the system performing well.
    Alternatively you might want to help in MP2 development - that is natively using client-server-approach in the core system for movies - that's probably closest to what you're after?
     
    • Like Like x 2
  4. sixgun
    • Premium Supporter

    sixgun MP Donator

    Joined:
    March 31, 2008
    Messages:
    80
    Likes Received:
    12
    Occupation:
    Software Developer
    Ratings:
    +12 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    I did discuss my ideas about a year ago with fforde but the idea of a seperate service to handle the gathering of movie info wasn't readily accepted. At least that's how I remember it! I really didn't want to have a master instance of the MoPi plugin as was suggested. So I've stuck to my guns and written a service. RavenDB was something I wanted to get to grips with and it seemed like a perfect fit for my needs.

    As I said before I currently have 329 movies and the system is just as responsive as MoPi. All the movie information is stored in memory when the plugin loads so that updates instantly, there is a very small delay while the artwork loads, but I get that in MoPi too.

    Helping out with MP2 development might be interesting though :)

    I do have a few spare PCs not being used for anything right now so I could have a play with MP2. I'll have a look at that next week.
     
  5. Edalex
    • Premium Supporter

    Edalex Community Plugin Dev

    Joined:
    January 3, 2008
    Messages:
    2,531
    Likes Received:
    584
    Gender:
    Male
    Location:
    Saratov
    Ratings:
    +975 / 9
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    I think you should just spend more time persuading him. :D:D
    I did it once about accepting GUI Importer. ;)
     
  6. sixgun
    • Premium Supporter

    sixgun MP Donator

    Joined:
    March 31, 2008
    Messages:
    80
    Likes Received:
    12
    Occupation:
    Software Developer
    Ratings:
    +12 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Perhaps :)

    It has been a fun little project to write and I've learnt a bit about RavenDB, which I have fell in love with. I have spent virtually no time at all on designing a database schema as I don't really need to.

    I think I'll make a few enquiries about MP2 development.
     
    • Like Like x 2
  7. MrCrabs

    MrCrabs Portal Pro

    Joined:
    January 21, 2010
    Messages:
    884
    Likes Received:
    117
    Gender:
    Male
    Occupation:
    Ingenieur Maschinenbau / mechanical engineer
    Location:
    Braunschweig
    Ratings:
    +129 / 1
    Home Country:
    Germany Germany
    Show System Specs
    I think that all movie plugin developers shuld finally put there experience together to make one plugin to rule them all. MovingPictures, MyFilms and now MyMovies all have the same idea using different ways, but I just refuse to believe that there can be no way to make one plugin that will fulfill anyones needs.
     
    • Like Like x 3
  8. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    9,702
    Likes Received:
    4,332
    Ratings:
    +6,181 / 10
    Home Country:
    Germany Germany
    Show System Specs
    Hi sixgun,

    your idea about centralized database of movies and storage of fanart images is exactly the way we go for MP2. In MP2 this also applies i.e. for Series. The fanart images are also downloaded in full resolution, the FanartService is able to deliver pre-scaled images to clients.

    In MP2 "everything is a plugin": MP2 has a flexible database layer: you can currently select between SQL-CE and MySQL. Developing a new DB plugin is fairly simple, i.e. if you like to add RavenDB support. And only the server accesses the DB, all clients are connected via UPnP to the server.
    I would be happy to discuss your ideas about movie management and maybe also get you contributing to existing MP2 plugins :)

    Thank you,
    Morpheus
     
    • Like Like x 2
  9. sixgun
    • Premium Supporter

    sixgun MP Donator

    Joined:
    March 31, 2008
    Messages:
    80
    Likes Received:
    12
    Occupation:
    Software Developer
    Ratings:
    +12 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    That'd be cool. Do you normally discuss things like that on irc?
     
    • Like Like x 1
  10. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    9,702
    Likes Received:
    4,332
    Ratings:
    +6,181 / 10
    Home Country:
    Germany Germany
    Show System Specs
    • Like Like x 1
  11. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    9,702
    Likes Received:
    4,332
    Ratings:
    +6,181 / 10
    Home Country:
    Germany Germany
    Show System Specs
    @sixgun: for beginning I want to point you to some wiki pages http://wiki.team-mediaportal.com/2_MEDIAPORTAL_2/Contribute/Development/3_Concepts/Metadata_system. It's not complete, but should be seen as introduction.

    We also have an overview about MP2 metadata aspects and our plans of extension: http://wiki.team-mediaportal.com/2_...3_Concepts/Metadata_system/Planning_Extension.

    I can recommend to try the recent https://www.team-mediaportal.com/news/mediaportal-2-winter-release-alpha-1 to get an own impression :) I think you will have some good ideas how to improve Movie (and maybe Series) features...
     
    • Like Like x 3
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Like Us On Facebook

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!