Merge branch 'master' of git://projects.vdr-developer.org/vdr-plugin-skindesigner

This commit is contained in:
Manuel Reimer 2014-11-07 17:22:12 +01:00
commit a1ec8cc283
11 changed files with 158 additions and 2 deletions

View File

@ -54,4 +54,6 @@ Version 0.0.3
- fixed Bug that displaychannel was not shown after closing displaymenu with "backspace" (with active
menuorg plugin)
- fixed Bug with menuselection Patch
- added tokens {month}, {monthname} and {year} in displaymenutimers listitem and currentitem
- added dedicated tokens for posters and banners in <srapercontent> in displaychannel and displayreplay

View File

@ -209,6 +209,16 @@
</devices>
<!-- 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
{mediawidth} width of image in pixel
{mediaheight} height of image in pixel

View File

@ -7,6 +7,9 @@
{timerstop} End Time of Timer in hh::mm
{day} Day (numerical)
{dayname} Day, for repeating timers days where timer is active
{month} Month (two digits)
{monthname} Month, three letter abbrevation
{year} Year (4 digits)
{channelname} Name of channel which is set for the timer
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
{channelnumber} Number of channel which is set for the timer
@ -42,6 +45,9 @@
{timerstop} End Time of Timer in hh::mm
{day} Day (numerical)
{dayname} Day, for repeating timers days where timer is active
{month} Month (two digits)
{monthname} Month, three letter abbrevation
{year} Year (4 digits)
{channelname} Name of channel which is set for the timer
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
{channelnumber} Number of channel which is set for the timer

View File

@ -48,6 +48,16 @@
</datetime>
<!-- 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
{mediawidth} width of image in pixel
{mediaheight} height of image in pixel

View File

@ -126,6 +126,16 @@
</devices>
<!-- 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
{mediawidth} width of image in pixel
{mediaheight} height of image in pixel

View File

@ -7,6 +7,9 @@
{timerstop} End Time of Timer in hh::mm
{day} Day (numerical)
{dayname} Day, for repeating timers days where timer is active
{month} Month (two digits)
{monthname} Month, three letter abbrevation
{year} Year (4 digits)
{channelname} Name of channel which is set for the timer
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
{channelnumber} Number of channel which is set for the timer
@ -33,6 +36,9 @@
{timerstop} End Time of Timer in hh::mm
{day} Day (numerical)
{dayname} Day, for repeating timers days where timer is active
{month} Month (two digits)
{monthname} Month, three letter abbrevation
{year} Year (4 digits)#
{channelname} Name of channel which is set for the timer
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
{channelnumber} Number of channel which is set for the timer

View File

@ -24,6 +24,16 @@
</datetime>
<!-- 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
{mediawidth} width of image in pixel
{mediaheight} height of image in pixel

View File

@ -328,18 +328,44 @@ void cDisplayChannelView::DrawScraperContent(const cEvent *event) {
if (pScraper->Service("GetPosterBanner", &call)) {
int mediaWidth = 0;
int mediaHeight = 0;
std::string mediaPath = "";
string mediaPath = "";
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) {
mediaWidth = call.banner.width;
mediaHeight = call.banner.height;
mediaPath = call.banner.path;
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) {
mediaWidth = call.poster.width;
mediaHeight = call.poster.height;
mediaPath = call.poster.path;
posterWidth = call.poster.width;
posterHeight = call.poster.height;
posterPath = call.poster.path;
hasPoster = true;
} else
return;
@ -349,6 +375,14 @@ void cDisplayChannelView::DrawScraperContent(const cEvent *event) {
intTokens.insert(pair<string,int>("mediaheight", mediaHeight));
intTokens.insert(pair<string,int>("isbanner", isBanner));
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);
DrawViewElement(veScraperContent, &stringTokens, &intTokens);
}

View File

@ -433,8 +433,25 @@ void cDisplayMenuItemCurrentTimerView::Render(void) {
strftime(buffer, sizeof(buffer), "%Y%m%d", &tm_r);
day = buffer;
}
struct tm tm_r;
time_t timerDate = timer->Day();
localtime_r(&timerDate, &tm_r);
char buffer[4];
strftime(buffer, sizeof(buffer), "%m", &tm_r);
int month = atoi(buffer);
char buffer2[6];
strftime(buffer2, sizeof(buffer2), "%b", &tm_r);
string monthName = buffer2;
char buffer3[6];
strftime(buffer3, sizeof(buffer3), "%Y", &tm_r);
int year = atoi(buffer3);
stringTokens.insert(pair<string,string>("day", day));
stringTokens.insert(pair<string,string>("dayname", dayName));
intTokens.insert(pair<string,int>("month", month));
stringTokens.insert(pair<string,string>("monthname", monthName));
intTokens.insert(pair<string,int>("year", year));
const cChannel *channel = timer->Channel();
if (channel) {

View File

@ -537,8 +537,25 @@ void cDisplayMenuItemTimersView::SetTokens(void) {
strftime(buffer, sizeof(buffer), "%Y%m%d", &tm_r);
day = buffer;
}
struct tm tm_r;
time_t timerDate = timer->Day();
localtime_r(&timerDate, &tm_r);
char buffer[4];
strftime(buffer, sizeof(buffer), "%m", &tm_r);
int month = atoi(buffer);
char buffer2[6];
strftime(buffer2, sizeof(buffer2), "%b", &tm_r);
string monthName = buffer2;
char buffer3[6];
strftime(buffer3, sizeof(buffer3), "%Y", &tm_r);
int year = atoi(buffer3);
stringTokens.insert(pair<string,string>("day", day));
stringTokens.insert(pair<string,string>("dayname", dayName));
intTokens.insert(pair<string,int>("month", month));
stringTokens.insert(pair<string,string>("monthname", monthName));
intTokens.insert(pair<string,int>("year", year));
const cChannel *channel = timer->Channel();
if (channel) {

View File

@ -141,18 +141,44 @@ void cDisplayReplayView::DrawScraperContent(const cRecording *recording) {
if (pScraper->Service("GetPosterBannerV2", &call)) {
int mediaWidth = 0;
int mediaHeight = 0;
std::string mediaPath = "";
string mediaPath = "";
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) {
mediaWidth = call.banner.width;
mediaHeight = call.banner.height;
mediaPath = call.banner.path;
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) {
mediaWidth = call.poster.width;
mediaHeight = call.poster.height;
mediaPath = call.poster.path;
posterWidth = call.poster.width;
posterHeight = call.poster.height;
posterPath = call.poster.path;
hasPoster = true;
} else
return;
@ -162,6 +188,14 @@ void cDisplayReplayView::DrawScraperContent(const cRecording *recording) {
intTokens.insert(pair<string,int>("mediaheight", mediaHeight));
intTokens.insert(pair<string,int>("isbanner", isBanner));
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);
DrawViewElement(veScraperContent, &stringTokens, &intTokens);
}