WMV Movie Guide Replacement (1 Viewer)

ChubbyArse

Portal Member
December 28, 2011
40
1
Hi All,

I'm after some advice on the best way to factor the needs of my plugin into the architecture of MP. So, I should probably start with a description of my plugin.

I'm developing a plugin to replicate the "Movie Guide" functionality in WMC as it's a feature that I really rate. For the data provisioning side of the plugin I am writing:
  • A process that reads the movies from the EPG and uses the IMDB grabbing to retrieve movie details and cover art.
    • Stores each movie and it's details in a SQLLite database in the Database directory
    • Stores a thumbnail and larger image of the coverart retrieved using the grabbers.
  • Write a process that deletes retrospective programmes and the cover art stored for it
Some questions:
  1. It looks like the processing here belongs in the TVservice - should I create two plugins? One for the back end data generation and another for the GUI elements?
  2. Is it OK to create a bespoke SQLLite database in the MP databases sub-dir?
  3. Can I hook into an event that will tell me when the EPG has been updated?
  4. Does the epg retain retrospective data (I'm only interested in today forwards)?
  5. Is Program.IdProgram unique?
  6. When storing the cover art, should I create a new directory for my covert art and store images in the MP Video folder, or should I create a new sub folder (MovieGuide) under MP and store images in there? I'm thinking that as the images don't need to be retained indefinately, that I shouldn't try to merge in with Videos and maintain the images myself?
I've got more questions relating to the presentation layer and I have a rough UI already knocked up, but I think I'll address those when I've finished the data side of things.

Thanks for any help.

Alex
 

Edalex

Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    Hi. I did something similar for myself when selected item name in TV guide was looked up on trakt and in responce I got nice backdrop :)
    I hope they extend database in TVE3/5 to store some tv and movie data.
    Regarding your questions:
    1. I think it depends of your design. If you need centralized processing you will have client-server architecture, If no you could do it with only mediaportalnot tvserver plugin and place all data on client.
    2. I think yes. Many plugins have own sqlite db placed in mp folder.
    3. Yes, you can but I don't remember what's the event name. Probably @mm1352000 or @Sebastiii could bring it to mind.
    4. Depends of your settings each EPG grab could flush your previous EPG or overwrite it.
    5. I think yes. You could look at createdb sql script in TVLibrary folder to check this yourself.
    6. Usually plugins are storing image data in Thumbs folder.
     

    ChubbyArse

    Portal Member
    December 28, 2011
    40
    1
    Thanks for the response Edalex, just a few things for clarification.

    1. I don't currently need full client server processing - but I think I'll eventually write it such that a TVServer Plugin will do the data processing and populate the database, whereas the client side plugin will get the thumbs and read from the database. The only thing I may want to do is have the client side invoke on the TVServer, a function to refresh the database (should it get stale).

    4. I think I'll have my database reflect what is in the epg at all times, so if the user decides not to flush it then my database will retain data for each programme still in the EPG.

    6. Should I create my own subdirectory in the thumbs directory for my coverart? I think that would be more maintainable that adding it to the Videos subdirectory.

    Cheers.

    Alex
     

    ChubbyArse

    Portal Member
    December 28, 2011
    40
    1
    Hi breese,

    I had considered going directly to MP2, however I'm a new adopter of MP for my media centre and wanted to get something robust in place for living room use and extend it to add the features that I used in WMC.

    If I went directly to MP2, I would possibly have to battle the gremlins of alpha software on what you could call a "production" system.

    However, I am writing this as modular-ly as I can, so theoretically when MP2 moves into Beta and is closer to release, then it shouldn't take much to re-write as the core functionality can remain whilst the dependencies (DB, Fetching, Config) can be replaced with MP2 versions.

    That's the theory anyway.... If I can get this to fly, I'd be happy to implement it in MP2 as a core feature - that way MP2 would match even more WMC functionality.
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    If I went directly to MP2, I would possibly have to battle the gremlins of alpha software on what you could call a "production" system.
    I can only encourage you to give MP2 a try soon (well, there is "something" coming soon :)). I use it for TV since 2 month, my girlfriend got used to it. No crashes yet :)

    If you go for a MP2 development. you could already base on a solid foundation: i.e. we have the OnlineLibraries to access TvDB / TMDB. The SlimTV client plugin is able to use both MP1 (TVE3 using MPExtended) and "NativeTV" (TVE35) (see this for background: http://wiki.team-mediaportal.com/2_MEDIAPORTAL_2/9_Reference/TV_support).

    To answer some of your questions:
    Is Program.IdProgram unique?
    It is unique, but probably not persistent: depending on the input source, the programs will be entirely replaced. So the same program might have a new ID after import. That's also a reason, why "DeletedSchedules" are addressed by "ID_CHANNEL" and "START_TIME", and not "IDProgram"

    I recommend to develop the "backend" to use TVE35, as this will be the future for both MP1 and MP2. The GUI part you could decide what to support:
    • MP1, MP1-Skins, WCF and/or
    • MP2, XAML-Skins, UPnP

    For a test drive of MP2 you might try this: https://forum.team-mediaportal.com/...mp2-tv-updated-for-alpha-4-2014-02-15.114068/.

    I'll try to answer more TVServer and MP2 questions :)
     

    ChubbyArse

    Portal Member
    December 28, 2011
    40
    1
    Morning and thanks for the response morpheus. I'm more interested in getting something up and running as I've bailed out of WMC into MP and would like to address the gaps ASAP. I've built the "backend" already against MP1 TV Server, but implemented it "loosely" behing and interface, so when I come to adapt it for TV35, as long as the new implementation can satisfy the interface contract then my core logic should remain untouched.

    It shouldn't be too hard to build a core library and MP1 / MP2 implementations of a plugin in the near future when things gain impetus with TV35 / MP2.

    Like I mentioned, I'm basing my plugin implementation on the GUIVIdeos plugin, so it should be fairly easy to integrate it should you wish to later factor it into the Core MP offering.

    I've built my storage of EPG movie details keyed on the programId, depenending on how the UK listing providers push their data, I'll be wary of the fact that programs can be deleted and re-imported (on a daily basis?).

    Am I able to get a notification when the EPG has been updated, so I can trigger a process to update the EPG Movie Guide storage?

    I've got a couple of other questions re Dependency Injection, but I'll post that on another thread.

    Thanks
     

    Users who are viewing this thread

    Top Bottom