diff options
Diffstat (limited to 'displaychannelview.c')
-rw-r--r-- | displaychannelview.c | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/displaychannelview.c b/displaychannelview.c index 68a213a..078f003 100644 --- a/displaychannelview.c +++ b/displaychannelview.c @@ -1,4 +1,3 @@ -#include "services/tvscraper.h" #include "services/scraper2vdr.h" #include "displaychannelview.h" #include "config.h" @@ -577,11 +576,11 @@ void cNopacityDisplayChannelView::DrawPoster(const cEvent *event, bool initial) pixmapPoster = NULL; } - static cPlugin *pScraper2Vdr = cPluginManager::GetPlugin("scraper2vdr"); - if (pScraper2Vdr) { + static cPlugin *pScraper = GetScraperPlugin(); + if (pScraper) { ScraperGetPosterBanner call; call.event = event; - if (pScraper2Vdr->Service("GetPosterBanner", &call)) { + if (pScraper->Service("GetPosterBanner", &call)) { int mediaWidth = 0; int mediaHeight = 0; std::string mediaPath = ""; @@ -614,39 +613,6 @@ void cNopacityDisplayChannelView::DrawPoster(const cEvent *event, bool initial) } return; } - - static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper"); - if (pTVScraper) { - TVScraperGetPosterOrBanner call; - call.event = event; - if (pTVScraper->Service("TVScraperGetPosterOrBanner", &call)) { - int mediaWidth = 0; - int mediaHeight = 0; - if (call.type == typeSeries) { - mediaWidth = call.media.width; - mediaHeight = call.media.height; - } else if (call.type == typeMovie) { - double ratio = (double)(cOsd::OsdHeight()/3) / (double)call.media.height; - mediaWidth = ratio * call.media.width; - mediaHeight = ratio * call.media.height; - } - int border = config.GetValue("channelPosterBorder"); - pixmapPoster = osd->CreatePixmap(1, cRect(config.GetValue("channelBorderVertical"), - config.GetValue("channelBorderBottom"), - mediaWidth + 2 * border, - mediaHeight + 2 * border)); - if (initial && config.GetValue("channelFadeTime")) - pixmapPoster->SetAlpha(0); - cImageLoader imgLoader; - if (imgLoader.LoadPoster(call.media.path.c_str(), mediaWidth, mediaHeight)) { - pixmapPoster->Fill(Theme.Color(clrChannelBackground)); - pixmapPoster->DrawImage(cPoint(border, border), imgLoader.GetImage()); - DrawRoundedCorners(pixmapPoster, border, 0, 0, pixmapPoster->ViewPort().Width(), pixmapPoster->ViewPort().Height()); - } else { - pixmapPoster->Fill(clrTransparent); - } - } - } } void cNopacityDisplayChannelView::DrawSignalMeter(void) { |