summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2017-12-22 10:09:46 (GMT)
committerhorchi <vdr@jwendel.de>2017-12-22 10:09:46 (GMT)
commit56c04bd8e18f88c3c8e3c023cc4507570b371c06 (patch)
tree22eae9a2067614035000dfab310a24aeb92a700c
parent370d37dc3e5ee26755bdae61008ab18b12392e1c (diff)
downloadvdr-plugin-epg2vdr-1.1.77.tar.gz
vdr-plugin-epg2vdr-1.1.77.tar.bz2
2017-12-22 version 1.1.77 (horchi)\n - change: backward compatibility to vdr 2.2.0 - another step\n\n1.1.77
-rw-r--r--HISTORY.h7
-rw-r--r--epg2vdr.c2
-rw-r--r--lib/db.h3
-rw-r--r--recording.c14
-rw-r--r--update.c9
5 files changed, 20 insertions, 15 deletions
diff --git a/HISTORY.h b/HISTORY.h
index 4926e8c..9acf276 100644
--- a/HISTORY.h
+++ b/HISTORY.h
@@ -5,8 +5,8 @@
*
*/
-#define _VERSION "1.1.76"
-#define VERSION_DATE "21.12.2017"
+#define _VERSION "1.1.77"
+#define VERSION_DATE "22.12.2017"
#define DB_API 4
@@ -19,6 +19,9 @@
/*
* ------------------------------------
+2017-12-22 version 1.1.77 (horchi)
+ - change: backward compatibility to vdr 2.2.0 - another step
+
2017-12-21 version 1.1.76 (horchi)
- change: backward compatibility to vdr 2.2.0 - second try
- change: g++ 7 porting
diff --git a/epg2vdr.c b/epg2vdr.c
index 341635a..96ea846 100644
--- a/epg2vdr.c
+++ b/epg2vdr.c
@@ -816,7 +816,7 @@ bool cPluginEPG2VDR::Service(const char* id, void* data)
if (!data)
return false;
- tell(4, "Service called with '%s', %d/%d", id,
+ tell(3, "Service called with '%s', %d/%d", id,
Epg2VdrConfig.replaceScheduleMenu, Epg2VdrConfig.replaceTimerMenu);
if (strcmp(id, EPG2VDR_UUID_SERVICE) == 0)
diff --git a/lib/db.h b/lib/db.h
index 02c9c06..d600322 100644
--- a/lib/db.h
+++ b/lib/db.h
@@ -615,7 +615,8 @@ class cDbRow : public cDbService
int count = 0;
for (int f = 0; f < tableDef->fieldCount(); f++)
- count += dbValues[f].getChanges();
+ if (dbValues[f].getChanges())
+ count++;
return count;
}
diff --git a/recording.c b/recording.c
index 1d0a840..c95dc9f 100644
--- a/recording.c
+++ b/recording.c
@@ -326,8 +326,6 @@ int cUpdate::updateRecordingTable(int fullReload)
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
LOCK_CHANNELS_READ;
const cChannels* channels = Channels;
- // cChannelsLock channelsLock(false);
- // const cChannels* channels = channelsLock.Channels();
#else
cChannels* channels = &Channels;
#endif
@@ -335,8 +333,6 @@ int cUpdate::updateRecordingTable(int fullReload)
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
LOCK_RECORDINGS_WRITE;
cRecordings* recordings = Recordings;
- // cRecordingsLock recordingsLock(false);
- // const cRecordings* recordings = recordingsLock.Recordings();
#else
const cRecordings* recordings = &Recordings;
#endif
@@ -361,7 +357,7 @@ int cUpdate::updateRecordingTable(int fullReload)
int eventId = 0;
std::string channelId = "";
const char* description = "";
-// const char* longdescription = "";
+ // const char* longdescription = "";
const char* title = rec->Name();
const cRecordingInfo* recInfo = rec->Info();
int pathOffset = 0;
@@ -401,11 +397,13 @@ int cUpdate::updateRecordingTable(int fullReload)
eventId = recInfo->GetEvent()->EventID();
+#if (defined (APIVERSNUM) && (APIVERSNUM >= 20304)) || (WITH_AUX_PATCH)
if (!isEmpty(recInfo->GetEvent()->Aux()) && xml.set(recInfo->GetEvent()->Aux()) == success)
{
// if (XMLElement* e = xml.getElementByName("longdescription"))
// longdescription = e->GetText();
}
+#endif
}
}
@@ -436,9 +434,6 @@ int cUpdate::updateRecordingTable(int fullReload)
// if (!isEmpty(longdescription))
// recordingListDb->setValue("ORGDESCRIPTION", longdescription); // since 'LONGDESCRIPTION' already used for 'DESCRIPTION' :(
- if (channel)
- recordingListDb->setValue("CHANNELNAME", channel->Name());
-
// scraping relevand data ..
baseChanges = recordingListDb->getChanges();
@@ -449,12 +444,13 @@ int cUpdate::updateRecordingTable(int fullReload)
// load event details
cEventDetails evd;
+ if (channel) evd.setValue("CHANNELNAME", channel->Name());
evd.loadFromFs(rec->FileName());
evd.updateToRow(recordingListDb->getRow());
// any scrap relevand data changed?
- if (recordingListDb->getChanges() != baseChanges)
+ if (recordingListDb->getChanges() > baseChanges)
{
int isSeries = recordingListDb->hasValue("CATEGORY", "Serie");
int changed = no;
diff --git a/update.c b/update.c
index 2810439..55e5427 100644
--- a/update.c
+++ b/update.c
@@ -281,8 +281,13 @@ int cUpdate::initDb()
if (vdrDb->getIntValue("DBAPI") != DB_API)
{
- tell(0, "Found dbapi %d, expected %d, please alter the tables first! Aborting now.",
- (int)vdrDb->getIntValue("DBAPI"), DB_API);
+ if (vdrDb->getIntValue("DBAPI") < DB_API)
+ tell(0, "Found dbapi %d, expected %d, please alter the tables first! Aborting now.",
+ (int)vdrDb->getIntValue("DBAPI"), DB_API);
+ else
+ tell(0, "Found dbapi %d, expected %d, please update me! Aborting now.",
+ (int)vdrDb->getIntValue("DBAPI"), DB_API);
+
return fail;
}