Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 2095cb4ac0eae9721f22affde133d2e5 > files > 1

vdr-plugin-playlist-0.0.2-0.rc3.14mdv2008.0.src.rpm

#! /bin/sh /usr/share/dpatch/dpatch-run
## 91_playlist-0.0.2rc3-fix-1.3.25.dpatch by viking at vdrportal.de
## http://vdrportal.de/board/thread.php?postid=566945#post566945
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Changes for VDR >= 1.3.25 and VDR >= 1.3.36.

@DPATCH@
diff -Nur playlist-0.0.2.ORG/dataplaylist.c playlist-0.0.2/dataplaylist.c
--- playlist-0.0.2.ORG/dataplaylist.c	2004-10-08 02:34:00.000000000 +0200
+++ playlist-0.0.2/dataplaylist.c	2007-01-18 10:17:08.000000000 +0100
@@ -145,7 +145,11 @@
     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 -Nur playlist-0.0.2.ORG/menuplaylist.c playlist-0.0.2/menuplaylist.c
--- playlist-0.0.2.ORG/menuplaylist.c	2004-10-08 02:34:00.000000000 +0200
+++ playlist-0.0.2/menuplaylist.c	2007-01-18 10:20:32.000000000 +0100
@@ -154,7 +154,11 @@
     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 @@
   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 -Nur playlist-0.0.2.ORG/playlist.c playlist-0.0.2/playlist.c
--- playlist-0.0.2.ORG/playlist.c	2004-10-08 02:34:00.000000000 +0200
+++ playlist-0.0.2/playlist.c	2007-01-18 10:15:43.000000000 +0100
@@ -378,10 +378,11 @@
   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 @@
       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)