From aac81b74a2d8b79b0c49637fc647f9f1bdf2da7b Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 14 Feb 2012 12:01:27 +0000 Subject: [PATCH] Fix videos not being marked as watched. We had some code to handle in-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 f53a00f546e2cd90eec7c8c6b3b32559b204a4a6) --- mythtv/libs/libmythtv/mythplayer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp index 8c54140f6d2..8e75efbf71b 100644 --- a/mythtv/libs/libmythtv/mythplayer.cpp +++ b/mythtv/libs/libmythtv/mythplayer.cpp @@ -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;