- Moderator
- #11
Started Playback
Send To Trakt (Start Watching):
Ended Playback
Send To Trakt (Paused Watching):
It looks like it sent the pause with 0% progress watched, so when you restarted mediaportal, the trakt paused sync reset your resume time to 0%.
The big question is why the trakt plugin didn't know how much you actually watched. This could of happen for a number of reasons.
We first get the players current position:
Then we get the total duration of the video:
Finially the progress is calculated:
I suspect that either the duration of the video as reported in movingpics = 0 or MediaPortal is giving me a current position of 0.
Can you check your MovingPictures configuration for that movie and see what the Runtime is set to? Check the Movie Details 'Runtime' and the File Details 'Duration'.
You might need to update MediaInfo for that file or re-scrape the movie. Maybe you have disabled MediaInfo scan?
Code:
[2015-07-03 19:37:32,094] [Log ] [MPMain ] [INFO ] - g_Player.OnStarted() D:\Film\Faster (2010) [1080p]\Faster.2010.1080p.BrRip.x264.YIFY.mp4 media:Video
Send To Trakt (Start Watching):
Code:
2015-07-03 19:37:32.685 [INFO] [Scrobble][46]: Sending start scrobble of movie to trakt.tv. Title = 'Faster', Year = '2010', IMDb ID = 'tt1433108', TMDb ID = '41283'
2015-07-03 19:37:33.225 [INFO] [Scrobble][46]: Scrobble Response: {"action":"start","episode":null,"movie":{"ids":{"slug":"faster-2010","trakt":27285,"imdb":"tt1433108","tmdb":41283},"title":"Faster","year":2010},"progress":0,"sharing":{"facebook":false,"tumblr":false,"twitter":false},"show":null}
Ended Playback
Code:
[2015-07-03 20:10:43,410] [Log ] [MPMain ] [INFO ] - VideoPlayer:ended D:\Film\Faster (2010) [1080p]\Faster.2010.1080p.BrRip.x264.YIFY.mp4
Send To Trakt (Paused Watching):
Code:
2015-07-03 20:10:43.411 [INFO] [Scrobble][24]: Sending 'pause' scrobble of movie to trakt.tv. Progress = '0%', Title = 'Faster', Year = '2010', IMDb ID = 'tt1433108', TMDb ID = '41283'
2015-07-03 20:10:44.063 [INFO] [Scrobble][24]: Scrobble Response: {"action":"pause","episode":null,"movie":{"ids":{"slug":"faster-2010","trakt":27285,"imdb":"tt1433108","tmdb":41283},"title":"Faster","year":2010},"progress":0,"sharing":{"facebook":false,"tumblr":false,"twitter":false},"show":null}
It looks like it sent the pause with 0% progress watched, so when you restarted mediaportal, the trakt paused sync reset your resume time to 0%.
The big question is why the trakt plugin didn't know how much you actually watched. This could of happen for a number of reasons.
We first get the players current position:
Code:
// MovingPictures stores duration in milliseconds, g_Player reports in seconds
double currentPosition = g_Player.CurrentPosition;
Then we get the total duration of the video:
Code:
double duration = GetMovieDuration(movie, IsDVDPlaying);
private double GetMovieDuration(DBMovieInfo movie, bool isDVD)
{
double duration = 0.0;
// first try to get from MediaInfo
if (movie.ActualRuntime != 0)
{
// MovingPictures stores duration in milliseconds
duration = movie.ActualRuntime / 1000.0;
}
else if (g_Player.Duration != 0.0)
{
// g_Player reports in seconds
duration = g_Player.Duration;
}
else
{
// MovingPictures stores scraped runtime in minutes
duration = movie.Runtime * 60.0;
}
// MediaInfo runtime from MovingPictures is wrong
// it sums up all videos on the DVD structure!
// check if more than 4hrs will suffice
if (isDVD && duration > (4 * 60 * 60)) duration = movie.Runtime * 60.0;
// sometimes we could be finishing a DVD in an featurette
// come up with an arbitrary runtime to avoid scrobbling as a trailer,
// and be rejected, only do this on DVDs
if (isDVD && duration < 900.0) duration = 120 * 60;
return duration;
}
Finially the progress is calculated:
Code:
// g_Player reports in seconds
double progress = duration != 0.0 ? (currentPosition / duration * 100.0) : 0.0;
I suspect that either the duration of the video as reported in movingpics = 0 or MediaPortal is giving me a current position of 0.
Can you check your MovingPictures configuration for that movie and see what the Runtime is set to? Check the Movie Details 'Runtime' and the File Details 'Duration'.
You might need to update MediaInfo for that file or re-scrape the movie. Maybe you have disabled MediaInfo scan?
Last edited: