Skip to content

Commit

Permalink
Fix videos not being marked as watched. We had some code to handle in…
Browse files Browse the repository at this point in the history
…-progress recordings where we didn't have the total number of frames, this used the start/end time of the recording which can't be trusted for video because they are based on the length from downloaded metadata e.g. An episode of Frasier might only be 22 minutes long without adverts but according to the metadata it's 30 minutes. We now trust the totalFrames to be accurate for anything which isn't an in-progress recording.

(cherry picked from commit f53a00f)
  • Loading branch information
stuartm committed Feb 14, 2012
1 parent cd75e17 commit aac81b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mythtv/libs/libmythtv/mythplayer.cpp
Expand Up @@ -3057,8 +3057,10 @@ void MythPlayer::SetWatched(bool forceWatched)

long long numFrames = totalFrames;

if (player_ctx->playingInfo->QueryTranscodeStatus() !=
TRANSCODING_COMPLETE)
// Handle in-progress recordings where totalFrames doesn't represent
// the full length of the recording
if (player_ctx->playingInfo->IsRecording() &&
player_ctx->playingInfo->GetRecordingStatus() == rsRecording)
{
uint endtime;

Expand Down

0 comments on commit aac81b7

Please sign in to comment.