summaryrefslogtreecommitdiffstats
path: root/abs/core/mythtv/stable/mythvideo
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/mythtv/stable/mythvideo
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/core/mythtv/stable/mythvideo')
-rw-r--r--abs/core/mythtv/stable/mythvideo/PKGBUILD13
-rw-r--r--abs/core/mythtv/stable/mythvideo/mythvideo-6338-use_tmdb_in_fixes.patch151
-rw-r--r--abs/core/mythtv/stable/mythvideo/mythvideo.install20
3 files changed, 180 insertions, 4 deletions
diff --git a/abs/core/mythtv/stable/mythvideo/PKGBUILD b/abs/core/mythtv/stable/mythvideo/PKGBUILD
index 21f2a22..a233549 100644
--- a/abs/core/mythtv/stable/mythvideo/PKGBUILD
+++ b/abs/core/mythtv/stable/mythvideo/PKGBUILD
@@ -4,20 +4,24 @@
pkgname=mythvideo
pkgver=0.21
-pkgrel=2
+pkgrel=9
pkgdesc="Video playback and browsing plugin for MythTV"
arch=('i686' 'x86_64')
url="http://www.mythtv.org"
license=('GPL')
depends=("mythtv>=${pkgver}" 'mplayer' 'perlxml' 'perl-libwww' 'perl-uri' 'perl-xml-simple' 'ffmpeg')
source=("ftp://ftp.knoppmyth.net/R6/sources/mythplugins-$pkgver-fixes.tar.bz2"\
- mtd)
-md5sums=('af20a78ac66719feddf9a39f1a799ded' '476c12ba074794ad7f4ae092bdf949d6')
+ "ftp://ftp.knoppmyth.net/R6/sources/tmdb.tar.bz2" \
+ mtd mythvideo-6338-use_tmdb_in_fixes.patch)
+md5sums=('1b3e2a97b7ecf7373e162fe20b6faabe' '48cff8f7095586c85ec70989746736b4' '476c12ba074794ad7f4ae092bdf949d6' '4bd38d054dfc4b0b1724f398d38676f7')
replaces=('mythdvd')
groups=('mythtv-extras')
+install=mythvideo.install
build() {
- cd $startdir/src/mythplugins-${pkgver}
+ cd $startdir/src/mythplugins
+ svn update
+ patch -p1 < ../mythvideo-6338-use_tmdb_in_fixes.patch
. /etc/profile.d/qt3.sh
# use QT3 qmake
@@ -31,6 +35,7 @@ build() {
make INSTALL_ROOT=$startdir/pkg install
install -D -m755 ../mtd $startdir/pkg/etc/rc.d/mtd
+ cp -Rv $startdir/src/tmdb/* $startdir/pkg/usr/share/mythtv/mythvideo/scripts/
}
diff --git a/abs/core/mythtv/stable/mythvideo/mythvideo-6338-use_tmdb_in_fixes.patch b/abs/core/mythtv/stable/mythvideo/mythvideo-6338-use_tmdb_in_fixes.patch
new file mode 100644
index 0000000..a5a182d
--- /dev/null
+++ b/abs/core/mythtv/stable/mythvideo/mythvideo-6338-use_tmdb_in_fixes.patch
@@ -0,0 +1,151 @@
+Index: mythplugins/mythvideo/mythvideo/videomanager.cpp
+===================================================================
+--- mythplugins.orig/mythvideo/mythvideo/videomanager.cpp 2009-03-09 22:39:40.000000000 -0400
++++ mythplugins/mythvideo/mythvideo/videomanager.cpp 2009-03-09 23:04:55.000000000 -0400
+@@ -1535,6 +1535,56 @@
+ }
+ }
+
++ // Since there's no DB update to remove imdb.pl settings in -fixes,
++ // check for the old imdb.pl command and, if it's the old default,
++ // use tmdb.pl, instead (if available in the same location or the
++ // scripts dir)). Checks to see if cmd ends with end (the end of the
++ // old default imdb.pl command line). If so, it checks for tmdb, and
++ // if it exists in either the same location as specified in cmd or in
++ // the MythVideo scripts directory, replace end with "/tmdb.pl " + arg
++ QString UpdateCommandForTMDB(const QString cmd, const QString end,
++ const QString arg)
++ {
++ QString updated_cmd = cmd;
++ if (updated_cmd.endsWith(end))
++ {
++ QString script_path = updated_cmd;
++ script_path.truncate(updated_cmd.findRev(end,
++ 0 - end.length()));
++ QString tmdb_path(script_path + "/tmdb.pl");
++ if (QFile::exists(tmdb_path))
++ {
++ VERBOSE(VB_GENERAL, QString("Overriding old default "
++ "grabber script command line. "
++ "Using tmdb.pl, instead."));
++ updated_cmd = tmdb_path + " " + arg;
++ }
++ else
++ {
++ // It's possible the user has a non-default imdb.pl
++ // command-line--including path location--in the setting,
++ // so check to see if we've already checked the mythvideo
++ // scripts directory
++ QString def_path = QDir::cleanDirPath(QString("%1/%2")
++ .arg(gContext->GetShareDir())
++ .arg("mythvideo/scripts"));
++ if (script_path != def_path)
++ {
++ tmdb_path = def_path + "/tmdb.pl";
++ if (QFile::exists(tmdb_path))
++ {
++ VERBOSE(VB_GENERAL, QString("Overriding old "
++ "default grabber script command line. "
++ "Using tmdb.pl, instead."));
++ updated_cmd = tmdb_path + " " + arg;
++ }
++ }
++ }
++ }
++
++ return updated_cmd;
++ }
++
+ virtual void OnExecDone(bool normal_exit, const QStringList &out,
+ const QStringList &err) = 0;
+
+@@ -1624,9 +1674,16 @@
+
+ QString def_cmd = QDir::cleanDirPath(QString("%1/%2")
+ .arg(gContext->GetShareDir())
+- .arg("mythvideo/scripts/imdb.pl -M tv=no;video=no"));
++ .arg("mythvideo/scripts/tmdb.pl -M"));
+
+- QString cmd = gContext->GetSetting("MovieListCommandLine", def_cmd);
++ // Since there's no DB update to remove imdb.pl settings in -fixes,
++ // check for the old imdb.pl command and, if it's the old default,
++ // use tmdb.pl, instead (if available in the same location or the
++ // scripts dir))
++ QString cmd = UpdateCommandForTMDB(
++ gContext->GetSetting("MovieListCommandLine",
++ def_cmd),
++ "/imdb.pl -M tv=no;video=no", "-M");
+
+ QStringList args;
+ args += title;
+@@ -1682,9 +1739,15 @@
+
+ const QString def_cmd = QDir::cleanDirPath(QString("%1/%2")
+ .arg(gContext->GetShareDir())
+- .arg("mythvideo/scripts/imdb.pl -D"));
+- const QString cmd = gContext->GetSetting("MovieDataCommandLine",
+- def_cmd);
++ .arg("mythvideo/scripts/tmdb.pl -D"));
++ // Since there's no DB update to remove imdb.pl settings in -fixes,
++ // check for the old imdb.pl command and, if it's the old default,
++ // use tmdb.pl, instead (if available in the same location or the
++ // scripts dir))
++ const QString cmd = UpdateCommandForTMDB(
++ gContext->GetSetting("MovieDataCommandLine",
++ def_cmd),
++ "/imdb.pl -D", "-D");
+
+ StartRun(cmd, video_uid, "Video Data Query");
+ }
+@@ -1726,9 +1789,16 @@
+ const QString default_cmd =
+ QDir::cleanDirPath(QString("%1/%2")
+ .arg(gContext->GetShareDir())
+- .arg("mythvideo/scripts/imdb.pl -P"));
+- const QString cmd = gContext->GetSetting("MoviePosterCommandLine",
+- default_cmd);
++ .arg("mythvideo/scripts/tmdb.pl -P"));
++ // Since there's no DB update to remove imdb.pl settings in -fixes,
++ // check for the old imdb.pl command and, if it's the old default,
++ // use tmdb.pl, instead (if available in the same location or the
++ // scripts dir))
++ const QString cmd = UpdateCommandForTMDB(
++ gContext->GetSetting("MoviePosterCommandLine",
++ default_cmd),
++ "/imdb.pl -P", "-P");
++
+ StartRun(cmd, video_uid, "Poster Query");
+ }
+
+Index: mythplugins/mythvideo/mythvideo/globalsettings.cpp
+===================================================================
+--- mythplugins.orig/mythvideo/mythvideo/globalsettings.cpp 2009-03-09 22:39:40.000000000 -0400
++++ mythplugins/mythvideo/mythvideo/globalsettings.cpp 2009-03-09 22:42:47.000000000 -0400
+@@ -210,8 +210,7 @@
+ {
+ HostLineEdit *gc = new HostLineEdit("MovieListCommandLine");
+ gc->setLabel(QObject::tr("Command to search for movie listings"));
+- gc->setValue(gContext->GetShareDir() + "mythvideo/scripts/imdb.pl " +
+- "-M tv=no;video=no");
++ gc->setValue(gContext->GetShareDir() + "mythvideo/scripts/tmdb.pl -M");
+ gc->setHelpText(QObject::tr("This command must be "
+ "executable by the user running MythVideo."));
+ return gc;
+@@ -221,7 +220,7 @@
+ {
+ HostLineEdit *gc = new HostLineEdit("MoviePosterCommandLine");
+ gc->setLabel(QObject::tr("Command to search for movie posters"));
+- gc->setValue(gContext->GetShareDir() + "mythvideo/scripts/imdb.pl -P");
++ gc->setValue(gContext->GetShareDir() + "mythvideo/scripts/tmdb.pl -P");
+ gc->setHelpText(QObject::tr("This command must be "
+ "executable by the user running MythVideo."));
+ return gc;
+@@ -231,7 +230,7 @@
+ {
+ HostLineEdit *gc = new HostLineEdit("MovieDataCommandLine");
+ gc->setLabel(QObject::tr("Command to extract data for movies"));
+- gc->setValue(gContext->GetShareDir() + "mythvideo/scripts/imdb.pl -D");
++ gc->setValue(gContext->GetShareDir() + "mythvideo/scripts/tmdb.pl -D");
+ gc->setHelpText(QObject::tr("This command must be "
+ "executable by the user running MythVideo."));
+ return gc;
diff --git a/abs/core/mythtv/stable/mythvideo/mythvideo.install b/abs/core/mythtv/stable/mythvideo/mythvideo.install
new file mode 100644
index 0000000..a06777d
--- /dev/null
+++ b/abs/core/mythtv/stable/mythvideo/mythvideo.install
@@ -0,0 +1,20 @@
+# arg 1: the new package version
+post_install() {
+ ln -s /myth/video /data/srv/httpd/htdocs/mythweb/data/video
+ ln -s /myth/video/.covers /data/srv/httpd/htdocs/mythweb/data/video_covers
+}
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ rm -fr /data/srv/httpd/htdocs/mythweb/data/video
+ rm -fr /data/srv/httpd/htdocs/mythweb/data/video_covers
+}
+
+op=$1
+shift
+$op $*