From eeda27b9d069161db0261f6e2f51ac9463bde910 Mon Sep 17 00:00:00 2001 From: Andreas Brugger Date: Sun, 18 Dec 2005 12:00:00 +0100 Subject: 2005-12-18: Version 1.1-cvs_ext-0.4 (vdr-text2skin-1.1-cvs_ext-0.4.diff) - modified the way, the current replayed recording is determined (status.c: cText2SkinStatus::Replaying) There remains a problem that recordings with the same name cannot be distinguished, so information optained from mReplay are not necessarily correct (all the ones added in vdr-text2skin-1.1-cvs_ext-0.2.diff) --- status.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'status.c') diff --git a/status.c b/status.c index f35f45c..b23683a 100644 --- a/status.c +++ b/status.c @@ -53,12 +53,28 @@ void cText2SkinStatus::Replaying(const cControl* /*Control*/, const char *Name) mReplayIsLoop = Name[1] == 'L'; mReplayIsShuffle = Name[2] == 'S'; } - } + } + /* + I tried the following, but this is not thread-safe and it seems that + 'LastReplayed()' is not allways up to date, when cStatus::Replaying() + is called: + else if (const cRecording *rec = GetRecordingByFileName(cReplayControl::LastReplayed())) { mReplay = rec; mReplayMode = replayNormal; } + + so here is a temporary implementation which has the problem, that several + recordings with the same name cannot be seperated. This is deactivated + in Enigma (as it is more ore less useless), till there is a decent fix for + that. + */ + else if (const cRecording *rec = GetRecordingByName(Name)) + { + mReplay = rec; + mReplayMode = replayNormal; + } else if (strcmp(Name, "DVD") == 0) mReplayMode = replayDVD; else if (strcmp(Name, "VCD") == 0) -- cgit v1.2.3