2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 #include "movieinfo.h"
25 #include "seriesinfo.h"
28 MovieInfo* Event::movieInfo = NULL;
29 SeriesInfo* Event::seriesInfo = NULL;
48 if (title) delete[] title;
49 if (subtitle) delete[] subtitle;
50 if (description) delete[] description;
53 void Event::settitle(const char* s)
56 title = new char[strlen(s) + 1];
60 void Event::setdescription(const char* s)
63 description = new char[strlen(s) + 1];
64 strcpy(description, s);
67 void Event::setsubtitle(const char* s)
70 subtitle = new char[strlen(s) + 1];
75 void Event::loadinfos(UINT channelid)
77 VDR *vdr=VDR::getInstance();
78 if (movieInfo) delete movieInfo;
79 if (seriesInfo) delete seriesInfo;
85 if (movieID == 0 && seriesID == 0) {
86 vdr->getScraperEventType(channelid, id, movieID, seriesID, episodeID, epgImage);
87 Log::getInstance()->log("Event", Log::DEBUG, "Got Scraper EventType %d %d, %d %d %d %d",
89 movieID, seriesID, episodeID);
92 if (!vdr->isConnected()) Command::getInstance()->connectionLost();
96 movieInfo = vdr->getScraperMovieInfo(movieID);
97 Log::getInstance()->log("Event", Log::DEBUG, "Got Scraper MovieInfo ");
99 else if (seriesID != 0)
101 seriesInfo = vdr->getScraperSeriesInfo(seriesID, episodeID);
102 Log::getInstance()->log("Event", Log::DEBUG, "Got Scraper SeriesInfo ");
106 if (!vdr->isConnected()) Command::getInstance()->connectionLost();