summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Saxer <tsaxer@gmx.de>2013-05-04 19:01:31 (GMT)
committeretobi <git@e-tobi.net>2013-05-04 19:01:31 (GMT)
commit7bd88a078d31f57e8fcfc0b93c45c3e8b13c5190 (patch)
tree90a441782fbd9492753cdceebfde2dc4ff8dd4fc
parent2c11552ad60fcfc3c7acbf71b3c9e3d32f2fe8a5 (diff)
downloadvdr-plugin-text2skin-7bd88a078d31f57e8fcfc0b93c45c3e8b13c5190.tar.gz
vdr-plugin-text2skin-7bd88a078d31f57e8fcfc0b93c45c3e8b13c5190.tar.bz2
Added DiskUsage
-rw-r--r--render.c14
-rw-r--r--xml/string.c4
-rw-r--r--xml/string.h2
3 files changed, 18 insertions, 2 deletions
diff --git a/render.c b/render.c
index 8d8ac53..b22a3f8 100644
--- a/render.c
+++ b/render.c
@@ -16,6 +16,8 @@
#include <vdr/videodir.h>
#include <vdr/skinclassic.h>
+using std::string;
+
cText2SkinRender *cText2SkinRender::mRender = NULL;
cText2SkinRender::cText2SkinRender(cText2SkinLoader *Loader, cxDisplay::eType Display,
@@ -854,6 +856,18 @@ cxType cText2SkinRender::GetTokenData(const txToken &Token)
VideoDiskSpace(&FreeMB, &UsedMB);
return (cxType)FreeMB+UsedMB;
}
+
+#if VDRVERSNUM >= 10728
+ case tDiskUsage: {
+ cVideoDiskUsage::ForceCheck();
+ string DiskUsage = string(cString::sprintf("%s", *cVideoDiskUsage::String()));
+ return DiskUsage;
+ }
+#endif
+
+ case tVdrVersion: {
+ return VDRVERSION;
+ }
case tDateTime: return TimeType(time(NULL), Token.Attrib.Text);
diff --git a/xml/string.c b/xml/string.c
index 6504f64..4d3e986 100644
--- a/xml/string.c
+++ b/xml/string.c
@@ -4,7 +4,7 @@
#include "render.h"
static const char *Tokens[__COUNT_TOKEN__] = {
- "DateTime", "FreeDiskSpace", "UsedDiskSpace", "TotalDiskSpace", "VideoSizeWidth", "VideoSizeHeight", "AudioTrack", "AudioChannel",
+ "DateTime", "FreeDiskSpace", "UsedDiskSpace", "TotalDiskSpace", "DiskUsage", "VideoSizeWidth", "VideoSizeHeight", "AudioTrack", "AudioChannel",
// Channel Display
"ChannelNumber", "ChannelName", "ChannelShortName", "ChannelBouquet", "ChannelPortal",
@@ -42,7 +42,7 @@ static const char *Tokens[__COUNT_TOKEN__] = {
"ReplayIsLoop",
// Menu Page
- "MenuTitle", "MenuGroup", "IsMenuGroup", "MenuItem", "IsMenuItem", "MenuCurrent",
+ "VdrVersion", "MenuTitle", "MenuGroup", "IsMenuGroup", "MenuItem", "IsMenuItem", "MenuCurrent",
"IsMenuCurrent", "MenuText", "RecordingName", "RecordingFilename", "RecordingDateTime", "RecordingTitle",
"RecordingShortText", "RecordingDescription", "RecordingLanguageCode",
"FrontendSTR", "FrontendSNR", "FrontendHasLock", "FrontendHasSignal", "RecordingPriority", "RecordingLifetime",
diff --git a/xml/string.h b/xml/string.h
index 9b0d66d..da8470a 100644
--- a/xml/string.h
+++ b/xml/string.h
@@ -12,6 +12,7 @@ enum exToken {
tFreeDiskSpace,
tUsedDiskSpace,
tTotalDiskSpace,
+ tDiskUsage,
tVideoSizeWidth,
tVideoSizeHeight,
tAudioTrack,
@@ -137,6 +138,7 @@ enum exToken {
tReplayIsLoop,
// Menu Page
+ tVdrVersion,
tMenuTitle,
tMenuGroup,
tIsMenuGroup,