mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
Merge branch 'master' of git://projects.vdr-developer.org/vdr-plugin-skindesigner
This commit is contained in:
commit
a1ec8cc283
2
HISTORY
2
HISTORY
@ -54,4 +54,6 @@ Version 0.0.3
|
|||||||
- fixed Bug that displaychannel was not shown after closing displaymenu with "backspace" (with active
|
- fixed Bug that displaychannel was not shown after closing displaymenu with "backspace" (with active
|
||||||
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 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
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
{timerstop} End Time of Timer in hh::mm
|
{timerstop} End Time of Timer in hh::mm
|
||||||
{day} Day (numerical)
|
{day} Day (numerical)
|
||||||
{dayname} Day, for repeating timers days where timer is active
|
{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
|
{channelname} Name of channel which is set for the timer
|
||||||
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
|
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
|
||||||
{channelnumber} Number of channel which is set for the timer
|
{channelnumber} Number of channel which is set for the timer
|
||||||
@ -42,6 +45,9 @@
|
|||||||
{timerstop} End Time of Timer in hh::mm
|
{timerstop} End Time of Timer in hh::mm
|
||||||
{day} Day (numerical)
|
{day} Day (numerical)
|
||||||
{dayname} Day, for repeating timers days where timer is active
|
{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
|
{channelname} Name of channel which is set for the timer
|
||||||
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
|
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
|
||||||
{channelnumber} Number of channel which is set for the timer
|
{channelnumber} Number of channel which is set for the timer
|
||||||
|
@ -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
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
{timerstop} End Time of Timer in hh::mm
|
{timerstop} End Time of Timer in hh::mm
|
||||||
{day} Day (numerical)
|
{day} Day (numerical)
|
||||||
{dayname} Day, for repeating timers days where timer is active
|
{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
|
{channelname} Name of channel which is set for the timer
|
||||||
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
|
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
|
||||||
{channelnumber} Number of channel which is set for the timer
|
{channelnumber} Number of channel which is set for the timer
|
||||||
@ -33,6 +36,9 @@
|
|||||||
{timerstop} End Time of Timer in hh::mm
|
{timerstop} End Time of Timer in hh::mm
|
||||||
{day} Day (numerical)
|
{day} Day (numerical)
|
||||||
{dayname} Day, for repeating timers days where timer is active
|
{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
|
{channelname} Name of channel which is set for the timer
|
||||||
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
|
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
|
||||||
{channelnumber} Number of channel which is set for the timer
|
{channelnumber} Number of channel which is set for the timer
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -433,8 +433,25 @@ void cDisplayMenuItemCurrentTimerView::Render(void) {
|
|||||||
strftime(buffer, sizeof(buffer), "%Y%m%d", &tm_r);
|
strftime(buffer, sizeof(buffer), "%Y%m%d", &tm_r);
|
||||||
day = buffer;
|
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>("day", day));
|
||||||
stringTokens.insert(pair<string,string>("dayname", dayName));
|
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();
|
const cChannel *channel = timer->Channel();
|
||||||
if (channel) {
|
if (channel) {
|
||||||
|
@ -537,8 +537,25 @@ void cDisplayMenuItemTimersView::SetTokens(void) {
|
|||||||
strftime(buffer, sizeof(buffer), "%Y%m%d", &tm_r);
|
strftime(buffer, sizeof(buffer), "%Y%m%d", &tm_r);
|
||||||
day = buffer;
|
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>("day", day));
|
||||||
stringTokens.insert(pair<string,string>("dayname", dayName));
|
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();
|
const cChannel *channel = timer->Channel();
|
||||||
if (channel) {
|
if (channel) {
|
||||||
|
@ -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