diff options
author | louis <louis.braun@gmx.de> | 2014-05-24 16:59:29 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-05-24 16:59:29 +0200 |
commit | ad4b1f3017d65ecb92b7c5c41ad131c3e0743159 (patch) | |
tree | 5757c11a7f42b4e71a41c7a9fafa1c2b10cdfb13 /textwindow.c | |
parent | dc67dd4d443273119e9dfdf637b93a3c3900b570 (diff) | |
download | skin-nopacity-ad4b1f3017d65ecb92b7c5c41ad131c3e0743159.tar.gz skin-nopacity-ad4b1f3017d65ecb92b7c5c41ad131c3e0743159.tar.bz2 |
added support for tvscraper again, tvscraper Version 0.2.0 needed
Diffstat (limited to 'textwindow.c')
-rw-r--r-- | textwindow.c | 42 |
1 files changed, 3 insertions, 39 deletions
diff --git a/textwindow.c b/textwindow.c index 26ca9f8..efe5dcd 100644 --- a/textwindow.c +++ b/textwindow.c @@ -81,11 +81,11 @@ bool cNopacityTextWindow::SetManualPoster(const cRecording *recording, bool full void cNopacityTextWindow::SetPoster(const cEvent *event, const cRecording *recording, bool fullscreen) { if (!event && !recording) return; - static cPlugin *pScraper2Vdr = cPluginManager::GetPlugin("scraper2vdr"); - if (pScraper2Vdr) { + static cPlugin *pScraper = GetScraperPlugin(); + if (pScraper) { posterScraper2Vdr.event = event; posterScraper2Vdr.recording = recording; - if (pScraper2Vdr->Service("GetPoster", &posterScraper2Vdr)) { + if (pScraper->Service("GetPoster", &posterScraper2Vdr)) { hasPoster = true; int posterWidthOrig = posterScraper2Vdr.poster.width; int posterHeightOrig = posterScraper2Vdr.poster.height; @@ -101,34 +101,6 @@ void cNopacityTextWindow::SetPoster(const cEvent *event, const cRecording *recor posterHeight = 0; posterWidth = 0; } - return; - } - static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper"); - if (recording && recording->Info()) { - event = recording->Info()->GetEvent(); - } - if (pTVScraper && event) { - poster.event = event; - if (recording) - poster.isRecording = true; - else - poster.isRecording = false; - if (pTVScraper->Service("TVScraperGetPoster", &poster)) { - hasPoster = true; - int posterWidthOrig = poster.media.width; - int posterHeightOrig = poster.media.height; - if (!fullscreen) { - posterHeight = geometry->Height() - 5; - posterWidth = posterWidthOrig * ((double)posterHeight / (double)posterHeightOrig); - } else { - posterWidth = geometry->Width() / 4; - posterHeight = posterHeightOrig * ((double)posterWidth / (double)posterWidthOrig); - } - } else { - hasPoster = false; - posterHeight = 0; - posterWidth = 0; - } } } @@ -251,9 +223,6 @@ void cNopacityTextWindow::SetEvent(const cEvent *event) { if (imgLoader.LoadPoster(posterScraper2Vdr.poster.path.c_str(), posterWidth, posterHeight)) { pixmap->DrawImage(cPoint(posterX, border), imgLoader.GetImage()); widthTextHeader -= posterWidth + border; - } else if (imgLoader.LoadPoster(poster.media.path.c_str(), posterWidth, posterHeight)) { - pixmap->DrawImage(cPoint(posterX, border), imgLoader.GetImage()); - widthTextHeader -= posterWidth + border; } } else if (imgLoader.LoadEPGImage(event->EventID())) { epgImageFound = true; @@ -304,9 +273,6 @@ void cNopacityTextWindow::SetRecording(const cRecording *recording) { if (imgLoader.LoadPoster(posterScraper2Vdr.poster.path.c_str(), posterWidth, posterHeight)) { pixmap->DrawImage(cPoint(posterX, border), imgLoader.GetImage()); widthTextHeader -= posterWidth + border; - } else if (imgLoader.LoadPoster(poster.media.path.c_str(), posterWidth, posterHeight)) { - pixmap->DrawImage(cPoint(posterX, border), imgLoader.GetImage()); - widthTextHeader -= posterWidth + border; } } else if (imgLoader.LoadRecordingImage(recording->FileName())) { pixmap->DrawImage(cPoint(width - config.GetValue("epgImageWidth") - border, y), imgLoader.GetImage()); @@ -422,8 +388,6 @@ void cNopacityTextWindow::DrawPoster(int border) { } } else if (imgLoader.LoadPoster(posterScraper2Vdr.poster.path.c_str(), posterWidth, posterHeight)) { pixmap->DrawImage(cPoint(border, posterY), imgLoader.GetImage()); - } else if (imgLoader.LoadPoster(poster.media.path.c_str(), posterWidth, posterHeight)) { - pixmap->DrawImage(cPoint(border, posterY), imgLoader.GetImage()); } } |