diff options
author | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2014-05-18 14:34:45 +0200 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2014-05-18 14:34:45 +0200 |
commit | 1271728831c84ae458720dc0f659ef23f18aadd8 (patch) | |
tree | 1d3342a4558c9111bcdbce20b3a01b244e9994ec /displaychannel.c | |
parent | 19235b742a8aa6b02cce98325945ca79e72feca1 (diff) | |
download | skin-flatplus-1271728831c84ae458720dc0f659ef23f18aadd8.tar.gz skin-flatplus-1271728831c84ae458720dc0f659ef23f18aadd8.tar.bz2 |
new tvscraper service api. Use only with new tvscraper version 0.2.0 or greater!
Diffstat (limited to 'displaychannel.c')
-rw-r--r-- | displaychannel.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/displaychannel.c b/displaychannel.c index 1301efcb..b06ec3f7 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -439,12 +439,14 @@ void cFlatDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Followi int mediaHeight = 0; // TVScraper - static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper"); - static cPlugin *pScraper2Vdr = cPluginManager::GetPlugin("scraper2vdr"); - if( Config.TVScraperChanInfoShowPoster && pScraper2Vdr ) { + // first try scraper2vdr + static cPlugin *pScraper = cPluginManager::GetPlugin("scraper2vdr"); + if( !pScraper ) // if it doesn't exit, try tvscraper + pScraper = cPluginManager::GetPlugin("tvscraper"); + if( Config.TVScraperChanInfoShowPoster && pScraper ) { ScraperGetPosterBanner call; call.event = Present; - if (pScraper2Vdr->Service("GetPosterBanner", &call)) { + if (pScraper->Service("GetPosterBanner", &call)) { if ((call.type == tSeries) && call.banner.path.size() > 0) { mediaWidth = call.banner.width * Config.TVScraperChanInfoPosterSize*100; mediaHeight = call.banner.height * Config.TVScraperChanInfoPosterSize*100; @@ -455,19 +457,6 @@ void cFlatDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Followi mediaPath = call.poster.path; } } - } else if( Config.TVScraperChanInfoShowPoster && pTVScraper ) { - TVScraperGetPosterOrBanner call; - call.event = Present; - if (pTVScraper->Service("TVScraperGetPosterOrBanner", &call)) { - if (call.type == typeSeries) { - mediaWidth = call.media.width * Config.TVScraperChanInfoPosterSize*100; - mediaHeight = call.media.height * Config.TVScraperChanInfoPosterSize*100; - } else if (call.type == typeMovie) { - mediaWidth = call.media.width * 0.5 * Config.TVScraperChanInfoPosterSize*100; - mediaHeight = call.media.height * 0.5 * Config.TVScraperChanInfoPosterSize*100; - } - mediaPath = call.media.path; - } } chanEpgImagesPixmap->Fill(clrTransparent); |