mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
added banner to displaymenuschedulescurrentview and displaymenureplaycurrentview
This commit is contained in:
parent
bc07550708
commit
50fe393724
3
HISTORY
3
HISTORY
@ -376,4 +376,5 @@ Version 0.5.3
|
|||||||
- added SVG Template parsing
|
- added SVG Template parsing
|
||||||
- fixed memory leak when creating fonts
|
- fixed memory leak when creating fonts
|
||||||
- fixed crash using animated images in plugins
|
- fixed crash using animated images in plugins
|
||||||
|
- added banner to displaymenuschedulescurrentview and
|
||||||
|
displaymenureplaycurrentview
|
||||||
|
@ -56,7 +56,8 @@
|
|||||||
{durationminutes} real duration, rest of minutes
|
{durationminutes} real duration, rest of minutes
|
||||||
{durationevent} duration of corresponding event in minutes
|
{durationevent} duration of corresponding event in minutes
|
||||||
{durationeventhours} event duration, full hours
|
{durationeventhours} event duration, full hours
|
||||||
{durationeventminutes} event duration, rest of minutes {new} true if recording is new
|
{durationeventminutes} event duration, rest of minutes
|
||||||
|
{new} true if recording is new
|
||||||
{cutted} true if recording is cutted
|
{cutted} true if recording is cutted
|
||||||
{folder} true if item is a folder
|
{folder} true if item is a folder
|
||||||
{numrecordingsfolder} if item is a folder, number of recordings in this folder
|
{numrecordingsfolder} if item is a folder, number of recordings in this folder
|
||||||
@ -65,6 +66,10 @@
|
|||||||
{posterwidth} width of scraped poster
|
{posterwidth} width of scraped poster
|
||||||
{posterheight} height of scraped poster
|
{posterheight} height of scraped poster
|
||||||
{posterpath} absolute path of scraped poster
|
{posterpath} absolute path of scraped poster
|
||||||
|
{hasbanner} true if a scraped banner is available for this element
|
||||||
|
{bannerwidth} width of scraped banner
|
||||||
|
{bannerheight} height of scraped banner
|
||||||
|
{bannerpath} absolute path of scraped banner
|
||||||
-->
|
-->
|
||||||
<currentelement delay="500" fadetime="0">
|
<currentelement delay="500" fadetime="0">
|
||||||
</currentelement>
|
</currentelement>
|
||||||
|
@ -78,6 +78,10 @@
|
|||||||
{posterwidth} width of scraped poster
|
{posterwidth} width of scraped poster
|
||||||
{posterheight} height of scraped poster
|
{posterheight} height of scraped poster
|
||||||
{posterpath} absolute path of scraped poster
|
{posterpath} absolute path of scraped poster
|
||||||
|
{hasbanner} true if a scraped banner is available for this element
|
||||||
|
{bannerwidth} width of scraped banner
|
||||||
|
{bannerheight} height of scraped banner
|
||||||
|
{bannerpath} absolute path of scraped banner
|
||||||
{timerpartitial} true if partitial timer is set for the event
|
{timerpartitial} true if partitial timer is set for the event
|
||||||
{timerfull} true if full timer is set for the event
|
{timerfull} true if full timer is set for the event
|
||||||
{whatson} true if menu "What's on" is displayed
|
{whatson} true if menu "What's on" is displayed
|
||||||
|
@ -32,23 +32,71 @@ void cDisplayMenuItemCurrentView::SetScraperPoster(const cEvent *event, const cR
|
|||||||
intTokens.insert(pair<string,int>("posterwidth", -1));
|
intTokens.insert(pair<string,int>("posterwidth", -1));
|
||||||
intTokens.insert(pair<string,int>("posterheight", -1));
|
intTokens.insert(pair<string,int>("posterheight", -1));
|
||||||
stringTokens.insert(pair<string,string>("posterpath", ""));
|
stringTokens.insert(pair<string,string>("posterpath", ""));
|
||||||
|
intTokens.insert(pair<string,int>("hasbanner", false));
|
||||||
|
intTokens.insert(pair<string,int>("bannerwidth", -1));
|
||||||
|
intTokens.insert(pair<string,int>("bannerheight", -1));
|
||||||
|
stringTokens.insert(pair<string,string>("bannerpath", ""));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ScraperGetPoster call;
|
ScraperGetEventType getType;
|
||||||
call.event = event;
|
getType.event = event;
|
||||||
call.recording = recording;
|
getType.recording = recording;
|
||||||
if (pScraper->Service("GetPoster", &call)) {
|
if (!pScraper->Service("GetEventType", &getType)) {
|
||||||
intTokens.insert(pair<string,int>("hasposter", FileExists(call.poster.path)));
|
intTokens.insert(pair<string,int>("hasposter", false));
|
||||||
intTokens.insert(pair<string,int>("posterwidth", call.poster.width));
|
intTokens.insert(pair<string,int>("posterwidth", -1));
|
||||||
intTokens.insert(pair<string,int>("posterheight", call.poster.height));
|
intTokens.insert(pair<string,int>("posterheight", -1));
|
||||||
stringTokens.insert(pair<string,string>("posterpath", call.poster.path));
|
stringTokens.insert(pair<string,string>("posterpath", ""));
|
||||||
|
intTokens.insert(pair<string,int>("hasbanner", false));
|
||||||
|
intTokens.insert(pair<string,int>("bannerwidth", -1));
|
||||||
|
intTokens.insert(pair<string,int>("bannerheight", -1));
|
||||||
|
stringTokens.insert(pair<string,string>("bannerpath", ""));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getType.type == tMovie) {
|
||||||
|
cMovie movie;
|
||||||
|
movie.movieId = getType.movieId;
|
||||||
|
pScraper->Service("GetMovie", &movie);
|
||||||
|
intTokens.insert(pair<string,int>("hasposter", true));
|
||||||
|
stringTokens.insert(pair<string,string>("posterpath", movie.poster.path));
|
||||||
|
intTokens.insert(pair<string,int>("posterwidth", movie.poster.width));
|
||||||
|
intTokens.insert(pair<string,int>("posterheight", movie.poster.height));
|
||||||
|
intTokens.insert(pair<string,int>("hasbanner", false));
|
||||||
|
intTokens.insert(pair<string,int>("bannerwidth", -1));
|
||||||
|
intTokens.insert(pair<string,int>("bannerheight", -1));
|
||||||
|
stringTokens.insert(pair<string,string>("bannerpath", ""));
|
||||||
|
} else if (getType.type == tSeries) {
|
||||||
|
cSeries series;
|
||||||
|
series.seriesId = getType.seriesId;
|
||||||
|
series.episodeId = getType.episodeId;
|
||||||
|
pScraper->Service("GetSeries", &series);
|
||||||
|
//Poster
|
||||||
|
if (series.posters.size() > 0) {
|
||||||
|
intTokens.insert(pair<string,int>("hasposter", true));
|
||||||
|
intTokens.insert(pair<string,int>("posterwidth", series.posters[0].width));
|
||||||
|
intTokens.insert(pair<string,int>("posterheight", series.posters[0].height));
|
||||||
|
stringTokens.insert(pair<string,string>("posterpath", series.posters[0].path));
|
||||||
} else {
|
} else {
|
||||||
intTokens.insert(pair<string,int>("hasposter", false));
|
intTokens.insert(pair<string,int>("hasposter", false));
|
||||||
intTokens.insert(pair<string,int>("posterwidth", -1));
|
intTokens.insert(pair<string,int>("posterwidth", -1));
|
||||||
intTokens.insert(pair<string,int>("posterheight", -1));
|
intTokens.insert(pair<string,int>("posterheight", -1));
|
||||||
stringTokens.insert(pair<string,string>("posterpath", ""));
|
stringTokens.insert(pair<string,string>("posterpath", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Banners
|
||||||
|
if (series.banners.size() > 0) {
|
||||||
|
intTokens.insert(pair<string,int>("hasbanner", true));
|
||||||
|
intTokens.insert(pair<string,int>("bannerwidth", series.banners[0].width));
|
||||||
|
intTokens.insert(pair<string,int>("bannerheight", series.banners[0].height));
|
||||||
|
stringTokens.insert(pair<string,string>("bannerpath", series.banners[0].path));
|
||||||
|
} else {
|
||||||
|
intTokens.insert(pair<string,int>("hasbanner", false));
|
||||||
|
intTokens.insert(pair<string,int>("bannerwidth", -1));
|
||||||
|
intTokens.insert(pair<string,int>("bannerheight", -1));
|
||||||
|
stringTokens.insert(pair<string,string>("bannerpath", ""));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
|
Loading…
x
Reference in New Issue
Block a user