commit 98e1c9b0610cbac1e57280b77811984723879708
Author: Richard M. Shaw <hobbes1069(a)gmail.com>
Date: Sat Jun 25 21:17:56 2016 -0500
Update to latest fixes.
.gitignore | 1 +
ChangeLog | 79 ++++++++++++++--
mythweb-0.27-fixes.patch | 232 -----------------------------------------------
mythweb-0.28-fixes.patch | 204 +++++++++++++++++++++++++++++++++++++++++
mythweb.spec | 26 +++---
sources | 2 +-
6 files changed, 294 insertions(+), 250 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 4112daf..7a7a007 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
mythweb-0.27.5.tar.gz
+/mythweb-0.28.tar.gz
diff --git a/ChangeLog b/ChangeLog
index 83861aa..30d5874 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,78 @@
-commit 7cefc58290d5ef2fc02ebf7e0d51b9532f2f8828
+commit a1f2cdf03978427eaa9e35fa18162a0ba6be829d
Author: Karl Dietz <dekarl(a)mythtv.org>
-Date: Sun Feb 7 19:12:28 2016 +0100
+Date: Thu Apr 28 07:52:51 2016 +0200
- fix syntax error after f4240e5e48f25fa40e84faabffa5522b009ab6e0
+ avoid returning one copy of each program per person in the cast/crew
- pointed out by Piotr Oniszczuk
+ (cherry picked from commit e3e1138f0fc652cc82adc74cf3c1c2b150660a06)
+
+commit 554d7e5212cac5d1f857db061fac16b7ef4368e7
+Author: Karl Dietz <dekarl(a)mythtv.org>
+Date: Thu Apr 28 07:51:05 2016 +0200
+
+ don't mix JOIN ON and JOIN USING in one query
+
+ (cherry picked from commit 51a7da64952eee5924b02bafda5867f425fcd6c7)
+
+commit 977563289052c975372db13a2a4078212f85fed0
+Author: Karl Dietz <dekarl(a)mythtv.org>
+Date: Mon Apr 25 00:02:49 2016 +0200
+
+ rewrite getAspect to use new recordedfile table
+
+ (cherry picked from commit 305b8a1a859fe78c382d185339bdb2b81576b2df)
+
+commit f1cb29b0b20586c959c5c2d33ed2b3853dab3f12
+Author: Karl Dietz <dekarl(a)mythtv.org>
+Date: Sun Apr 24 23:18:21 2016 +0200
+
+ remove grouping from SQL when loading programs
+
+ to work with the new defaults of MySQL 5.7.
+ Should reenable with e.g. ANY_VALUE or rewrite to use the Service API.
+
+ Refs #12713
+
+ (cherry picked from commit 24e5d7616bb28007b0b99f3055385af4921aba81)
+
+commit 0c07a6f3aae60ecc694966c32d0ca4757045edc5
+Author: Karl Dietz <dekarl(a)mythtv.org>
+Date: Sun Apr 24 21:13:40 2016 +0200
+
+ use NULL instead of ZERO datetime when saving to recording rules
+
+ for MySQL 5.7
+ Refs #12713
+
+ (cherry picked from commit 55ade6f31ae227f8a8344192614eb52e9893b8aa)
+
+commit cbca6cf230d2c4e2a68a3f63c0b482ec4a2e41cb
+Author: Charles Bovy <charles.bovy(a)gmail.com>
+Date: Sat Apr 23 17:38:46 2016 +0100
+
+ Fixes #12670. Ensure fine tune is set and not empty
+
+ Signed-off-by: Stuart Auchterlonie <stuarta(a)mythtv.org>
+ (cherry picked from commit 791b17285de13d94169ffd9c09103a71c684b216)
+
+commit 82c458123fd243cef9ce874e955e1a72fcc6e4a4
+Author: Karl Dietz <dekarl(a)mythtv.org>
+Date: Tue Apr 19 08:13:37 2016 +0200
+
+ unbreak "don't record" and getAspect()
+
+ Refs #12713
+
+ (cherry picked from commit 0ce44f7892249c953e15b45bfbe68387806ad8b3)
+
+commit 74e21c9a3bdb8d695373918f67b681e899ca8427
+Author: Karl Dietz <dekarl(a)mythtv.org>
+Date: Tue Apr 12 23:34:13 2016 +0200
+
+ use full group by for listing view
+
+ MySQL 5.7 enables ONLY_FULL_GROUP_BY by default
- Refs #12588
+ Refs #12713
- (cherry picked from commit 93adb4d962a27352fd1cf772d46af59d1b201090)
+ (cherry picked from commit 659c0f39051ca901a526418d702a23afd175e8aa)
diff --git a/mythweb-0.28-fixes.patch b/mythweb-0.28-fixes.patch
new file mode 100644
index 0000000..1be4307
--- /dev/null
+++ b/mythweb-0.28-fixes.patch
@@ -0,0 +1,204 @@
+ modules/tv/classes/Channel.php | 8 +++----
+ modules/tv/classes/Program.php | 50 +++++++++++++++-------------------------
+ modules/tv/classes/Schedule.php | 6 ++---
+ modules/tv/includes/programs.php | 17 +++++++-------
+ modules/tv/set_channels.php | 2 +-
+ 5 files changed, 35 insertions(+), 48 deletions(-)
+
+diff --git a/modules/tv/classes/Channel.php b/modules/tv/classes/Channel.php
+index 8fac90a..a435028 100644
+--- a/modules/tv/classes/Channel.php
++++ b/modules/tv/classes/Channel.php
+@@ -50,7 +50,7 @@ class Channel extends MythBase {
+ $channel_list = Cache::get('[channelList]');
+ if (is_null($channel_list)) {
+ global $db;
+- $sql = 'SELECT channel.chanid FROM channel';
++ $sql = 'SELECT MIN(channel.chanid) AS chanid FROM channel';
+ if ($_SESSION['guide_favonly']) {
+ $sql .= ', channelgroup, channelgroupnames WHERE channel.chanid =
channelgroup.chanid AND channelgroup.grpid = channelgroupnames.grpid AND
channelgroupnames.name = \'Favorites\'';
+ if ($filtered)
+@@ -62,7 +62,7 @@ class Channel extends MythBase {
+ // Sort
+ $sql .= ' ORDER BY '
+ .($_SESSION["sortby_channum"] ? '' :
'channel.callsign, ')
+- .'(channel.channum + 0), channel.channum, channel.chanid';
// sort by channum as both int and string to grab subchannels
++ .'(channel.channum + 0), channel.channum'; // sort by
channum as both int and string to grab subchannels
+ // Query
+ $sh = $db->query($sql);
+ $channel_list = array();
+@@ -77,7 +77,7 @@ class Channel extends MythBase {
+ $callsign_list = Cache::get('[callsignList]');
+ if (is_null($callsign_list)) {
+ global $db;
+- $sql = 'SELECT channel.chanid, channel.channum, channel.callsign FROM
channel';
++ $sql = 'SELECT MIN(channel.chanid) AS chanid, channel.channum,
channel.callsign FROM channel';
+ if ($_SESSION['guide_favonly'])
+ $sql .= ', channelgroup, channelgroupnames WHERE channel.chanid =
channelgroup.chanid AND channelgroup.grpid = channelgroupnames.grpid AND
channelgroupnames.name = \'Favorites\' AND';
+ else
+@@ -87,7 +87,7 @@ class Channel extends MythBase {
+ // Sort
+ $sql .= ' ORDER BY '
+ .($_SESSION["sortby_channum"] ? '' :
'channel.callsign, ')
+- .'(channel.channum + 0), channel.channum, channel.chanid';
// sort by channum as both int and string to grab subchannels
++ .'(channel.channum + 0), channel.channum'; // sort by
channum as both int and string to grab subchannels
+ // Query
+ $sh = $db->query($sql);
+ $callsign_list = array();
+diff --git a/modules/tv/classes/Program.php b/modules/tv/classes/Program.php
+index 57ce447..53f404d 100644
+--- a/modules/tv/classes/Program.php
++++ b/modules/tv/classes/Program.php
+@@ -629,21 +629,25 @@ class Program extends MythBase {
+ **/
+ public function rec_never_record() {
+ global $db;
+- $sh = $db->query('REPLACE INTO oldrecorded
(chanid,starttime,endtime,title,subtitle,description,category,seriesid,programid,recordid,station,rectype,recstatus,duplicate)
VALUES ('
++ $sh = $db->query('REPLACE INTO oldrecorded
(chanid,starttime,endtime,title,subtitle,description,season,episode,category,seriesid,programid,inetref,recordid,station,rectype,recstatus,duplicate,generic)
VALUES ('
+ .escape($this->chanid)
.','
+ .'NOW()'
.','
+ .'NOW()'
.','
+ .escape($this->title)
.','
+ .escape($this->subtitle)
.','
+ .escape($this->description)
.','
++ .escape(isset($this->season) ? $this->season : 0)
.','
++ .escape(isset($this->episode) ? $this->episode :
0) .','
+ .escape($this->category)
.','
+ .escape($this->seriesid)
.','
+ .escape($this->programid)
.','
++ .escape($this->inetref)
.','
+ .escape(isset($this->recordid) ? $this->recordid :
0) .','
+ .escape($this->channel->callsign)
.','
+ .escape(isset($this->rectype) ? $this->rectype :
0) .','
+ .'11'
.','
+- .'1'
.')')
++ .'1'
.','
++ .'0'
.')')
+ or trigger_error('SQL Error: '.$db->error, FATAL);
+ $sh->finish();
+ // Notify the backend of the changes
+@@ -770,40 +774,22 @@ class Program extends MythBase {
+
+ public function getAspect() {
+ global $db;
+- $sh = $db->query('SELECT recordedmarkup.type,
+- recordedmarkup.data
+- FROM recordedmarkup
+- WHERE recordedmarkup.chanid = ?
+- AND recordedmarkup.starttime = FROM_UNIXTIME(?)
+- AND recordedmarkup.type IN (10, 11, 12, 13, 14)
+- GROUP BY recordedmarkup.type
+- ORDER BY SUM((SELECT IFNULL(rm.mark, recordedmarkup.mark)
+- FROM recordedmarkup AS rm
+- WHERE rm.chanid = recordedmarkup.chanid
+- AND rm.starttime = recordedmarkup.starttime
+- AND rm.type IN (10, 11, 12, 13, 14)
+- AND rm.mark > recordedmarkup.mark
+- ORDER BY rm.mark ASC LIMIT 1)- recordedmarkup.mark)
DESC
+- LIMIT 1',
+- $this->chanid,
+- $this->recstartts
++ $sh = $db->query('SELECT aspect
++ FROM recordedfile
++ WHERE recordedid = ?',
++ $this->recordedid
+ );
+ $row = $sh->fetch_assoc();
+ $sh->finish();
+
+- switch($row['type']) {
+- case 10:
+- return 1;
+- case 11:
+- return 4/3;
+- case 12:
+- return 16/9;
+- case 13:
+- return 2.21/1;
+- case 14:
+- return $row['data']/1000000.0;
+- default:
+- return 4/3;
++ if (($row['aspect'] > 1.777777) && ($row['aspect']
< 1.777779)) {
++ // avoid low precision 16:9 to avoid 320x179 thumbnails
++ return 16/9;
++ } elseif ($row['aspect'] > 1) {
++ return $row['aspect'];
++ } else {
++ // default 4:3
++ return 4/3;
+ }
+ }
+ }
+diff --git a/modules/tv/classes/Schedule.php b/modules/tv/classes/Schedule.php
+index 8cbfac4..c63f948 100644
+--- a/modules/tv/classes/Schedule.php
++++ b/modules/tv/classes/Schedule.php
+@@ -374,9 +374,9 @@ class Schedule extends MythBase {
+ _or($this->playgroup, 'Default' ),
+ _or($this->storagegroup, 'Default' ),
+ _or($this->prefinput, 0, true),
+- _or($this->next_record, '00:00:00' ),
+- _or($this->last_record, '00:00:00' ),
+- _or($this->last_delete, '00:00:00' ),
++ _or($this->next_record, NULL ),
++ _or($this->last_record, NULL ),
++ _or($this->last_delete, NULL ),
+ _or($this->inetref, '' ),
+ _or($this->season, 0 ),
+ _or($this->episode, 0 ),
+diff --git a/modules/tv/includes/programs.php b/modules/tv/includes/programs.php
+index dff6eb4..e64a27c 100644
+--- a/modules/tv/includes/programs.php
++++ b/modules/tv/includes/programs.php
+@@ -97,7 +97,7 @@
+ trigger_error("load_all_program_data() attempted with out any
channels", FATAL);
+ $these_channels = implode(',', $these_channels);
+ // Build the sql query, and execute it
+- $query = 'SELECT program.*,
++ $query = 'SELECT DISTINCT program.*,
+ UNIX_TIMESTAMP(program.starttime) AS starttime_unix,
+ UNIX_TIMESTAMP(program.endtime) AS endtime_unix,
+ IFNULL(programrating.system, "") AS rater,
+@@ -106,9 +106,9 @@
+ channel.channum
+ FROM program USE INDEX (id_start_end)
+ LEFT JOIN programrating USING (chanid, starttime)
+- LEFT JOIN channel ON program.chanid = channel.chanid
+- LEFT JOIN credits ON (program.chanid = credits.chanid AND
program.starttime = credits.starttime)
+- LEFT JOIN people ON (credits.person = people.person)
++ LEFT JOIN channel USING (chanid)
++ LEFT JOIN credits USING (chanid, starttime)
++ LEFT JOIN people USING (person)
+ WHERE';
+ // Only loading a single channel worth of information
+ if ($chanid > 0)
+@@ -128,10 +128,11 @@
+ if ($extra_query)
+ $query .= ' AND '.$extra_query;
+ // Group and sort
+- if (!$distinctTitle)
+- $query .= "\nGROUP BY channel.callsign, program.chanid,
program.starttime";
+- else
+- $query .= "\nGROUP BY program.title";
++ // FIXME reenable with e.g. ANY_VALUE or rewrite to use the Service API
++ // if (!$distinctTitle)
++ // $query .= "\nGROUP BY channel.callsign, program.chanid,
program.starttime";
++ // else
++ // $query .= "\nGROUP BY program.title";
+ $query .= " ORDER BY program.starttime";
+ // Limit
+ if ($single_program)
+diff --git a/modules/tv/set_channels.php b/modules/tv/set_channels.php
+index 7bdd4fb..9534b21 100644
+--- a/modules/tv/set_channels.php
++++ b/modules/tv/set_channels.php
+@@ -33,7 +33,7 @@
+ visible = ?';
+ $query_params[] = $data['xmltvid'];
+ $query_params[] = $data['freqid'];
+- $query_params[] = $data['finetune'];
++ $query_params[] = empty($data['finetune']) ? 0 :
$data['finetune'];
+ $query_params[] = $data['videofilters'];
+ $query_params[] = $data['brightness'];
+ $query_params[] = $data['contrast'];
diff --git a/mythweb.spec b/mythweb.spec
index 10cb235..e74303e 100644
--- a/mythweb.spec
+++ b/mythweb.spec
@@ -1,11 +1,11 @@
-%global vers_string v0.27.6
+%global vers_string v0.28-8-ga1f2cdf
Name: mythweb
Summary: The web interface to MythTV
URL:
http://www.mythtv.org/
-Version: 0.27.6
-Release: 2%{?dist}
+Version: 0.28
+Release: 1%{?dist}
License: GPLv2 and LGPLv2 and MIT
@@ -15,7 +15,7 @@ Source2: ChangeLog
# Patch generated from mythweb fixes branch. From mythweb git directory:
# git diff -p --stat %{version} > mythweb-fixes.patch
-Patch0: mythweb-0.27-fixes.patch
+Patch0: mythweb-0.28-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.
@@ -40,9 +40,6 @@ The web interface to MythTV.
%setup -q -n %{name}-%{version}
%patch0 -p1
-# Fix directory permissions
-#find ./ -type d -exec chmod 0755 {} \;
-
# Non-executable scripts don't need shebangs
sed -i modules/coverart/handler.pl -e '/\/usr\/bin\/perl/d'
@@ -61,12 +58,12 @@ cp -a * %{buildroot}%{_datadir}/mythweb/
# data dir needs to be a directory suitable for writing
mkdir -p %{buildroot}%{_sharedstatedir}/%{name}
mv %{buildroot}%{_datadir}/%{name}/data %{buildroot}%{_sharedstatedir}/%{name}/
-pushd %{buildroot}%{_datadir}/%{name}
-ln -s ../../..%{_sharedstatedir}/%{name}/data
+ln -sr %{buildroot}%{_sharedstatedir}/%{name}/data \
+ %{buildroot}%{_datadir}/%{name}
# Install httpd config
mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d
-cp %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/
+install -pm 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/
# Remove stuff covered by %%doc
rm %{buildroot}%{_datadir}/mythweb/{LICENSE,README,INSTALL,ChangeLog}
@@ -96,7 +93,8 @@ fi
%files
-%doc README LICENSE ChangeLog
+%doc README ChangeLog
+%license LICENSE
%config(noreplace) %{_sysconfdir}/httpd/conf.d/mythweb.conf
%{_datadir}/%{name}/
%defattr(-,apache,apache,0755)
@@ -104,6 +102,12 @@ fi
%changelog
+* Tue May 3 2016 Richard Shaw <hobbes1069(a)gmail.com> - 0.28-2
+- Update to latest fixes.
+
+* Tue Apr 19 2016 Richard Shaw <hobbes1069(a)gmail.com> - 0.28-1
+- Update to latest fixes.
+
* Fri Feb 19 2016 Richard Shaw <hobbes1069(a)gmail.com> - 0.27.6-2
- Update to latest fixes.
diff --git a/sources b/sources
index b1f0dc3..068b5c3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-5415eb224b4e31cae22c0efdc705ccc5 mythweb-0.27.5.tar.gz
+9c2cfb0440a188d313ef9ad5fd1cccfe mythweb-0.28.tar.gz