Project

General

Profile

Feature #465 » 0001-new-token-support-for.patch

updated patch against version 1.3.2+git - NemoN, 11/07/2011 02:08 PM

View differences:

Docs/Reference.txt
| FreeDiskSpace | | Remaining free disk space in MB
| | | Attribute: return as formatted time.
-----------------------------------------------------------------------------
| UsedDiskSpace | | Used disk space in MB
-----------------------------------------------------------------------------
| TotalDiskSpace | | Total disk space in MB
-----------------------------------------------------------------------------
| CanScrollUp | | True, if scrollable text can be scrolled up
-----------------------------------------------------------------------------
| CanScrollDown | | True, if scrollable text can be scrolled down
display.c
return (cxType)false;
}
return false;
case tVideoSizeWidth: {
#if VDRVERSNUM >= 10707
int width, height;
double aspect;
cDevice *dev = cDevice::PrimaryDevice();
dev->GetVideoSize(width, height, aspect);
return (cxType)width;
#else
return 0;
#endif
}
case tVideoSizeHeight: {
#if VDRVERSNUM >= 10707
int width, height;
double aspect;
cDevice *dev = cDevice::PrimaryDevice();
dev->GetVideoSize(width, height, aspect);
return (cxType)height;
#else
return 0;
#endif
}
case tHasTeletext:
case tChannelHasTeletext:
return mChannel != NULL && mChannel->Tpid() != 0;
render.c
: (cxType)FreeMB;
}
case tUsedDiskSpace: {
int FreeMB, UsedMB;
VideoDiskSpace(&FreeMB, &UsedMB);
return (cxType)UsedMB;
}
case tTotalDiskSpace: {
int FreeMB, UsedMB;
VideoDiskSpace(&FreeMB, &UsedMB);
return (cxType)FreeMB+UsedMB;
}
case tDateTime: return TimeType(time(NULL), Token.Attrib.Text);
case tCanScrollUp:
xml/string.c
#include "render.h"
static const char *Tokens[__COUNT_TOKEN__] = {
"DateTime", "FreeDiskSpace", "AudioTrack", "AudioChannel",
"DateTime", "FreeDiskSpace", "UsedDiskSpace", "TotalDiskSpace", "VideoSizeWidth", "VideoSizeHeight", "AudioTrack", "AudioChannel",
// Channel Display
"ChannelNumber", "ChannelName", "ChannelShortName", "ChannelBouquet", "ChannelPortal",
xml/string.h
enum exToken {
tDateTime,
tFreeDiskSpace,
tUsedDiskSpace,
tTotalDiskSpace,
tVideoSizeWidth,
tVideoSizeHeight,
tAudioTrack,
tAudioChannel,
(2-2/2)