Need a little help with plugin development (1 Viewer)

morpheus_xx

Lead Dev MP2
  • Team MediaPortal
  • March 24, 2007
    11,461
    7,010
    Germany Germany
    Country flag
    Nice progress (y)

    Some recommendations: you can use the exisiting generic convenience methods to access the Aspect properties, like example here:
    C#:
          // First check if we already have a complete match from a previous MDE
          string title;
          int tvDbId;
          int seasonNumber;
          IEnumerable<int> episodeNumbers;
          if (MediaItemAspect.TryGetAttribute(extractedAspectData, MediaAspect.ATTR_TITLE, out title) &&
              MediaItemAspect.TryGetAttribute(extractedAspectData, SeriesAspect.ATTR_TVDB_ID, out tvDbId) &&
              MediaItemAspect.TryGetAttribute(extractedAspectData, SeriesAspect.ATTR_SEASON, out seasonNumber) &&
              (episodeNumbers = extractedAspectData[SeriesAspect.ASPECT_ID].GetCollectionAttribute<int>(SeriesAspect.ATTR_EPISODE)) != null)
    For the GUI wrappers there are also implementation for each aspect (code auto generated), here. (This would match your scenario).

    Then there is also the other way around, the class SeriesInfo has a method to fill the aspects here. We could add a reverse method (aspect data to SeriesInfo class). This would help other devs as well.

    I recently modified the client side search in this commit: https://github.com/MediaPortal/Medi...cac4#diff-3b121ade264ac0615b32cfe61ef8aca2R42. It's not yet merged to dev/master, but included in recent weekly builds. This is the example for loading a series by name filters.


    Regarding the other required information for your idea. You have to include more AspectIds in the media query:
    • MediaAspect: the "master data", in principle only ID, title, mimetype.
    • VideoAspect: contains video related info like resolution, video and audio formats
    • ProviderResourceAspect: contains the path for the media item
    More information can be found in the wiki: http://wiki.team-mediaportal.com/2_...cepts/Metadata_system/1_MediaAspects/5_Series and in the code parts that deal with those aspects.

    One last question: The results i'm getting are ok, but i was wondering why some fields are empty. Especially the TvDbID. It is always null, and that is in my case the query argument :-(
    But i think there is something wrong, because Mediaportal has imported these episodes and if i take a look in the local directories, i can see what it has downloaded from thetvdb, and there are folders with the TvDbIds, but they are missing in the database. Is this a bug in MP2 ? If so, i can try to fix that.
    For my local data the result is ok, the TvDbIds are (mostly) filled. This needs more checks and of course we would be happy if you contribute fixes to MP2 (y) :)
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,103
    3,689
    Lehmden
    Germany Germany
    Country flag
    Hi.
    the TvDbIds are (mostly) filled.
    In older versions of MP2 I often had this issue. But since Matroska Tags and .nfo support for series is working this never happend again. So I'm pretty sure it must be related to the online MDE somewhere.
     

    Kasimir9735

    Portal Pro
    July 19, 2010
    36
    30
    49
    Wetter (Ruhr)
    Germany Germany
    Hi.
    the TvDbIds are (mostly) filled.
    In older versions of MP2 I often had this issue. But since Matroska Tags and .nfo support for series is working this never happend again. So I'm pretty sure it must be related to the online MDE somewhere.

    Yes, you're right. I've found a bug in SeriesTvDbMatcher. If there is no .nfo and no Tags and you simply have the Filename for example "American Horror Story S04E12.xxx" the following attributes are not filled: ImdbId, TvdbId and FirstAired. I've fixed this and tested it. Works now. I'm trying to submit a patch, but first have to read how to do it.
     

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

    OP Similar threads Forum Replies Date
    X [solved] Display needs to be turned on for TV services to function General 1
    J IPTV Sweden, need help with m3u list MediaPortal 1 Plugins 14
    N Play a TV recording needs a double selection - twice ok on remote Television (MyTV frontend and TV-Server) 2
    L [solved] Why does Mediaportal 2 need access to my webcam? General 2
    U [solved] Beginner needs help recording live TV General 19
    mrmojo666 beginner: trying to write a plugin, need help to catch event General Development (no feature request here!) 3
    M What does MP homeserver detection need at the client end, and what does the server need to transmit? General 6
    S EPG timeshift advice needed please Electronic Program Guide 3
    el Filou Is Windows Media Player still needed on Windows 10 ? MediaPortal 1 Talk 0
    milagroso Remote control with EventGhost - I'm stuck, need help General 3
    W Need help getting my TV guide working again General Support 1
    morpheus_xx [Evaluate] LIVE555 library vulnerability - do we need to update?! Developer Discussions 7
    A I need help with 110 and 119 west Installation, configuration support 21
    A Need help rescaning Channels for 110 and 119 west MediaPortal 1 Talk 2
    C EPG-Buddy: so close to no help needed Electronic Program Guide 8
    A Need new 110w and 119w tp`s Newcomers Forum 0
    M A little help with new install pls Installation, configuration support 3
    framug [solved] Interested with a little modification in your plugin ? My TVSeries 11
    O Help with TV setup Newcomers Forum 76
    J Help with new grabber file. WebEPG 1
    wizard123 [solved] MP1 Build help MediaPortal 1 21
    D Please help with getting Schedules Direct to work Newcomers Forum 10
    A IPTV from https m3u8 urls - Help General 6
    N Music player help Listen Music 4
    A Enigma2 receiver channels on Windows PC with Media Portal help General Support 0
    Similar threads

























    Top Bottom