mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
added permashift support in displaychannel
This commit is contained in:
parent
5a0155d1e9
commit
727f20617c
2
HISTORY
2
HISTORY
@ -330,5 +330,7 @@ Version 0.4.6
|
|||||||
|
|
||||||
- added token {startsin} in displaymenuschedules
|
- added token {startsin} in displaymenuschedules
|
||||||
- added viewelement <vdrstatistics> in main menu
|
- added viewelement <vdrstatistics> in main menu
|
||||||
|
- added permashift support in displaychannel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -70,12 +70,19 @@
|
|||||||
{duration} Total Duration of current Schedule in seconds
|
{duration} Total Duration of current Schedule in seconds
|
||||||
{elapsed} Elapsed time of current Schedule in seconds
|
{elapsed} Elapsed time of current Schedule in seconds
|
||||||
{remaining} Remaining time of current Schedule in seconds
|
{remaining} Remaining time of current Schedule in seconds
|
||||||
|
{permashift} true if permashift plugin is in use
|
||||||
|
{livebuffer} current buffered data in seconds
|
||||||
-->
|
-->
|
||||||
<progressbar>
|
<progressbar>
|
||||||
<area x="22%" y="87%" width="76%" height="3" layer="2">
|
<area condition="not{permashift}" x="22%" y="87%" width="76%" height="3" layer="2">
|
||||||
<drawrectangle x="0" y="1" width="100%" height="1" color="{clrWhite}" />
|
<drawrectangle x="0" y="1" width="100%" height="1" color="{clrWhite}" />
|
||||||
<drawrectangle x="0" y="0" width="{elapsed}/{duration}*{areawidth}" height="3" color="{clrTransBlueLight}" />
|
<drawrectangle x="0" y="0" width="{elapsed}/{duration}*{areawidth}" height="3" color="{clrTransBlueLight}" />
|
||||||
</area>
|
</area>
|
||||||
|
<area condition="{permashift}" x="22%" y="87%" width="76%" height="5" layer="2">
|
||||||
|
<drawrectangle x="0" y="2" width="100%" height="1" color="{clrWhite}" />
|
||||||
|
<drawrectangle x="{elapsed}/{duration}*{areawidth} - {livebuffer}/{duration}*{areawidth}" y="0" width="{livebuffer}/{duration}*{areawidth}" height="5" color="{clrRed}" />
|
||||||
|
<drawrectangle x="0" y="1" width="{elapsed}/{duration}*{areawidth}" height="3" color="{clrTransBlueLight}" />
|
||||||
|
</area>
|
||||||
</progressbar>
|
</progressbar>
|
||||||
|
|
||||||
<!-- Available Variables statusinfo:
|
<!-- Available Variables statusinfo:
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
{duration} Total Duration of current Schedule in seconds
|
{duration} Total Duration of current Schedule in seconds
|
||||||
{elapsed} Elapsed time of current Schedule in seconds
|
{elapsed} Elapsed time of current Schedule in seconds
|
||||||
{remaining} Remaining time of current Schedule in seconds
|
{remaining} Remaining time of current Schedule in seconds
|
||||||
|
{permashift} true if permashift plugin is in use
|
||||||
|
{livebuffer} current buffered data in seconds
|
||||||
-->
|
-->
|
||||||
<progressbar>
|
<progressbar>
|
||||||
</progressbar>
|
</progressbar>
|
||||||
|
@ -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>("elapsed", Current));
|
||||||
intTokens.insert(pair<string, int>("remaining", Total - 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();
|
ClearProgressBar();
|
||||||
DrawViewElement(veProgressBar, &stringTokens, &intTokens);
|
DrawViewElement(veProgressBar, &stringTokens, &intTokens);
|
||||||
}
|
}
|
||||||
|
@ -442,6 +442,18 @@ bool cViewHelpers::CheckNewMails(void) {
|
|||||||
return false;
|
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) {
|
void cViewHelpers::SetScraperTokens(const cEvent *event, const cRecording *recording, stringmap &stringTokens, intmap &intTokens, map < string, vector<stringmap> > &loopTokens) {
|
||||||
static cPlugin *pScraper = GetScraperPlugin();
|
static cPlugin *pScraper = GetScraperPlugin();
|
||||||
if (!pScraper || (!event && !recording)) {
|
if (!pScraper || (!event && !recording)) {
|
||||||
|
@ -32,6 +32,7 @@ protected:
|
|||||||
void InitDevices(void);
|
void InitDevices(void);
|
||||||
bool SetDevices(bool initial, bool light, intmap *intTokens, vector<stringmap> *devices);
|
bool SetDevices(bool initial, bool light, intmap *intTokens, vector<stringmap> *devices);
|
||||||
bool CheckNewMails(void);
|
bool CheckNewMails(void);
|
||||||
|
int GetLiveBuffer(void);
|
||||||
void SetScraperTokens(const cEvent *event, const cRecording *recording, stringmap &stringTokens, intmap &intTokens, map < string, vector<stringmap> > &loopTokens);
|
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 SetPosterBanner(const cEvent *event, stringmap &stringTokens, intmap &intTokens);
|
||||||
void SetTimers(map<string,int> *intTokens, map<string,string> *stringTokens, vector<stringmap> *timers);
|
void SetTimers(map<string,int> *intTokens, map<string,string> *stringTokens, vector<stringmap> *timers);
|
||||||
|
Loading…
Reference in New Issue
Block a user