diff options
-rw-r--r-- | HISTORY | 8 | ||||
-rw-r--r-- | common.c | 2 | ||||
-rw-r--r-- | display.c | 6 | ||||
-rw-r--r-- | status.c | 18 |
4 files changed, 28 insertions, 6 deletions
@@ -1,6 +1,14 @@ VDR Plugin 'text2skin' Revision History --------------------------------------- +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) + 2005-12-11: Version 1.1-cvs_ext-0.3 (vdr-text2skin-1.1-cvs_ext-0.3.diff) - added recording-tokens: @@ -117,7 +117,7 @@ const cRecording *GetRecordingByName(const char *Name) const cRecording *GetRecordingByFileName(const char *FileName) { - return Recordings.GetByName(FileName); + return (FileName) ? Recordings.GetByName(FileName) : NULL; } int GetRecordingSize(const char *FileName) @@ -16,7 +16,7 @@ cText2SkinDisplayChannel::cText2SkinDisplayChannel(cText2SkinLoader *Loader, bool WithInfo): cText2SkinRender(Loader, WithInfo ? cxDisplay::channelInfo : cxDisplay::channelSmall), mFallbackDisplay(NULL), - mChannel(NULL), + mChannel(NULL), mNumber(0), mPresent(NULL), mFollowing(NULL), @@ -116,9 +116,7 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token) { switch (Token.Type) { case tChannelNumber: - return mChannel != NULL - ? (cxType)ChannelNumber(mChannel, mNumber) - : (cxType)false; + return (cxType)ChannelNumber(mChannel, mNumber); case tChannelName: return mChannel != NULL @@ -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) |