From 80ee7faf17270a9aaeeb54d12521d929faf00dad Mon Sep 17 00:00:00 2001 From: Martin Dummer Date: Sun, 1 Jul 2012 22:49:36 +0200 Subject: Changes for VDR >= 1.3.25 and VDR >= 1.3.36 by viking at vdrportal.de --- HISTORY | 4 ++++ dataplaylist.c | 4 ++++ menuplaylist.c | 13 +++++++++++++ playlist.c | 7 ++++--- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/HISTORY b/HISTORY index 620d225..184eca6 100644 --- a/HISTORY +++ b/HISTORY @@ -13,4 +13,8 @@ VDR Plugin 'playlist' Revision History - edit the README file: adjust mail addresses and web URLs - converted README von ISO-8859-1 to UTF-8 +- merge patches from debian source-packages from http://e-Tobi.net + Adds -fPIC to Makefile to fix potential FTBFS + Support for the APIVERSION define as introduced in VDR-1.3.47 by Thomas Günther + Changes for VDR >= 1.3.25 and VDR >= 1.3.36 by viking at vdrportal.de diff --git a/dataplaylist.c b/dataplaylist.c index d462b5b..89724f6 100644 --- a/dataplaylist.c +++ b/dataplaylist.c @@ -145,7 +145,11 @@ bool cPlaylistRecord::CopyFromRecording(cRecording *Recording) char *temp = strrchr(title, '\t'); if (temp) *temp = 0; +#if VDRVERSNUM >= 10325 + summary = recording->Info()->Description() ? strdup(recording->Info()->Description()) : NULL; +#else summary = recording->Summary() ? strdup(recording->Summary()) : NULL; +#endif return true; } isdel = true; diff --git a/menuplaylist.c b/menuplaylist.c index e87588d..f4ddf0d 100644 --- a/menuplaylist.c +++ b/menuplaylist.c @@ -154,7 +154,11 @@ void cMenuRecordingSelect::SetHelpKeys(void) else { cRecording *recording = GetRecording(ri); +#if VDRVERSNUM >= 10325 + SetHelp(singleselect ? tr("Select") : tr("Add"), singleselect ? NULL : ri->IsMark() ? tr("UnMark") : tr("Mark"), deleterecords.u ? tr("Delete") : NULL, (recording && recording->Info()->Description() && *recording->Info()->Description()) ? tr("Summary") : NULL); +#else SetHelp(singleselect ? tr("Select") : tr("Add"), singleselect ? NULL : ri->IsMark() ? tr("UnMark") : tr("Mark"), deleterecords.u ? tr("Delete") : NULL, (recording && recording->Summary() && *recording->Summary()) ? tr("Summary") : NULL); +#endif } } else { @@ -256,9 +260,18 @@ eOSState cMenuRecordingSelect::Summary(void) if (ri && !ri->IsDirectory()) { cRecording *recording = GetRecording(ri); +#if VDRVERSNUM >= 10325 + if (recording && recording->Info()->Description() && *recording->Info()->Description()) +#else if (recording && recording->Summary() && *recording->Summary()) +#endif + #if VDRVERSNUM >= 10307 +#if VDRVERSNUM >= 10325 + return AddSubMenu(new cMenuText(tr("Summary"), recording->Info()->Description())); +#else return AddSubMenu(new cMenuText(tr("Summary"), recording->Summary())); +#endif #else return AddSubMenu(new cMenuItemText(tr("Summary"), recording->Summary())); #endif diff --git a/playlist.c b/playlist.c index 484644a..15270de 100644 --- a/playlist.c +++ b/playlist.c @@ -378,10 +378,11 @@ bool cPluginPlaylist::Start(void) asprintf(&p, "%s%s%s", q, *(q + strlen(q) - 1) == '/' ? "" : "/", playlistconfigfile.u); if (!access(playlistconfigfile.u, F_OK) && !access(playlistconfigfile.u, R_OK) || !access(p, F_OK) && !access(p, R_OK)) { + char *s; #define MAXARGS 100 int fargc = 1; char *fargv[MAXARGS]; - char buffer[MAXPARSEBUFFER]; + cReadLine ReadLine; bool done; FILE *f; @@ -405,9 +406,9 @@ bool cPluginPlaylist::Start(void) esyslog("%s: ERROR: cannot open config file: [%s]%s", plugin_name, ConfigDirectory(""), playlistconfigfile.u); return false; } - while (fgets(buffer, sizeof(buffer), f) > 0) + while ((s = ReadLine.Read(f)) != NULL) { - p = skipspace(stripspace(buffer)); + p = skipspace(stripspace(s)); q = NULL; done = false; while (!done) -- cgit v1.2.3