summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brugger <brougs78@gmx.net>2005-12-18 12:00:00 +0100
committerThomas Günther <tom@toms-cafe.de>2009-06-03 01:18:35 +0200
commiteeda27b9d069161db0261f6e2f51ac9463bde910 (patch)
tree13168858991dfcfc13c8ac373fc8c9ca6a5db264
parentbb39010021b5fd8a1046200839c678afc76227d5 (diff)
downloadvdr-plugin-text2skin-eeda27b9d069161db0261f6e2f51ac9463bde910.tar.gz
vdr-plugin-text2skin-eeda27b9d069161db0261f6e2f51ac9463bde910.tar.bz2
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)
-rw-r--r--HISTORY8
-rw-r--r--common.c2
-rw-r--r--display.c6
-rw-r--r--status.c18
4 files changed, 28 insertions, 6 deletions
diff --git a/HISTORY b/HISTORY
index fa23b5c..74723c0 100644
--- a/HISTORY
+++ b/HISTORY
@@ -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:
diff --git a/common.c b/common.c
index f7011d6..c6b0a24 100644
--- a/common.c
+++ b/common.c
@@ -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)
diff --git a/display.c b/display.c
index 371c4bc..3db4063 100644
--- a/display.c
+++ b/display.c
@@ -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
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)