diff options
author | louis <louis.braun@gmx.de> | 2014-05-11 09:00:21 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-05-11 09:00:21 +0200 |
commit | b1d2acff559c3cdc669254fa85e9279acdcb12dc (patch) | |
tree | ebcc682783e6de11c7b779e1efce4bb6fb4ae3e6 /statusheader.c | |
parent | 490beed385054354bba92d0ffbd68621f79c9630 (diff) | |
download | vdr-plugin-tvguide-b1d2acff559c3cdc669254fa85e9279acdcb12dc.tar.gz vdr-plugin-tvguide-b1d2acff559c3cdc669254fa85e9279acdcb12dc.tar.bz2 |
Version 1.2.2 scraper2vdr support
Diffstat (limited to 'statusheader.c')
-rw-r--r-- | statusheader.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/statusheader.c b/statusheader.c index 3b04919..cac916e 100644 --- a/statusheader.c +++ b/statusheader.c @@ -1,5 +1,5 @@ #include "tools.h"
-#include "services/tvscraper.h"
+#include "services/scraper2vdr.h"
#include "imageloader.h"
#include "statusheader.h"
@@ -101,28 +101,26 @@ void cStatusHeader::DrawInfoText(cGrid *grid) { int cStatusHeader::DrawPoster(const cEvent *event, int x, int y, int height, int border) {
bool hasPoster = false;
- TVScraperGetPoster poster;
+ ScraperGetPoster posterScraper2Vdr;
int posterWidth = 0;
int posterHeight = 0;
- if (event) {
- static cPlugin *pTVScraper = cPluginManager::GetPlugin("tvscraper");
- if (pTVScraper) {
- poster.event = event;
- poster.isRecording = false;
- if (pTVScraper->Service("TVScraperGetPoster", &poster)) {
- hasPoster = true;
- int posterWidthOrig = poster.media.width;
- int posterHeightOrig = poster.media.height;
- if ((posterWidthOrig > 10) && (posterHeightOrig > 10)) {
- posterHeight = height;
- posterWidth = posterWidthOrig * ((double)posterHeight / (double)posterHeightOrig);
- }
- }
+ static cPlugin *pScraper2Vdr = cPluginManager::GetPlugin("scraper2vdr");
+ if (pScraper2Vdr) {
+ posterScraper2Vdr.event = event;
+ posterScraper2Vdr.recording = NULL;
+ if (pScraper2Vdr->Service("GetPoster", &posterScraper2Vdr)) {
+ hasPoster = true;
+ int posterWidthOrig = posterScraper2Vdr.poster.width;
+ int posterHeightOrig = posterScraper2Vdr.poster.height;
+ posterHeight = height;
+ posterWidth = posterWidthOrig * ((double)posterHeight / (double)posterHeightOrig);
+ } else {
+ hasPoster = false;
}
}
if (hasPoster) {
cImageLoader imgLoader;
- if (imgLoader.LoadPoster(poster.media.path.c_str(), posterWidth, posterHeight)) {
+ if (imgLoader.LoadPoster(posterScraper2Vdr.poster.path.c_str(), posterWidth, posterHeight)) {
pixmapText->DrawImage(cPoint(x, y), imgLoader.GetImage());
return posterWidth + border;
}
|