summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2018-02-09 17:12:59 +0100
committerhorchi <vdr@jwendel.de>2018-02-09 17:12:59 +0100
commita7d8f609094cb81040c6a836a784c50429615866 (patch)
tree4fc13711a4a61bbe3cf41e0299d39112f55e26bc
parent063d587d5868356abc6550e504c5a75eb34dd772 (diff)
downloadvdr-epg-daemon-a7d8f609094cb81040c6a836a784c50429615866.tar.gz
vdr-epg-daemon-a7d8f609094cb81040c6a836a784c50429615866.tar.bz2
2018-02-09: version 1.1.129 (horchi)\n - added: Table for recording images\n\n1.1.129
-rw-r--r--HISTORY.h11
-rw-r--r--TODO10
-rw-r--r--configs/epg.dat115
-rw-r--r--epgd.h1
-rw-r--r--update.c54
5 files changed, 133 insertions, 58 deletions
diff --git a/HISTORY.h b/HISTORY.h
index 7284691..5daacb8 100644
--- a/HISTORY.h
+++ b/HISTORY.h
@@ -4,9 +4,9 @@
* -----------------------------------
*/
-#define _VERSION "1.1.128"
-#define VERSION_DATE "08.02.2018"
-#define DB_API 5
+#define _VERSION "1.1.129"
+#define VERSION_DATE "09.02.2018"
+#define DB_API 6
#ifdef GIT_REV
# define VERSION _VERSION "-GIT" GIT_REV
@@ -18,8 +18,11 @@
* ------------------------------------
*
+2018-02-09: version 1.1.129 (horchi)
+ - added: Table for recording images
+
2018-02-08: version 1.1.128 (horchi)
- - change: dont store 'switch' timer to timersdone
+ - change: don't store 'switch' timer to timersdone
2018-02-08: version 1.1.127 (horchi)
- change: store timer type to support 'switch' timer
diff --git a/TODO b/TODO
index 9560a0d..a8b388c 100644
--- a/TODO
+++ b/TODO
@@ -14,8 +14,6 @@ Erste Spalte 'Backend', Zweite Spalte 'Frontend'
+= bei Nachrichten messages Tabelle optional, konfigurierbar zusätzlich Email Notifications versenden
+= Timer Job Check im epg2vdr geht nicht wenn epgd busy
-+= Suchtimer Typ 'Umschalten' fertig stellen
-+= Schutz vor 'SQL-Injection'
+= Format Erkennung (HD,SD) für Autotimer entspr. der konfigurierten Reihenfolge priorisieren
+= im Programm OSD Menü nach dones suchen
+= am OSD Sendung als „bereits aufgezeichnet“ markieren
@@ -43,14 +41,14 @@ Erste Spalte 'Backend', Zweite Spalte 'Frontend'
++ channlemap im web bearbeiten (Auswahl pro User ermöglichen)
++ data/status zur Anzeige von Version und Status des epgd im webif
++ Beim löschen eines Timers fragen ob die passenden Einträge aus der timersdone mit gelöscht werden sollen
-++ Suchtimer: Checkbox für "Neu" bzw. "Erstausstrahlung"
-++ Titel (Namen des Aufzeichnung) im Timer-Dialog bearbeitbar machen
- -> http://www.vdr-portal.de/board1-news/board2-vdr-news/p1269286-announce-easteregg-epgd-epghttpd-1-0-0-beta1-jetzt-mit-web-serientimer-unterst%C3%BCtzung/#post1269286
--------------------------------------------------------
-Baucht dass wirklich jemand - von wem war der Request?
+Braucht man dass wirklich?
--------------------------------------------------------
+++ Suchtimer: Checkbox für "Neu" bzw. "Erstausstrahlung"
+++ Titel (Namen des Aufzeichnung) im Timer-Dialog bearbeitbar machen
+ -> http://www.vdr-portal.de/board1-news/board2-vdr-news/p1269286-announce-easteregg-epgd-epghttpd-1-0-0-beta1-jetzt-mit-web-serientimer-unterst%C3%BCtzung/#post1269286
+= Suchtimer am OSD anlegen und bearbeiten -> ist das wirklich nötig?
++ hits bei Suchtimern aufteilen nach total und aktiven Timern
++ Suchtimer auf einzelne VDR begrenzen, dies soll Suchtimer mit retundanten Aufnahmen (eine je VDR) ermöglichen,
diff --git a/configs/epg.dat b/configs/epg.dat
index 1b3884d..8d3ce74 100644
--- a/configs/epg.dat
+++ b/configs/epg.dat
@@ -1,6 +1,6 @@
// --------------------------------------------------------------------------
//
-// Table Dictionary for EPG Daemon and related Plugins
+// Database Dictionary for EPG Daemon and related Plugins
//
// --------------------------------------------------------------------------
// See the README file for copyright information and how to reach the author
@@ -487,56 +487,57 @@ Index useevents
Table recordinglist
{
- MD5PATH "" md5path Ascii 40 Primary,
- STARTTIME "" starttime UInt 0 Primary,
- OWNER "uuid of vdr" owner Ascii 40 Primary,
-
- INSSP "" inssp Int 10 Meta,
- UPDSP "" updsp Int 10 Meta,
- LASTIFOUPD "" lastifoupd Int 10 Meta,
-
- VDRUUID "" vdruuid Ascii 40 Data,
- PATH "" path Ascii 1000 Data,
- NAME "" name Ascii 1000 Data,
- FOLDER "" folder Ascii 1000 Data,
- TITLE "" title Ascii 200 Data,
- SHORTTEXT "" shorttext Ascii 300 Data,
- LONGDESCRIPTION "" longdescription MText 25000 Data,
- DESCRIPTION "" description MText 25000 Data,
- DURATION "" duration UInt 0 Data,
- FSK "" fsk UInt 1 Data,
-
- EVENTID "useid" eventid UInt 0 Data,
- CHANNELID "" channelid Ascii 50 Data,
- CHANNELNAME "just a copy" channelname Ascii 100 Data,
-
- STATE "" state Ascii 1 Data,
- INUSE "" inuse UInt 1 Data,
- JOB "" job Ascii 1 Data,
+ MD5PATH "" md5path Ascii 40 Primary,
+ STARTTIME "" starttime UInt 0 Primary,
+ OWNER "uuid of vdr" owner Ascii 40 Primary,
+
+ INSSP "" inssp Int 10 Meta,
+ UPDSP "" updsp Int 10 Meta,
+ LASTIFOUPD "" lastifoupd Int 10 Meta,
+
+ IMGID "md5 of title/shorttext" imgid Ascii 40 Data,
+ VDRUUID "" vdruuid Ascii 40 Data,
+ PATH "" path Ascii 1000 Data,
+ NAME "" name Ascii 1000 Data,
+ FOLDER "" folder Ascii 1000 Data,
+ TITLE "" title Ascii 200 Data,
+ SHORTTEXT "" shorttext Ascii 300 Data,
+ LONGDESCRIPTION "" longdescription MText 25000 Data,
+ DESCRIPTION "" description MText 25000 Data,
+ DURATION "" duration UInt 0 Data,
+ FSK "" fsk UInt 1 Data,
+
+ EVENTID "useid" eventid UInt 0 Data,
+ CHANNELID "" channelid Ascii 50 Data,
+ CHANNELNAME "just a copy" channelname Ascii 100 Data,
+
+ STATE "" state Ascii 1 Data,
+ INUSE "" inuse UInt 1 Data,
+ JOB "" job Ascii 1 Data,
// enriched by 'external' data of events
- ACTOR "" actor MText 5000 Data,
- AUDIO "" audio Ascii 50 Data,
- CATEGORY "" category Ascii 50 Data,
- COUNTRY "" country Ascii 50 Data,
- DIRECTOR "" director Text 1000 Data,
- FLAGS "" flags Ascii 100 Data,
- GENRE "" genre Ascii 100 Data,
- MUSIC "" music Ascii 250 Data,
- PRODUCER "" producer Text 1000 Data,
- SCREENPLAY "" screenplay Ascii 500 Data,
- SHORTREVIEW "" shortreview Ascii 500 Data,
- TIPP "" tipp Ascii 250 Data,
- TOPIC "" topic Ascii 1000 Data,
- YEAR "" year Ascii 10 Data,
- RATING "" rating Ascii 250 Data,
- NUMRATING "" numrating Int 2 Data,
- TXTRATING "" txtrating Ascii 100 Data,
- MODERATOR "" moderator Ascii 250 Data,
- OTHER "" other Text 2000 Data,
- GUEST "" guest Text 1000 Data,
- CAMERA "" camera Text 1000 Data,
+ ACTOR "" actor MText 5000 Data,
+ AUDIO "" audio Ascii 50 Data,
+ CATEGORY "" category Ascii 50 Data,
+ COUNTRY "" country Ascii 50 Data,
+ DIRECTOR "" director Text 1000 Data,
+ FLAGS "" flags Ascii 100 Data,
+ GENRE "" genre Ascii 100 Data,
+ MUSIC "" music Ascii 250 Data,
+ PRODUCER "" producer Text 1000 Data,
+ SCREENPLAY "" screenplay Ascii 500 Data,
+ SHORTREVIEW "" shortreview Ascii 500 Data,
+ TIPP "" tipp Ascii 250 Data,
+ TOPIC "" topic Ascii 1000 Data,
+ YEAR "" year Ascii 10 Data,
+ RATING "" rating Ascii 250 Data,
+ NUMRATING "" numrating Int 2 Data,
+ TXTRATING "" txtrating Ascii 100 Data,
+ MODERATOR "" moderator Ascii 250 Data,
+ OTHER "" other Text 2000 Data,
+ GUEST "" guest Text 1000 Data,
+ CAMERA "" camera Text 1000 Data,
// episode reference
@@ -564,6 +565,24 @@ Table recordinglist
}
// ----------------------------------------------------------------
+// Recording Images
+// ----------------------------------------------------------------
+
+Table recordingimages
+{
+ IMGID "md5 of title/shorttext" imgid Ascii 40 Primary,
+ LFN "" lfn UInt 0 Primary,
+
+ INSSP "" inssp Int 0 Meta,
+ UPDSP "" updsp Int 0 Meta,
+
+ TITLE "" title Ascii 200 Data,
+ SHORTTEXT "" shorttext Ascii 300 Data,
+
+ IMAGE "" image Mlob 512000 Data,
+}
+
+// ----------------------------------------------------------------
// Table RecordingDirs
// ----------------------------------------------------------------
diff --git a/epgd.h b/epgd.h
index 3a7b74b..1358b7a 100644
--- a/epgd.h
+++ b/epgd.h
@@ -202,6 +202,7 @@ class cEpgd : public cFrame, public cSystemNotification
int initDb();
int exitDb();
int migrateFromDbApi4();
+ int migrateFromDbApi5();
int tryFillEmptyRecTableFields();
int checkProcedure(const char* name, cDBS::ProcType type, cDbProcedure* fp = 0);
int checkView(const char* name, const char* file);
diff --git a/update.c b/update.c
index 9eab690..78a8854 100644
--- a/update.c
+++ b/update.c
@@ -482,6 +482,12 @@ int cEpgd::initDb()
return fail;
}
+ if (lastApi <= 5)
+ {
+ if (migrateFromDbApi5() != success)
+ return fail;
+ }
+
registerMe(); // and update DB_API info at vdrs table
initial = no;
}
@@ -1162,6 +1168,54 @@ int cEpgd::migrateFromDbApi4()
return status;
}
+//***************************************************************************
+// Migrate From DB API 5
+//***************************************************************************
+
+int cEpgd::migrateFromDbApi5()
+{
+ int status = success;
+
+ recordingListDb = new cDbTable(connection, "recordinglist");
+ if ((status = recordingListDb->open()) != success) return status;
+
+ tell(0, "Migration of table '%s' from version <= 5 ...", recordingListDb->TableName());
+
+ cDbStatement* select = new cDbStatement(recordingListDb);
+ select->build("select ");
+ select->bindAllOut();
+ select->build(" from %s where %s is null", recordingListDb->TableName(),
+ recordingListDb->getField("IMGID")->getDbName());
+
+ status += select->prepare();
+
+ if (status == success)
+ {
+ md5Buf md5Id;
+
+ for (int f = select->find(); f; f = select->fetch())
+ {
+ std::string text = std::string(recordingListDb->getStrValue("TITLE"))
+ + std::string(recordingListDb->getStrValue("SHORTTEXT"));
+ createMd5(text.c_str(), md5Id);
+
+ recordingListDb->setValue("IMGID", md5Id);
+ recordingListDb->update();
+ }
+ }
+
+ tell(0, "... done");
+
+ delete select;
+ delete recordingListDb; recordingListDb = 0;
+
+ return status;
+}
+
+//***************************************************************************
+// Try Fill Empty Rec Table Fields
+//***************************************************************************
+
const char* getLine(const char* buf, const char* startChar = 0, const char* endChar = 0)
{
static char line[100+TB];