removed some unnecessary code

This commit is contained in:
louis 2014-05-15 12:22:29 +02:00
parent d736d269a1
commit 62610f6fc6
3 changed files with 0 additions and 40 deletions

View File

@ -14,8 +14,6 @@
// Constants
//***************************************************************************
static const char *VERSION = "0.1.3";
static const char *VERSION_DATE = "14.05.2014";
#define DB_API 4
static const char *DESCRIPTION = "'scraper2vdr' plugin";
static const char *MAINMENUENTRY = "Scraper2Vdr";
@ -36,7 +34,6 @@ public:
cPluginScraper2vdr(void);
virtual ~cPluginScraper2vdr();
virtual const char *Version(void) { return VERSION; }
virtual const char *VersionDate(void) { return VERSION_DATE; }
virtual const char *Description(void) { return DESCRIPTION; }
virtual const char *CommandLineHelp(void);
virtual bool ProcessArgs(int argc, char *argv[]);

View File

@ -46,7 +46,6 @@ cUpdate::cUpdate(cScrapManager *manager) : cThread("update thread started", true
imgPathSeries = config.imageDir + "/series";
imgPathMovies = config.imageDir + "/movies";
lastScrap = 0;
lastInit = 0;
forceUpdate = false;
forceRecordingUpdate = false;
forceVideoDirUpdate = false;
@ -450,35 +449,6 @@ bool cUpdate::CheckEpgdBusy(void) {
return busy;
}
time_t cUpdate::LastPluginInit(void) {
time_t init = 0;
vdrDb->clear();
vdrDb->setValue(cTableVdrs::fiUuid, config.uuid.c_str());
if (vdrDb->find()) {
init = vdrDb->getIntValue(cTableVdrs::fiUpdSp);
}
char buf[50+TB];
strftime(buf, 50, "%y.%m.%d %H:%M:%S", localtime(&init));
tell(0, "Last plugin init was at '%s'", buf);
vdrDb->setValue(cTableVdrs::fiState, "attached");
vdrDb->store();
return init;
}
void cUpdate::SaveLastPluginInit(void) {
char* v;
asprintf(&v, "vdr %s scraper2vdr 0.1.3", VDRVERSION);
vdrDb->clear();
vdrDb->setValue(cTableVdrs::fiUuid, config.uuid.c_str());
vdrDb->setValue(cTableVdrs::fiIp, getFirstIp());
vdrDb->setValue(cTableVdrs::fiName, getHostName());
vdrDb->setValue(cTableVdrs::fiVersion, v);
vdrDb->setValue(cTableVdrs::fiState, "detached");
vdrDb->setValue(cTableVdrs::fiMaster, "n");
vdrDb->store();
free(v);
}
int cUpdate::ReadScrapedEvents(void) {
int eventId = 0;
int seriesId = 0;
@ -1257,9 +1227,6 @@ void cUpdate::Action()
if (CheckConnection(reconnectTimeout) != success)
continue;
if (init)
lastInit = LastPluginInit();
// auch beim init auf den epgd warten, wenn der gerade busy ist müssen die sich User etwas gedulden ;)
if (CheckEpgdBusy())
@ -1387,7 +1354,6 @@ void cUpdate::Action()
worked = no;
}
SaveLastPluginInit();
loopActive = no;
tell(0, "Update thread ended (pid=%d)", getpid());
}

View File

@ -31,7 +31,6 @@ class cUpdate : public cThread {
cTableMovieMedia* tMovieMedia;
cTableRecordings* tRecordings;
int lastScrap;
time_t lastInit;
cCondVar waitCondition;
cMutex mutex;
bool forceUpdate;
@ -43,8 +42,6 @@ class cUpdate : public cThread {
int dbConnected(int force = no) { return connection && (!force || connection->check() == success); };
int CheckConnection(int& timeout);
bool CheckEpgdBusy(void);
time_t LastPluginInit(void);
void SaveLastPluginInit(void);
void Action(void);
int ReadScrapedEvents(void);
//SERIES