mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
added permashift support in displaychannel
This commit is contained in:
@@ -124,6 +124,15 @@ void cDisplayChannelView::DrawProgressBar(cString &start, cString &stop, int Cur
|
||||
intTokens.insert(pair<string, int>("elapsed", Current));
|
||||
intTokens.insert(pair<string, int>("remaining", Total - Current));
|
||||
|
||||
int liveBuffer = GetLiveBuffer();
|
||||
if (liveBuffer >= 0) {
|
||||
intTokens.insert(pair<string, int>("permashift", 1));
|
||||
intTokens.insert(pair<string, int>("livebuffer", liveBuffer));
|
||||
} else {
|
||||
intTokens.insert(pair<string, int>("permashift", 0));
|
||||
intTokens.insert(pair<string, int>("livebuffer", 0));
|
||||
}
|
||||
|
||||
ClearProgressBar();
|
||||
DrawViewElement(veProgressBar, &stringTokens, &intTokens);
|
||||
}
|
||||
|
@@ -442,6 +442,18 @@ bool cViewHelpers::CheckNewMails(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int cViewHelpers::GetLiveBuffer(void) {
|
||||
static cPlugin *pPermashift = cPluginManager::GetPlugin("permashift");
|
||||
if (!pPermashift) {
|
||||
return -1;
|
||||
}
|
||||
int buffer = 0;
|
||||
if (pPermashift->Service("Permashift-GetUsedBufferSecs-v1", &buffer)) {
|
||||
return buffer;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void cViewHelpers::SetScraperTokens(const cEvent *event, const cRecording *recording, stringmap &stringTokens, intmap &intTokens, map < string, vector<stringmap> > &loopTokens) {
|
||||
static cPlugin *pScraper = GetScraperPlugin();
|
||||
if (!pScraper || (!event && !recording)) {
|
||||
|
@@ -32,6 +32,7 @@ protected:
|
||||
void InitDevices(void);
|
||||
bool SetDevices(bool initial, bool light, intmap *intTokens, vector<stringmap> *devices);
|
||||
bool CheckNewMails(void);
|
||||
int GetLiveBuffer(void);
|
||||
void SetScraperTokens(const cEvent *event, const cRecording *recording, stringmap &stringTokens, intmap &intTokens, map < string, vector<stringmap> > &loopTokens);
|
||||
void SetPosterBanner(const cEvent *event, stringmap &stringTokens, intmap &intTokens);
|
||||
void SetTimers(map<string,int> *intTokens, map<string,string> *stringTokens, vector<stringmap> *timers);
|
||||
|
Reference in New Issue
Block a user