[6.0.3] Trakt for MediaPortal [2020-01-01] (1 Viewer)

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,654
    3,120
    Nuenen
    Home Country
    Netherlands Netherlands
    I've updated the trakt plugin and now I have a problem with the onlinevideos/trakt combination because onlinevideos is compiled against an older version of trakt.
    Specifically, I get an error:
    Exception getting watched status: Method not found: 'System.Collections.Generic.IEnumerable`1<TraktPlugin.TraktAPI.DataStructures.TraktMovieWatched> TraktPlugin.TraktCache.GetWatchedMoviesFromTrakt(Boolean)'.

    Is it possible to add that missing method again (possibly with some kind of depcrecated attribute/warning) so that at least untill the next release (and accompanying fix ofcourse) onlinevideos will still work as intended?
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,755
    7,200
    Sydney
    Home Country
    Australia Australia
    I'm on holidays for a week, I can see what I can do after that.

    Do you know if the reference is used directly by OnlineVideos or is it one of the site utils? If its the later, then it might be easier to reach out to the person that did the site and have an update published?
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,654
    3,120
    Nuenen
    Home Country
    Netherlands Netherlands
    Well, off the top of my head, it's part of onlinevideos itself, but I'll investigate further soon.
    I do see a traktplugin.dll in the onlinevideos repo, which probably gets overwritten.
    But as I said, I'll investigate further

    P.S. have a good holiday!
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,654
    3,120
    Nuenen
    Home Country
    Netherlands Netherlands
    Ok, after investigation I found that the trakt dlls are indeed distributed in the onlinevideos plugin as optional installation.
    Since the method isn't removed from trakt, but moved to a separate dll, I think it's not easy to patch trakt so that the current onlinevideos keeps working.
    I'm currently the only one suffering from this as far as I know, so I'll create a workaround for myself and also fix the onlinevideos repository

    Edit: ok, it's not part of the onlinevideos setup, it's only in the repo to link to when compiling...
     
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi :)

    @ltfearme i have run into a bug about rate dialog that i have explain in private forum but i wrote it here to know if we can discuss about this.
    The issue happen and timing related, it's when doing stop and rate dialog is asked, if the whole stop is not yet processed correctly (when directshow graph filter is not fully released) then the rate dialog is running but nothing can be displayed and lead to MP kind of loop and feel like MP Freezed.

    So not sure if we can do it differently with actual code or need to add a new event when filter are fully released :)
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    So what i have add in Trakt : (line 17 to 20) and in MP code, we have changed GUIGraphicsContext.Vmr9Active to be set to false when all filter are properly released)
    If you have a better idea :p

    C#:
    private void OnEpisodeWatched(DBEpisode episode, bool isPlaylist)
            {
                if (TraktSettings.AccountStatus != ConnectionState.Connected) return;
    
                EpisodeWatching = false;
    
                TraktLogger.Info("Playback of MP-TVSeries episode stopped and considered watched. Title = '{0}', PlayList Item = '{1}'", episode.ToString(), isPlaylist);
                double progress = GetPlayerProgress(episode);
    
                // purely defensive check against bad progress reading
                // for an episode that counts as watched.
                if (progress < 80) progress = 100;
    
                var stopWatching = new Thread((objEpisode) =>
                {
                    // Wait playback is fully stopped to avoid loop on stop
                    while (g_Player.FullScreen || GUIGraphicsContext.Vmr9Active)
                    {
                         Thread.Sleep(10);
                    }
    
                    var stoppedEpisode = objEpisode as DBEpisode;
                    if (stoppedEpisode == null) return;
    
                    TraktScrobbleResponse response = null;
                    TraktScrobbleEpisode scrobbleData = null;
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    Hi :)

    I have moved the code into : \Trakt-for-Mediaportal\TraktPlugin\GUI\GUIUtils.cs :)
    It works on my side, hope it's the good way to do :p (like this it will be ok for all sections)
     
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,583
    10,403
    France
    Home Country
    France France
    In fact i did a bad copy of the modified DLL and it doesn't works, so will remove the above patch for now lol
     

    Users who are viewing this thread

    Top Bottom