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
|
||||
- fixed memory leak when creating fonts
|
||||
- fixed crash using animated images in plugins
|
||||
|
||||
- added banner to displaymenuschedulescurrentview and
|
||||
displaymenureplaycurrentview
|
||||
|
@ -56,7 +56,8 @@
|
||||
{durationminutes} real duration, rest of minutes
|
||||
{durationevent} duration of corresponding event in minutes
|
||||
{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
|
||||
{folder} true if item is a folder
|
||||
{numrecordingsfolder} if item is a folder, number of recordings in this folder
|
||||
@ -65,6 +66,10 @@
|
||||
{posterwidth} width of scraped poster
|
||||
{posterheight} height 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>
|
||||
|
@ -78,6 +78,10 @@
|
||||
{posterwidth} width of scraped poster
|
||||
{posterheight} height 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
|
||||
{timerfull} true if full timer is set for the event
|
||||
{whatson} true if menu "What's on" is displayed
|
||||
|
@ -32,22 +32,70 @@ void cDisplayMenuItemCurrentView::SetScraperPoster(const cEvent *event, const cR
|
||||
intTokens.insert(pair<string,int>("posterwidth", -1));
|
||||
intTokens.insert(pair<string,int>("posterheight", -1));
|
||||
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;
|
||||
}
|
||||
|
||||
ScraperGetPoster call;
|
||||
call.event = event;
|
||||
call.recording = recording;
|
||||
if (pScraper->Service("GetPoster", &call)) {
|
||||
intTokens.insert(pair<string,int>("hasposter", FileExists(call.poster.path)));
|
||||
intTokens.insert(pair<string,int>("posterwidth", call.poster.width));
|
||||
intTokens.insert(pair<string,int>("posterheight", call.poster.height));
|
||||
stringTokens.insert(pair<string,string>("posterpath", call.poster.path));
|
||||
} else {
|
||||
ScraperGetEventType getType;
|
||||
getType.event = event;
|
||||
getType.recording = recording;
|
||||
if (!pScraper->Service("GetEventType", &getType)) {
|
||||
intTokens.insert(pair<string,int>("hasposter", false));
|
||||
intTokens.insert(pair<string,int>("posterwidth", -1));
|
||||
intTokens.insert(pair<string,int>("posterheight", -1));
|
||||
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 {
|
||||
intTokens.insert(pair<string,int>("hasposter", false));
|
||||
intTokens.insert(pair<string,int>("posterwidth", -1));
|
||||
intTokens.insert(pair<string,int>("posterheight", -1));
|
||||
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…
Reference in New Issue
Block a user