mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
added dedicated tokens for posters and banners in <srapercontent> in displaychannel and displayreplay
This commit is contained in:
parent
cf44f2cf4c
commit
7e7d7c994c
1
HISTORY
1
HISTORY
@ -55,4 +55,5 @@ Version 0.0.3
|
|||||||
menuorg plugin)
|
menuorg plugin)
|
||||||
- fixed Bug with menuselection Patch
|
- fixed Bug with menuselection Patch
|
||||||
- added tokens {month}, {monthname} and {year} in displaymenutimers listitem and currentitem
|
- added tokens {month}, {monthname} and {year} in displaymenutimers listitem and currentitem
|
||||||
|
- added dedicated tokens for posters and banners in <srapercontent> in displaychannel and displayreplay
|
||||||
|
|
||||||
|
@ -209,6 +209,16 @@
|
|||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
<!-- Available Variables scrapercontent:
|
<!-- Available Variables scrapercontent:
|
||||||
|
{posterpath} Full Path of Poster to use in image path attribute
|
||||||
|
{posterwidth} width of poster in pixel
|
||||||
|
{posterheight} height of poster in pixel
|
||||||
|
{hasPoster} true if poster is available
|
||||||
|
{bannerpath} Full Path of banner to use in image path attribute
|
||||||
|
{bannerwidth} width of banner in pixel
|
||||||
|
{bannerheight} height of banner in pixel
|
||||||
|
{hasBanner} true if banner is available
|
||||||
|
|
||||||
|
Use this tokens if you want to display a banner for series and a poster for movies:
|
||||||
{mediapath} Full Path of Poster or Banner to use in image path attribute
|
{mediapath} Full Path of Poster or Banner to use in image path attribute
|
||||||
{mediawidth} width of image in pixel
|
{mediawidth} width of image in pixel
|
||||||
{mediaheight} height of image in pixel
|
{mediaheight} height of image in pixel
|
||||||
|
@ -48,6 +48,16 @@
|
|||||||
</datetime>
|
</datetime>
|
||||||
|
|
||||||
<!-- Available Variables scrapercontent:
|
<!-- Available Variables scrapercontent:
|
||||||
|
{posterpath} Full Path of Poster to use in image path attribute
|
||||||
|
{posterwidth} width of poster in pixel
|
||||||
|
{posterheight} height of poster in pixel
|
||||||
|
{hasPoster} true if poster is available
|
||||||
|
{bannerpath} Full Path of banner to use in image path attribute
|
||||||
|
{bannerwidth} width of banner in pixel
|
||||||
|
{bannerheight} height of banner in pixel
|
||||||
|
{hasBanner} true if banner is available
|
||||||
|
|
||||||
|
Use this tokens if you want to display a banner for series and a poster for movies:
|
||||||
{mediapath} Full Path of Poster or Banner to use in image path attribute
|
{mediapath} Full Path of Poster or Banner to use in image path attribute
|
||||||
{mediawidth} width of image in pixel
|
{mediawidth} width of image in pixel
|
||||||
{mediaheight} height of image in pixel
|
{mediaheight} height of image in pixel
|
||||||
|
@ -126,6 +126,16 @@
|
|||||||
</devices>
|
</devices>
|
||||||
|
|
||||||
<!-- Available Variables scrapercontent:
|
<!-- Available Variables scrapercontent:
|
||||||
|
{posterpath} Full Path of Poster to use in image path attribute
|
||||||
|
{posterwidth} width of poster in pixel
|
||||||
|
{posterheight} height of poster in pixel
|
||||||
|
{hasPoster} true if poster is available
|
||||||
|
{bannerpath} Full Path of banner to use in image path attribute
|
||||||
|
{bannerwidth} width of banner in pixel
|
||||||
|
{bannerheight} height of banner in pixel
|
||||||
|
{hasBanner} true if banner is available
|
||||||
|
|
||||||
|
Use this tokens if you want to display a banner for series and a poster for movies:
|
||||||
{mediapath} Full Path of Poster or Banner to use in image path attribute
|
{mediapath} Full Path of Poster or Banner to use in image path attribute
|
||||||
{mediawidth} width of image in pixel
|
{mediawidth} width of image in pixel
|
||||||
{mediaheight} height of image in pixel
|
{mediaheight} height of image in pixel
|
||||||
|
@ -24,6 +24,16 @@
|
|||||||
</datetime>
|
</datetime>
|
||||||
|
|
||||||
<!-- Available Variables scrapercontent:
|
<!-- Available Variables scrapercontent:
|
||||||
|
{posterpath} Full Path of Poster to use in image path attribute
|
||||||
|
{posterwidth} width of poster in pixel
|
||||||
|
{posterheight} height of poster in pixel
|
||||||
|
{hasPoster} true if poster is available
|
||||||
|
{bannerpath} Full Path of banner to use in image path attribute
|
||||||
|
{bannerwidth} width of banner in pixel
|
||||||
|
{bannerheight} height of banner in pixel
|
||||||
|
{hasBanner} true if banner is available
|
||||||
|
|
||||||
|
Use this tokens if you want to display a banner for series and a poster for movies:
|
||||||
{mediapath} Full Path of Poster or Banner to use in image path attribute
|
{mediapath} Full Path of Poster or Banner to use in image path attribute
|
||||||
{mediawidth} width of image in pixel
|
{mediawidth} width of image in pixel
|
||||||
{mediaheight} height of image in pixel
|
{mediaheight} height of image in pixel
|
||||||
|
@ -328,18 +328,44 @@ void cDisplayChannelView::DrawScraperContent(const cEvent *event) {
|
|||||||
if (pScraper->Service("GetPosterBanner", &call)) {
|
if (pScraper->Service("GetPosterBanner", &call)) {
|
||||||
int mediaWidth = 0;
|
int mediaWidth = 0;
|
||||||
int mediaHeight = 0;
|
int mediaHeight = 0;
|
||||||
std::string mediaPath = "";
|
string mediaPath = "";
|
||||||
bool isBanner = false;
|
bool isBanner = false;
|
||||||
|
int posterWidth = 0;
|
||||||
|
int posterHeight = 0;
|
||||||
|
string posterPath = "";
|
||||||
|
bool hasPoster = false;
|
||||||
|
int bannerWidth = 0;
|
||||||
|
int bannerHeight = 0;
|
||||||
|
string bannerPath = "";
|
||||||
|
bool hasBanner = false;
|
||||||
|
|
||||||
if ((call.type == tSeries) && call.banner.path.size() > 0) {
|
if ((call.type == tSeries) && call.banner.path.size() > 0) {
|
||||||
mediaWidth = call.banner.width;
|
mediaWidth = call.banner.width;
|
||||||
mediaHeight = call.banner.height;
|
mediaHeight = call.banner.height;
|
||||||
mediaPath = call.banner.path;
|
mediaPath = call.banner.path;
|
||||||
isBanner = true;
|
isBanner = true;
|
||||||
|
bannerWidth = mediaWidth;
|
||||||
|
bannerHeight = mediaHeight;
|
||||||
|
bannerPath = mediaPath;
|
||||||
|
hasBanner = true;
|
||||||
|
|
||||||
|
ScraperGetPoster callPoster;
|
||||||
|
callPoster.event = event;
|
||||||
|
callPoster.recording = NULL;
|
||||||
|
if (pScraper->Service("GetPoster", &callPoster)) {
|
||||||
|
posterWidth = callPoster.poster.width;
|
||||||
|
posterHeight = callPoster.poster.height;
|
||||||
|
posterPath = callPoster.poster.path;
|
||||||
|
hasPoster = true;
|
||||||
|
}
|
||||||
} else if (call.type == tMovie && call.poster.path.size() > 0 && call.poster.height > 0) {
|
} else if (call.type == tMovie && call.poster.path.size() > 0 && call.poster.height > 0) {
|
||||||
mediaWidth = call.poster.width;
|
mediaWidth = call.poster.width;
|
||||||
mediaHeight = call.poster.height;
|
mediaHeight = call.poster.height;
|
||||||
mediaPath = call.poster.path;
|
mediaPath = call.poster.path;
|
||||||
|
posterWidth = call.poster.width;
|
||||||
|
posterHeight = call.poster.height;
|
||||||
|
posterPath = call.poster.path;
|
||||||
|
hasPoster = true;
|
||||||
} else
|
} else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -349,6 +375,14 @@ void cDisplayChannelView::DrawScraperContent(const cEvent *event) {
|
|||||||
intTokens.insert(pair<string,int>("mediaheight", mediaHeight));
|
intTokens.insert(pair<string,int>("mediaheight", mediaHeight));
|
||||||
intTokens.insert(pair<string,int>("isbanner", isBanner));
|
intTokens.insert(pair<string,int>("isbanner", isBanner));
|
||||||
stringTokens.insert(pair<string,string>("mediapath", mediaPath));
|
stringTokens.insert(pair<string,string>("mediapath", mediaPath));
|
||||||
|
intTokens.insert(pair<string,int>("posterwidth", posterWidth));
|
||||||
|
intTokens.insert(pair<string,int>("posterheight", posterHeight));
|
||||||
|
stringTokens.insert(pair<string,string>("posterpath", posterPath));
|
||||||
|
intTokens.insert(pair<string,int>("hasposter", hasPoster));
|
||||||
|
intTokens.insert(pair<string,int>("bannerwidth", bannerWidth));
|
||||||
|
intTokens.insert(pair<string,int>("bannerheight", bannerHeight));
|
||||||
|
stringTokens.insert(pair<string,string>("bannerpath", bannerPath));
|
||||||
|
intTokens.insert(pair<string,int>("hasbanner", hasBanner));
|
||||||
ClearViewElement(veScraperContent);
|
ClearViewElement(veScraperContent);
|
||||||
DrawViewElement(veScraperContent, &stringTokens, &intTokens);
|
DrawViewElement(veScraperContent, &stringTokens, &intTokens);
|
||||||
}
|
}
|
||||||
|
@ -141,18 +141,44 @@ void cDisplayReplayView::DrawScraperContent(const cRecording *recording) {
|
|||||||
if (pScraper->Service("GetPosterBannerV2", &call)) {
|
if (pScraper->Service("GetPosterBannerV2", &call)) {
|
||||||
int mediaWidth = 0;
|
int mediaWidth = 0;
|
||||||
int mediaHeight = 0;
|
int mediaHeight = 0;
|
||||||
std::string mediaPath = "";
|
string mediaPath = "";
|
||||||
bool isBanner = false;
|
bool isBanner = false;
|
||||||
|
int posterWidth = 0;
|
||||||
|
int posterHeight = 0;
|
||||||
|
string posterPath = "";
|
||||||
|
bool hasPoster = false;
|
||||||
|
int bannerWidth = 0;
|
||||||
|
int bannerHeight = 0;
|
||||||
|
string bannerPath = "";
|
||||||
|
bool hasBanner = false;
|
||||||
|
|
||||||
if ((call.type == tSeries) && call.banner.path.size() > 0) {
|
if ((call.type == tSeries) && call.banner.path.size() > 0) {
|
||||||
mediaWidth = call.banner.width;
|
mediaWidth = call.banner.width;
|
||||||
mediaHeight = call.banner.height;
|
mediaHeight = call.banner.height;
|
||||||
mediaPath = call.banner.path;
|
mediaPath = call.banner.path;
|
||||||
isBanner = true;
|
isBanner = true;
|
||||||
|
bannerWidth = mediaWidth;
|
||||||
|
bannerHeight = mediaHeight;
|
||||||
|
bannerPath = mediaPath;
|
||||||
|
hasBanner = true;
|
||||||
|
|
||||||
|
ScraperGetPoster callPoster;
|
||||||
|
callPoster.event = NULL;
|
||||||
|
callPoster.recording = recording;
|
||||||
|
if (pScraper->Service("GetPoster", &callPoster)) {
|
||||||
|
posterWidth = callPoster.poster.width;
|
||||||
|
posterHeight = callPoster.poster.height;
|
||||||
|
posterPath = callPoster.poster.path;
|
||||||
|
hasPoster = true;
|
||||||
|
}
|
||||||
} else if (call.type == tMovie && call.poster.path.size() > 0 && call.poster.height > 0) {
|
} else if (call.type == tMovie && call.poster.path.size() > 0 && call.poster.height > 0) {
|
||||||
mediaWidth = call.poster.width;
|
mediaWidth = call.poster.width;
|
||||||
mediaHeight = call.poster.height;
|
mediaHeight = call.poster.height;
|
||||||
mediaPath = call.poster.path;
|
mediaPath = call.poster.path;
|
||||||
|
posterWidth = call.poster.width;
|
||||||
|
posterHeight = call.poster.height;
|
||||||
|
posterPath = call.poster.path;
|
||||||
|
hasPoster = true;
|
||||||
} else
|
} else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -162,6 +188,14 @@ void cDisplayReplayView::DrawScraperContent(const cRecording *recording) {
|
|||||||
intTokens.insert(pair<string,int>("mediaheight", mediaHeight));
|
intTokens.insert(pair<string,int>("mediaheight", mediaHeight));
|
||||||
intTokens.insert(pair<string,int>("isbanner", isBanner));
|
intTokens.insert(pair<string,int>("isbanner", isBanner));
|
||||||
stringTokens.insert(pair<string,string>("mediapath", mediaPath));
|
stringTokens.insert(pair<string,string>("mediapath", mediaPath));
|
||||||
|
intTokens.insert(pair<string,int>("posterwidth", posterWidth));
|
||||||
|
intTokens.insert(pair<string,int>("posterheight", posterHeight));
|
||||||
|
stringTokens.insert(pair<string,string>("posterpath", posterPath));
|
||||||
|
intTokens.insert(pair<string,int>("hasposter", hasPoster));
|
||||||
|
intTokens.insert(pair<string,int>("bannerwidth", bannerWidth));
|
||||||
|
intTokens.insert(pair<string,int>("bannerheight", bannerHeight));
|
||||||
|
stringTokens.insert(pair<string,string>("bannerpath", bannerPath));
|
||||||
|
intTokens.insert(pair<string,int>("hasbanner", hasBanner));
|
||||||
ClearViewElement(veScraperContent);
|
ClearViewElement(veScraperContent);
|
||||||
DrawViewElement(veScraperContent, &stringTokens, &intTokens);
|
DrawViewElement(veScraperContent, &stringTokens, &intTokens);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user