Trailers Plugin v1.3.0 (Play/Stream/DL for MovingPictures, My Films, My Videos..) [2020-02-23] (2 Viewers)

ajs

Development Group
  • Team MediaPortal
  • February 29, 2008
    16,059
    11,141
    Kyiv
    Home Country
    Ukraine Ukraine
    Maybe you can convince the .ru site to develop an API
    They have an API, or rather was. For mobile applications. Request API for normal applications was sent six months ago. But they can not decide, just like that. I think they want money, but can not be determined with a price.

    But without APIs ltfearme is not keen on adding.
    But if there is a mechanism similar to the grabbers in My Videos, then everyone will be able to add a site that wants to. And this will not detract @ltfearme from the work. :)
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    16,059
    11,141
    Kyiv
    Home Country
    Ukraine Ukraine
    @ltfearme
    I try add Trailers button in DialogVideoInfo.xml like:
    XML:
    <control>
            <description>Trailers</description>
            <type>button</type>
            <id>11899</id>
            <label>#Trailers.Translation.Trailers.Label...</label>
            <onup>97270</onup>
            <ondown>2</ondown>
            <onleft>456852</onleft>
            <textcolor>FF000000</textcolor>
            <textcolorNoFocus>ffffffff</textcolorNoFocus>
            <visible>plugin.isenabled(Trailers)</visible>
            <animation effect="fade" time="250" condition="!control.hasfocus(456852)">conditional</animation>
          </control>
    But when I press this button, the activity becomes the first button in the list, and nothing happens. Am I doing something wrong?
     
    Last edited:

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,755
    7,200
    Sydney
    Home Country
    Australia Australia
    @ajs,

    I don't know from your log file, was there any error.log generated?

    I suspect it tried to get information from the MyVideos properties but failed:

    Code:
      public static bool GetCurrentMediaItem(out MediaItem currentMediaItem)
      {
      FileLog.Info("Getting selected movie information from MyVideos.");
    
      currentMediaItem = new MediaItem();
      currentMediaItem.Title = GUIPropertyManager.GetProperty("#title").Trim();
    
      int year;
      var strYear = GUIPropertyManager.GetProperty("#year").Trim();
      if (int.TryParse(strYear, out year))
      currentMediaItem.Year = year;
    
      // Get IMDb ID
      string imdbid = GUIPropertyManager.GetProperty("#imdbnumber").Trim();
      if (!string.IsNullOrEmpty(imdbid) && imdbid.Length == 9)
      currentMediaItem.IMDb = imdbid;
    
      currentMediaItem.Plot = GUIPropertyManager.GetProperty("#plot").Trim();
      currentMediaItem.Poster = GUIPropertyManager.GetProperty("#thumb").Trim();
    
      // Get Local File Info
      currentMediaItem.FullPath = GUIPropertyManager.GetProperty("#file").Trim();
    
      // At the very least we should have a file
      if (string.IsNullOrEmpty(currentMediaItem.FullPath))
      {
      // try get the selected item on the facade
      if (SelectedItem != null && !SelectedItem.IsFolder)
      {
      currentMediaItem.FullPath = SelectedItem.Path;
      }
      else
      {
      currentMediaItem = null;
      }
      }
    
      return true;
      }

    I would need to add more logging to figure out why it failed for you as you only see:
    Code:
    Getting selected movie information from MyVideos.

    There is possibly an unhandled exception in there so check your error log.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,755
    7,200
    Sydney
    Home Country
    Australia Australia
    It doesn't look like there is any unhandled exception so will need to provide more logging for you to test with.
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,755
    7,200
    Sydney
    Home Country
    Australia Australia
    @ajs,

    the reason why its not working for you is because GUIPropertyManager.GetProperty("#file") is empty for you.

    I assume My Videos will always populate that with the file of the video in question, does that video have a file or is it an orphan entry in your database?

    If you do have a file then its a MediaPortal bug as that property should be populated where there is a file reference.

    Anyway, I will support no file reference as I just tested the My Videos configuration and you can remove a file reference from the database so I should support that as well. Release in v1.2.2.
     
    Last edited:

    Users who are viewing this thread

    Top Bottom