mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
added Token {percentseen} to listelements in menurecordings
This commit is contained in:
parent
b98fee9668
commit
495c222234
2
HISTORY
2
HISTORY
@ -253,3 +253,5 @@ Version 0.3.3
|
||||
any list menu, implementation in displaymenu.xml is default
|
||||
- use recording info for <currentschedule> viewelement in main menu
|
||||
if recording is replayed. New token {islivetv} indicates this.
|
||||
- added Token {percentseen} to listelements in menurecordings. For
|
||||
VDR Version < 2.1.8 {percentseen} is set to -1.
|
||||
|
@ -16,6 +16,7 @@
|
||||
{durationeventminutes} event duration, rest of minutes
|
||||
{current} true if item is currently selected
|
||||
{new} true if recording is new
|
||||
{percentseen} percent already watched, -1 for VDR < 2.1.8
|
||||
{cutted} true if recording is cutted
|
||||
{folder} true if item is a folder
|
||||
{numrecordingsfolder} if item is a folder, number of recordings in this folder
|
||||
|
@ -17,6 +17,7 @@
|
||||
{durationeventminutes} event duration, rest of minutes
|
||||
{current} true if item is currently selected
|
||||
{new} true if recording is new
|
||||
{percentseen} percent already watched, -1 for VDR < 2.1.8
|
||||
{cutted} true if recording is cutted
|
||||
{folder} true if item is a folder
|
||||
{numrecordingsfolder} if item is a folder, number of recordings in this folder
|
||||
|
@ -690,6 +690,19 @@ void cDisplayMenuItemRecordingView::SetTokens(void) {
|
||||
|
||||
stringTokens.insert(pair<string,string>("name", buffer.c_str()));
|
||||
intTokens.insert(pair<string,int>("new", usedRecording->IsNew()));
|
||||
|
||||
int percSeen = 0;
|
||||
#if APIVERSNUM < 20108
|
||||
percSeen = -1;
|
||||
#else
|
||||
percSeen = 0;
|
||||
int framesSeen = usedRecording->GetResume();
|
||||
int framesTotal = usedRecording->NumFrames();
|
||||
if (framesTotal > 0) {
|
||||
percSeen = (double)framesSeen / (double)framesTotal * 100;
|
||||
}
|
||||
#endif
|
||||
intTokens.insert(pair<string,int>("percentseen", percSeen));
|
||||
intTokens.insert(pair<string,int>("newrecordingsfolder", newRecs));
|
||||
intTokens.insert(pair<string,int>("numrecordingsfolder", total));
|
||||
intTokens.insert(pair<string,int>("cutted", usedRecording->IsEdited()));
|
||||
|
Loading…
Reference in New Issue
Block a user