Author: hobbes1069
Update of /cvs/free/rpms/mythweb/EL-6
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv30919
Modified Files:
ChangeLog mythweb.spec
Added Files:
mythweb-0.26-fixes.patch
Removed Files:
mythweb-fixes.patch
Log Message:
* Sat Dec 08 2012 Richard Shaw <hobbes1069(a)gmail.com> - 0.26.0-2
- Update to latest upstream release.
mythweb-0.26-fixes.patch:
classes/Video.php | 14 ++++---
modules/stream/stream_raw.pl | 4 ++
modules/video/handler.php | 26 +++++++++----
modules/video/stream.php | 69 +++++++++++++++++++++++++++++++++++
modules/video/tmpl/default/video.php | 2 -
mythweb.php | 2 -
6 files changed, 101 insertions(+), 16 deletions(-)
--- NEW FILE mythweb-0.26-fixes.patch ---
classes/Video.php | 14 ++++----
modules/stream/stream_raw.pl | 4 +++
modules/video/handler.php | 26 +++++++++-----
modules/video/stream.php | 69 ++++++++++++++++++++++++++++++++++++
modules/video/tmpl/default/video.php | 2 +-
mythweb.php | 2 +-
6 files changed, 101 insertions(+), 16 deletions(-)
diff --git a/classes/Video.php b/classes/Video.php
index 7995aa4..5c6f7e4 100644
--- a/classes/Video.php
+++ b/classes/Video.php
@@ -90,12 +90,14 @@ class Video {
$this->childid = $video['childid'];
// Figure out the URL
$this->url = '#';
- if (file_exists('data/video/'))
- $this->url = implode('/', array_map('rawurlencode',
- array_map('utf8tolocal',
- explode('/',
- 'data/video/' .
preg_replace('#^'.$mythvideo_dir.'/?#', '', $this->filename)
- ))));
+ //// all junk, replacing
+// if (file_exists('data/video/'))
+// $this->url = implode('/', array_map('rawurlencode',
+// array_map('utf8tolocal',
+// explode('/',
+// 'data/video/' .
preg_replace('#^'.$mythvideo_dir.'/?#', '', $this->filename)
+// ))));
+ $this->url = 'video/stream?Id=' . $this->intid;
$genre = $db->query('SELECT idgenre
FROM videometadatagenre
WHERE idvideo = ?',
diff --git a/modules/stream/stream_raw.pl b/modules/stream/stream_raw.pl
index 31f6854..6981bca 100755
--- a/modules/stream/stream_raw.pl
+++ b/modules/stream/stream_raw.pl
@@ -30,6 +30,10 @@
$type = 'video/nuppelvideo';
$suffix = '.nuv';
}
+ elsif ($basename =~ /\.mkv$/) {
+ $type = 'video/x-matroska';
+ $suffix = '.mkv';
+ }
else {
print header(),
"Unknown video type requested: $basename\n";
diff --git a/modules/video/handler.php b/modules/video/handler.php
index fd769ce..721f186 100644
--- a/modules/video/handler.php
+++ b/modules/video/handler.php
@@ -15,8 +15,10 @@
* @global string $GLOBALS['mythvideo_dir']
* @name $mythvideo_dir
/**/
- global $mythvideo_dir;
- $mythvideo_dir = setting('VideoStartupDir', hostname);
+
+//// dont need this...
+// global $mythvideo_dir;
+// $mythvideo_dir = setting('VideoStartupDir', hostname);
// Load the video storage directories
$video_dirs = $db->query_list('
@@ -37,6 +39,7 @@
}
}
+/** nor any of this...
// Make sure the video directory exists
if (file_exists('data/video')) {
// File is not a directory or a symlink
@@ -93,7 +96,7 @@
.' reload this page.');
}
// Create a symlink to the first artwork directory that we find.
- /** @todo we should really support multiple directories, but it's too much effort
to hack in at the moment. */
+ // @todo we should really support multiple directories, but it's too much effort
to hack in at the moment.
else {
foreach ($artwork_dirs as $dir) {
if (is_dir($dir) || is_link($dir)) {
@@ -116,6 +119,7 @@
}
}
}
+*/
define('video_img_height', _or(setting('web_video_thumbnail_height',
hostname), 140));
define('video_img_width', _or(setting('web_video_thumbnail_width',
hostname), 94));
@@ -125,11 +129,17 @@
case 'edit':
require_once 'modules/video/edit.php';
exit;
- case 'imdb':
- require_once 'modules/video/imdb.php';
- exit;
- case 'scan':
- require_once 'modules/video/scan.php';
+//// this is probably doing bad things
+// case 'imdb':
+// require_once 'modules/video/imdb.php';
+// exit;
+//// this is broken, so disable it
+// case 'scan':
+// require_once 'modules/video/scan.php';
+// exit;
+//// new stuff
+ case 'stream':
+ require_once 'modules/video/stream.php';
exit;
}
diff --git a/modules/video/stream.php b/modules/video/stream.php
new file mode 100644
index 0000000..49a7298
--- /dev/null
+++ b/modules/video/stream.php
@@ -0,0 +1,69 @@
+<?php
+/**
+ * Stream a music file
+ *
+ * @license GPL
+ *
+ * @package MythWeb
+ * @subpackage Music
+/**/
+
+// Yes, a db connection
+ global $db;
+
+// Pull video ID
+ $vid_id = $_GET['Id'];
+
+// Get filename
+ list($fname) = $db->query_row('SELECT filename
+ FROM videometadata
+ WHERE intid = ?', $vid_id);
+
+// Mime type
+ switch (substr($fname, strrpos($fname, '.'))) {
+ case 'mpg':
+ case 'mpeg':
+ $mime = 'video/mpeg';
+ break;
+ case 'mp4':
+ $mime = 'video/mp4';
+ break;
+ case 'ogg':
+ case 'ogm':
+ case 'ogv':
+ $mime = 'video/ogg';
+ break;
+ case 'qt':
+ $mime = 'video/quicktime';
+ break;
+ case 'webm':
+ $mime = 'video/webm';
+ break;
+ case 'mkv':
+ $mime = 'video/x-matroska';
+ break;
+ case 'wmv':
+ $mime = 'video/x-ms-wmv';
+ break;
+ case 'flv':
+ $mime = 'video/x-flv';
+ break;
+ default:
+ $mime = 'applicatoin/octet-stream';
+ }
+ header('Content-Type: '.$mime);
+
+// Send the filename
+ header('Content-Disposition: filename="'.$fname.'"');
+
+// Send data via the backend
+ $Master_Host = setting('MasterServerIP');
+ $port = _or(get_backend_setting('BackendStatusPort', $Master_Host),
+ get_backend_setting('BackendStatusPort'));
+ if (stripos($Master_Host,':') !== false) {
+ $Master_Host = '['.$Master_Host.']';
+ }
+ readfile("http://$Master_Host:$port/Content/GetVideo?Id=".$vid_id);
+
+// Nothing else to do
+ exit;
diff --git a/modules/video/tmpl/default/video.php b/modules/video/tmpl/default/video.php
index e80176e..ad7e9a9 100644
--- a/modules/video/tmpl/default/video.php
+++ b/modules/video/tmpl/default/video.php
@@ -252,7 +252,7 @@
<table width="100%" border="0" cellpadding="4"
cellspacing="2" class="list small">
<tr class="menu">
<td>
- <span style="float: right"><input type="button"
value="<?php echo t('Scan Collection'); ?>"
class="submit" onclick="scan()"></span>
+<!-- Bad! Don't do this! <span style="float: right"><input
type="button" value="<?php echo t('Scan Collection');
?>" class="submit" onclick="scan()"></span> -->
<form action="<?php echo root_url; ?>video"
method="GET">
<?php echo t('Display'); ?>:
<select name="category" id="category"
onchange="filter();">
diff --git a/mythweb.php b/mythweb.php
index bba2aa8..79ff196 100644
--- a/mythweb.php
+++ b/mythweb.php
@@ -30,7 +30,7 @@
if (Modules::getModule($Path[0])) {
// Add the current module directory to our search path, so modules can
// define includes, etc.
- ini_set('include_path',
ini_get('include_path').':'.modules_path.'/'.$Path[0]);
+ ini_set('include_path',
ini_get('include_path').PATH_SEPARATOR.modules_path.'/'.$Path[0]);
// Load the module handler
require_once 'handler.php';
}
Index: ChangeLog
===================================================================
RCS file: /cvs/free/rpms/mythweb/EL-6/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ChangeLog 6 Jul 2012 18:07:34 -0000 1.1
+++ ChangeLog 25 Dec 2012 13:22:36 -0000 1.2
@@ -1,52 +1,21 @@
-commit 89a347c85284c5cf3ca3ad7250f21c7e698af858
-Author: Michael T. Dean <mdean(a)mythtv.org>
-Date: Wed May 30 17:19:55 2012 -0400
+commit f82ca9521775edbbc53caf0f40f7bc183732dcc2
+Author: Karl Dietz <dekarl(a)users.sourceforge.net>
+Date: Fri Aug 3 23:26:30 2012 +0200
- Fix MythWeb Upcoming Recordings programinfo usage.
+ Use PATH_SEPARATOR rather than ':' in mythweb.php.
- The programinfo refactor in #8406 changed the order of fields returned
- in a programinfo string list, and a reference was missed in the MythWeb
- Schedule class. The result is that any recording rule with recordid of
- 6 was skipped/didn't show in Upcoming Recordings.
+ Fixes #10791
- The original intent of the code was to skip recordings with recstatus of
- rsNotListed (as shown in commits e728aea5 and 508103511 , committed for
- which has since been modified, again, by a41e9657. (Therefore, the
- index in this commit is correct for 0.25-fixes and above, but should be
- 18 for 0.24-fixes.)
-
- Thanks to JK on the -users list for finding the issue.
- (cherry picked from commit 39a5dcd101ce7a6b97474f7b824b358f6e05c0cd)
+ Signed-off-by: Raymond Wagner <rwagner(a)mythtv.org>
+ (cherry picked from commit f9f5a1f43f2ddfeaa038054226f6ac0aa0b973e6)
-commit 8c43d8da31d738c75ec6abc9daff2772b16310c8
-Author: David Engel <david(a)istwok.net>
-Date: Mon Apr 30 17:01:44 2012 -0500
+commit 4fd9d5e05065c31e574e69251f872b1f53b7b027
+Author: R.D. Vaughan <r.d.vaughan(a)rogers.com>
+Date: Tue Oct 16 06:00:31 2012 -0400
- Clear the search type when creating an override or don't record for
- non-manual rules. Based on a patch from david.osguthorpe.
+ Add recognition of mkv containers to MythWeb for raw streaming.
- Fixes #10580 and fixes #10650 .
-
-commit 1833030d2ce0b5f2ec4f507031e6628458ca46b9
-Author: Kenni Lund <kenni(a)mythtv.org>
-Date: Wed Apr 11 21:06:29 2012 +0200
-
- Convert the Spanish (es_es) translation files to UTF8.
+ Fixes #11180
- Refs. #10575.
-
-commit 4d6e6219083446c024e8467cbff64ab42521b05c
-Author: Antonio Marcos López Alonso <amlopezalonso(a)gmail.com>
-Date: Wed Apr 11 20:55:18 2012 +0200
-
- Update the Spanish translation.
-
- Refs. #10575.
-
- Signed-off-by: Kenni Lund <kenni(a)mythtv.org>
-
-commit ed863708c02dd3620a7f4c0e37b118d00e712daa
-Author: Gavin Hurlbut <ghurlbut(a)mythtv.org>
-Date: Tue Apr 10 00:18:10 2012 -0700
-
- Force a commit
+ Signed-off-by: Raymond Wagner <rwagner(a)mythtv.org>
+ (cherry picked from commit ce2368132f823284588b02f8a1f66e0576d8c107)
Index: mythweb.spec
===================================================================
RCS file: /cvs/free/rpms/mythweb/EL-6/mythweb.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mythweb.spec 6 Jul 2012 18:07:34 -0000 1.1
+++ mythweb.spec 25 Dec 2012 13:22:36 -0000 1.2
@@ -1,15 +1,14 @@
# Mythweb from
github.com
# git hash for archive
-%global githash1 g89a347c
-# git hash for root source directory
-%global githash2 ae20c88
+%global githash1 g4dcd253
+%global githash2 4e9fd7a
Name: mythweb
Summary: The web interface to MythTV
URL:
http://www.mythtv.org/
Group: Applications/Multimedia
-Version: 0.25.1
+Version: 0.26.0
Release: 2%{?dist}
License: GPLv2 and LGPLv2 and MIT
@@ -19,9 +18,11 @@
Source1: mythweb.conf
Source2: ChangeLog
+Patch0: mythweb-0.26-fixes.patch
+
# Patch generated from mythweb fixes branch. From mythweb git directory:
# git diff -p --stat %{version} > mythweb-fixes.patch
-Patch1: mythweb-fixes.patch
+#Patch0: mythweb-fixes.patch
# The following are required only in mythweb is running on the same computer
# as the backend. They will be pulled in by the mythtv meta package anyway.
@@ -33,6 +34,7 @@
Requires: php-mysql
Requires: php-process
Requires: php-MythTV >= %{version}
+Requires: mythffmpeg
BuildArch: noarch
@@ -43,7 +45,7 @@
%prep
%setup -q -n MythTV-mythweb-%{githash2}
-#patch1 -p1 -b .mythweb
+%patch0 -p1
# Fix directory permissions
#find ./ -type d -exec chmod 0755 {} \;
@@ -64,17 +66,31 @@
cp -a * %{buildroot}%{_datadir}/mythweb/
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
cp %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/
-# drop .htaccess file, settings handled in the above
-rm -f %{buildroot}%{_datadir}/mythweb/data/.htaccess
+
+# Remove stuff covered by %%doc
+rm %{buildroot}%{_datadir}/mythweb/{LICENSE,README,INSTALL,ChangeLog}
%files
%doc README LICENSE ChangeLog
%config(noreplace) %{_sysconfdir}/httpd/conf.d/mythweb.conf
+%defattr(-,apache,apache,0755)
%{_datadir}/mythweb/
%changelog
+* Sat Dec 08 2012 Richard Shaw <hobbes1069(a)gmail.com> - 0.26.0-2
+- Update to latest upstream release.
+
+* Sun Oct 28 2012 Richard Shaw <hobbes1069(a)gmail.com> - 0.26.0-1
+- Update to latest upstream release.
+
+* Mon Jul 30 2012 Richard Shaw <hobbes1069(a)gmail.com> - 0.25.2-1
+- Update to latests release.
+
+* Fri Jul 06 2012 Richard Shaw <hobbes1069(a)gmail.com> - 0.25.1-3
+- Patch for PHP 5.4 warnings.
+
* Sun Jul 01 2012 Richard Shaw <hobbes1069(a)gmail.com> - 0.25.1-2
- Lots of tweaks per review request:
https://bugzilla.rpmfusion.org/show_bug.cgi?id=2366
--- mythweb-fixes.patch DELETED ---