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:08:36 (GMT)
commitf53a00f546e2cd90eec7c8c6b3b32559b204a4a6 (patch)
treee36d2d452d6667319cc88ec1a88f2b7afcaa7ab1
parentac9ddbe4fe8f9a208b779646ebe7b9a36831ad79 (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.
-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 bffc141..dfe5126 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -3241,8 +3241,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;