2 Copyright 2004-2005 Chris Tallon
3 Copyright 2014 Marten Richter
5 This file is part of VOMP.
7 VOMP is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 VOMP is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with VOMP. If not, see <https://www.gnu.org/licenses/>.
24 #include "movieinfo.h"
25 #include "seriesinfo.h"
28 static const char* TAG = "Event";
30 MovieInfo* Event::movieInfo = NULL;
31 SeriesInfo* Event::seriesInfo = NULL;
33 void Event::loadinfos(u4 channelid)
35 VDR* vdr = VDR::getInstance();
36 if (movieInfo) delete movieInfo;
37 if (seriesInfo) delete seriesInfo;
42 if (movieID == 0 && seriesID == 0)
44 vdr->getScraperEventType(channelid, id, movieID, seriesID, episodeID, epgImage);
45 LogNT::getInstance()->debug(TAG, "Got Scraper EventType {} {}, {} {} {}",
46 id, channelid, movieID, seriesID, episodeID);
49 if (!vdr->isConnected()) Control::getInstance()->connectionLost();
53 movieInfo = vdr->getScraperMovieInfo(movieID);
54 LogNT::getInstance()->debug(TAG, "Got Scraper MovieInfo");
56 else if (seriesID != 0)
58 seriesInfo = vdr->getScraperSeriesInfo(seriesID, episodeID);
59 LogNT::getInstance()->debug(TAG, "Got Scraper SeriesInfo");
62 if (!vdr->isConnected()) Control::getInstance()->connectionLost();