From 074fb6e3a2795b6756d17a818ddf0aa9f258dc33 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Tue, 14 Feb 2012 16:25:06 +0000 Subject: [PATCH] Alter the watched flag fix slightly to take into account the need to ignore post-roll for recordings, something I forgot before. (cherry picked from commit b758ea8df0c0019b9833a274f73484e71bf8c2b2) --- mythtv/libs/libmythtv/mythplayer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp index 8e75efbf71b..79d9551469c 100644 --- a/mythtv/libs/libmythtv/mythplayer.cpp +++ b/mythtv/libs/libmythtv/mythplayer.cpp @@ -3057,10 +3057,13 @@ void MythPlayer::SetWatched(bool forceWatched) long long numFrames = totalFrames; - // Handle in-progress recordings where totalFrames doesn't represent - // the full length of the recording + // For recordings we want to ignore the post-roll and account for + // in-progress recordings where totalFrames doesn't represent + // the full length of the recording. For videos we can only rely on + // totalFrames as duration metadata can be wrong if (player_ctx->playingInfo->IsRecording() && - player_ctx->playingInfo->GetRecordingStatus() == rsRecording) + player_ctx->playingInfo->QueryTranscodeStatus() != + TRANSCODING_COMPLETE) { uint endtime;