summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStuart Morgan <smorgan@mythtv.org>2012-02-14 12:01:27 (GMT)
committer Stuart Morgan <smorgan@mythtv.org>2012-02-14 12:12:18 (GMT)
commitaac81b74a2d8b79b0c49637fc647f9f1bdf2da7b (patch)
tree42b7337c703c91a7c2a5056720714e65930d4f75
parentcd75e17bd55ccd833e306346f6bcfc51550282de (diff)
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)
-rw-r--r--mythtv/libs/libmythtv/mythplayer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index 8c54140..8e75efb 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;