summaryrefslogtreecommitdiff
path: root/plugins/playlist
diff options
context:
space:
mode:
authorroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
committerroot <root@elwms02.(none)>2010-04-06 16:13:08 +0200
commit0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch)
tree11517ce0d3d2977c6732b3aa583b0008083e0bd3 /plugins/playlist
downloadx-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz
x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2
hello world
Diffstat (limited to 'plugins/playlist')
-rw-r--r--plugins/playlist/patches/playlist-0.0.2-1.5.7.diff36
-rw-r--r--plugins/playlist/patches/playlist-0.0.2-1.7.3.diff72
-rw-r--r--plugins/playlist/patches/playlist-0.0.2-makefile.diff33
-rw-r--r--plugins/playlist/patches/playlist-0.0.2.patch83
-rw-r--r--plugins/playlist/plugin.sh52
5 files changed, 276 insertions, 0 deletions
diff --git a/plugins/playlist/patches/playlist-0.0.2-1.5.7.diff b/plugins/playlist/patches/playlist-0.0.2-1.5.7.diff
new file mode 100644
index 0000000..c825201
--- /dev/null
+++ b/plugins/playlist/patches/playlist-0.0.2-1.5.7.diff
@@ -0,0 +1,36 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 93_playlist-0.0.2-1.5.7.dpatch by Thomas Günther <tom@toms-cafe.de>
+## http://toms-cafe.de/vdr/download/playlist-0.0.2-1.5.7.diff
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Changes for VDR >= 1.5.7.
+
+@DPATCH@
+--- playlist-0.0.2/playlist.c
++++ playlist-0.0.2/playlist.c
+@@ -159,7 +159,11 @@ cPluginPlaylist::cPluginPlaylist(void)
+ // Initialize any member variables here.
+ // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
+ // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
++#if VDRVERSNUM >= 10507
++ OSDLanguage = NULL;
++#else
+ OSDLanguage = -1;
++#endif
+ PluginPlaylist = this;
+ }
+
+--- playlist-0.0.2/playlist.h
++++ playlist-0.0.2/playlist.h
+@@ -139,7 +139,11 @@ void ExpandEnvironment(tParamFile *FileS
+ class cPluginPlaylist : public cPlugin {
+ private:
+ // Add any member variables or functions you may need here.
++#if VDRVERSNUM >= 10507
++ const char *OSDLanguage;
++#else
+ int OSDLanguage;
++#endif
+ void TestAndSetOSDLanguage(void);
+ bool ProcessArg(int argc, char *argv[]);
+
diff --git a/plugins/playlist/patches/playlist-0.0.2-1.7.3.diff b/plugins/playlist/patches/playlist-0.0.2-1.7.3.diff
new file mode 100644
index 0000000..a3eee46
--- /dev/null
+++ b/plugins/playlist/patches/playlist-0.0.2-1.7.3.diff
@@ -0,0 +1,72 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 94_playlist-0.0.2-1.7.3.dpatch by Thomas Günther <tom@toms-cafe.de>
+## http://toms-cafe.de/vdr/download/playlist-0.0.2-1.7.3.diff
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Changes for VDR >= 1.7.3.
+
+@DPATCH@
+--- playlist-0.0.2/dataplaylist.c
++++ playlist-0.0.2/dataplaylist.c
+@@ -125,6 +125,7 @@ void cPlaylistRecord::SetDefaults(cRecor
+ isdel = false;
+ isnew = false;
+ isedited = false;
++ isPesRecording = false;
+ start = 0;
+ title = NULL;
+ summary = NULL;
+@@ -139,6 +140,9 @@ bool cPlaylistRecord::CopyFromRecording(
+ if (recording)
+ {
+ isedited = recording->IsEdited();
++#if VDRVERSNUM >= 10703
++ isPesRecording = recording->IsPesRecording();
++#endif
+ isnew = recording->IsNew();
+ start = recording->start;
+ title = strdup(recording->Title('\t', true, recording->HierarchyLevels()));
+--- playlist-0.0.2/dataplaylist.h
++++ playlist-0.0.2/dataplaylist.h
+@@ -43,6 +43,7 @@ private:
+ time_t start; // copy from cRecording
+ char *title; // copy from cRecording
+ bool isedited; // copy from cRecording
++ bool isPesRecording; // copy from cRecording
+ char *summary; // copy from cRecording
+ int options[Option_max];
+ cPlaylistRecord *parent;
+@@ -66,6 +67,7 @@ public:
+ char *Filename(void) { return filename; }
+ bool IsNew(void) { return isnew; }
+ bool IsEdited(void) { return isedited; }
++ bool IsPesRecording(void) const { return isPesRecording; }
+ bool IsDir(void) { return isdir; }
+ bool IsDel(void) { return isdel; }
+ bool IsDirOrDel(void) { return isdir || isdel; }
+--- playlist-0.0.2/menucontrol.c
++++ playlist-0.0.2/menucontrol.c
+@@ -188,7 +188,11 @@ eOSState cControlPlaylist::PlayRecording
+ {
+ if (PlaylistRecord->IsNew() && !PlaylistRecord->IsEdited() && PlaylistRecord->Option(Option_jumpmark))
+ {
++#if VDRVERSNUM >= 10703
++ cResumeFile *resume = new cResumeFile(PlaylistRecord->Filename(), PlaylistRecord->IsPesRecording());
++#else
+ cResumeFile *resume = new cResumeFile(PlaylistRecord->Filename());
++#endif
+ int res = resume->Read();
+ delete resume;
+ if (res < 0) // new file
+@@ -205,7 +209,11 @@ eOSState cControlPlaylist::PlayRecording
+ mark = marks->GetNext(mark)->position;
+ mark = marks->GetNext(mark)->position;
+ }
++#if VDRVERSNUM >= 10703
++ cResumeFile *resume = new cResumeFile(PlaylistRecord->Filename(), PlaylistRecord->IsPesRecording());
++#else
+ cResumeFile *resume = new cResumeFile(PlaylistRecord->Filename());
++#endif
+ if (mark > 0 && resume)
+ {
+ resume->Save(mark);
diff --git a/plugins/playlist/patches/playlist-0.0.2-makefile.diff b/plugins/playlist/patches/playlist-0.0.2-makefile.diff
new file mode 100644
index 0000000..f00c117
--- /dev/null
+++ b/plugins/playlist/patches/playlist-0.0.2-makefile.diff
@@ -0,0 +1,33 @@
+--- Makefile.orig
++++ Makefile
+@@ -17,20 +17,23 @@
+
+ CXX ?= g++
+-CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual
++CXXFLAGS ?= -fPIC -O2 -Wall -Woverloaded-virtual
+
+-### Allow user defined options to overwrite defaults:
+-
+--include $(VDRDIR)/Make.config
+-
+ ### The directory environment:
+
+ DVBDIR = ../../../../DVB
+ VDRDIR = ../../..
+ LIBDIR = ../../lib
+ TMPDIR = /tmp
+
++### Allow user defined options to overwrite defaults:
++
++-include $(VDRDIR)/Make.config
++
++### The version number of VDR's plugin API (taken from VDR's "config.h"):
++
++APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
++
+ ### The version number of VDR (taken from VDR's "config.h"):
+
+-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+ VDRVERSNUM = $(shell grep 'define VDRVERSNUM ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+
+### DEFINES += -DVDRVERSNUM=$(VDRVERSNUM)
diff --git a/plugins/playlist/patches/playlist-0.0.2.patch b/plugins/playlist/patches/playlist-0.0.2.patch
new file mode 100644
index 0000000..5271e30
--- /dev/null
+++ b/plugins/playlist/patches/playlist-0.0.2.patch
@@ -0,0 +1,83 @@
+diff -ruN VDR.org/PLUGINS/src/playlist-0.0.2/dataplaylist.c VDR/PLUGINS/src/playlist-0.0.2/dataplaylist.c
+--- VDR.org/PLUGINS/src/playlist-0.0.2/dataplaylist.c 2004-10-08 02:34:00.000000000 +0200
++++ VDR/PLUGINS/src/playlist-0.0.2/dataplaylist.c 2005-11-07 02:26:38.000000000 +0100
+@@ -145,7 +145,11 @@
+ char *temp = strrchr(title, '\t');
+ if (temp)
+ *temp = 0;
++#if VDRVERSNUM >= 10325
++ summary = recording->Info()->Title() ? strdup(recording->Info()->Title()) : NULL;
++#else
+ summary = recording->Summary() ? strdup(recording->Summary()) : NULL;
++#endif
+ return true;
+ }
+ isdel = true;
+diff -ruN VDR.org/PLUGINS/src/playlist-0.0.2/menuplaylist.c VDR/PLUGINS/src/playlist-0.0.2/menuplaylist.c
+--- VDR.org/PLUGINS/src/playlist-0.0.2/menuplaylist.c 2004-10-08 02:34:00.000000000 +0200
++++ VDR/PLUGINS/src/playlist-0.0.2/menuplaylist.c 2005-11-07 02:26:38.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()->Title() && *recording->Info()->Title()) ? 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,12 +260,24 @@
+ if (ri && !ri->IsDirectory())
+ {
+ cRecording *recording = GetRecording(ri);
++#if VDRVERSNUM >= 10325
++ if (recording && recording->Info()->Title() && *recording->Info()->Title())
++#else
+ if (recording && recording->Summary() && *recording->Summary())
++#endif
+ #if VDRVERSNUM >= 10307
++#if VDRVERSNUM >= 10325
++ return AddSubMenu(new cMenuText(tr("Summary"), recording->Info()->Title()));
++#else
+ return AddSubMenu(new cMenuText(tr("Summary"), recording->Summary()));
++#endif
++#else
++#if VDRVERSNUM >= 10325
++ return AddSubMenu(new cMenuItemText(tr("Summary"), recording->Info()->Title()));
+ #else
+ return AddSubMenu(new cMenuItemText(tr("Summary"), recording->Summary()));
+ #endif
++#endif
+ }
+ return osContinue;
+ }
+diff -ruN VDR.org/PLUGINS/src/playlist-0.0.2/playlist.c VDR/PLUGINS/src/playlist-0.0.2/playlist.c
+--- VDR.org/PLUGINS/src/playlist-0.0.2/playlist.c 2004-10-08 02:34:00.000000000 +0200
++++ VDR/PLUGINS/src/playlist-0.0.2/playlist.c 2005-11-07 02:28:51.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)
diff --git a/plugins/playlist/plugin.sh b/plugins/playlist/plugin.sh
new file mode 100644
index 0000000..00cbac0
--- /dev/null
+++ b/plugins/playlist/plugin.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis)
+# von Marc Wernecke - www.zulu-entertainment.de
+# 08.04.2009
+#
+# vdr-playlist
+
+# defaults
+source ./../../x-vdr.conf
+source ./../../setup.conf
+source ./../../functions
+
+WEB="http://www.zulu-entertainment.de/files/vdr-playlist/vdr-playlist-0.0.2rc3.tgz"
+VERSION="playlist-0.0.2"
+LINK="playlist"
+
+VAR=`basename $WEB`
+DIR=`pwd`
+
+# plugin entfernen
+function clean_plugin() {
+ cd $SOURCEDIR/VDR/PLUGINS/src
+ rm -rf $LINK*
+ rm -f $VDRLIBDIR/libvdr-$LINK*
+ log "cleaning $LINK"
+}
+
+# plugin installieren
+function install_plugin() {
+ download_plugin
+ extract_plugin
+ cd $SOURCEDIR/VDR/PLUGINS/src
+ rm -f $LINK
+ ln -vfs $VERSION $LINK
+ patch_plugin
+
+ ## plugin specials - start ##
+
+ ## plugin specials - ende ##
+}
+
+# plugin commands
+if [ $# \> 0 ]; then
+ cmd=$1
+ cmd_plugin
+else
+ install_plugin
+ log "install-plugin fuer $VERSION ist fertig"
+fi
+
+exit 0