commit 4d0882c41fd15b6bbef3629ea10ab92ed57d81c3
Author: Richard Shaw <hobbes1069(a)gmail.com>
Date: Thu Jun 2 21:45:30 2022 -0500
Update to v32.0-40-gb05906a6.
ChangeLog | 315 ++++++++++++++++++++++++++++
mythweb-fixes.patch | 585 ++++++++++++++++++++++++++++++++++++++++++++++++++++
mythweb.spec | 7 +-
3 files changed, 906 insertions(+), 1 deletion(-)
---
diff --git a/ChangeLog b/ChangeLog
index e69de29..034b840 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,315 @@
+commit b05906a68a9f1f6615653b22f184d39c2503f95c
+Author: Roland Ernst <rcrernst(a)gmail.com>
+Date: Sun Mar 13 10:34:12 2022 +0100
+
+ Use SQL standard syntax in query
+
+ instead of ORACLE syntax.
+
+ This solves the error ERROR 1064 (42000) from MySQL:
+ You have an error in your SQL syntax; check for the right syntax to
+ use near 'UNIQUE(people.name) FROM credits.
+
+ (cherry picked from commit f4bf29dec9c801b922e43aeeaaaf9b3bdc1dde9f)
+
+commit afc4a556131905cf2349fc6a7668ebd5e6f71c66
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Fri Mar 11 21:19:11 2022 +0000
+
+ Whitespace clean up.
+
+ (cherry picked from commit 7949949ba481f6d4e6632215c10488a48969b2ba)
+
+commit 73e79b88fd365266065fea93d45c5b3689bc5bd2
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Fri Mar 11 21:14:17 2022 +0000
+
+ Better handling of tmpl constant.
+
+ (cherry picked from commit c82ed0b19e3d0221303b235ba4dd7e5a8ab8f6cd)
+
+commit d642bdc12b5b7f646a1be49ebdde6d596d396184
+Merge: ed4c25df 154956e9
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 20:22:28 2022 +0000
+
+ Merge pull request #47 from mymatenige/includes-sorting
+
+ Use REQUEST_URI rather than PATH_INFO due to decoding issues.
+
+commit ed4c25dfc2c9e53a87b7ba3ae66ca538d95f272e
+Merge: 736e3796 ca8d0daa
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 20:16:46 2022 +0000
+
+ Merge pull request #60 from mymatenige/schedules-table-sort
+
+ Add support for table header sorting with recording schedules.
+
+commit 736e37964f24b9deb9c2922edf2de326213721a0
+Merge: 428dbfe3 dff18157
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 20:15:30 2022 +0000
+
+ Merge pull request #55 from mymatenige/modules-tv-tmpl-lite-schedules
+
+ Do not display templates in the recording schedule list.
+
+commit 428dbfe37b90cf39dd40d632bff27f70534b6948
+Merge: 9d7c035c 7dd9eb9e
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 20:14:47 2022 +0000
+
+ Merge pull request #53 from mymatenige/modules-tv-tmpl-lite-detail
+
+ Do not reference recgroup when calling recgroup_select.
+
+commit 9d7c035cf30a0a6ff79ba571273382fcf0d85353
+Merge: c4abbb0c e0cc9536
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 20:14:00 2022 +0000
+
+ Merge pull request #48 from mymatenige/modules-tv-schedules
+
+ Add default sort order for tv/schedules.
+
+commit c4abbb0c5c5fd7df7c4efeb715d4541f2c775358
+Merge: c3cd36cc 286ecda3
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 20:12:20 2022 +0000
+
+ Merge pull request #42 from mkbloke/stream-raw
+
+ Fix "isn't numeric" error in range request header parsing
+
+commit c3cd36cccc34fe424aa57d059bde7ed85b9d79db
+Merge: 8a02a563 793237a6
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 20:09:29 2022 +0000
+
+ Merge pull request #61 from citronalco/escape_newline
+
+ Escape newlines in title and subtitle for Javascript
+
+commit 8a02a56390dfaf1250e5206cba45c69254cf6c0a
+Merge: 2bb3f25f c4793911
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 20:08:48 2022 +0000
+
+ Merge pull request #51 from mymatenige/includes-session
+
+ Add missing return value.
+
+commit 2bb3f25f7fb3e56f07f73bca68b576c369017361
+Merge: 653c1b82 9292d74f
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 19:54:11 2022 +0000
+
+ Merge pull request #77 from kroseneg/fix-videoprop
+
+ Fix videoproperties which were wrong after the schema change to 1362 …
+
+commit 653c1b824bada8d0449e82044d82bda59771f65f
+Merge: 1a544bcd a11f393e
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 19:53:30 2022 +0000
+
+ Merge pull request #76 from mkbloke/music
+
+ Update music cookies to enable SameSite=Strict
+
+commit 1a544bcd6f00903131cd3f3ba8a31035920fdbc8
+Merge: de8d4e97 b9992265
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 19:52:59 2022 +0000
+
+ Merge pull request #75 from mkbloke/apple-touch-icons
+
+ Correct paths for apple-touch-icons
+
+commit de8d4e973b40565e4277b71526c9b98020272ed6
+Merge: 0c176f0f 261c6029
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 19:52:44 2022 +0000
+
+ Merge pull request #73 from mkbloke/session
+
+ Update mythweb_id cookie to enable SameSite=Strict
+
+commit 0c176f0fbd1b36086b90decf19f2e2d169ff8071
+Merge: c1aeb2b6 4fc9840d
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 19:52:19 2022 +0000
+
+ Merge pull request #66 from mymatenige/theme_timeslot_size
+
+ Undefined constant 'theme_timeslot_size'.
+
+commit c1aeb2b66cca323d64f8cf9c8539eddab36e64ac
+Merge: 37e01a06 9e9aaf92
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 19:51:55 2022 +0000
+
+ Merge pull request #68 from mymatenige/js-table_sort-typo
+
+ Fix simple typo.
+
+commit 37e01a06d8ff94d23ffa6e0e012680abaaffdada
+Merge: 45f60a6f 860836bd
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 19:51:36 2022 +0000
+
+ Merge pull request #70 from mymatenige/modules-mythweb-tmpl-default-set_flvplayer
+
+ Fix typo in ffmpeg.app path.
+
+commit 45f60a6ff80980e11e8b925488bf41115f7a3715
+Merge: a44f7a81 d2aa1925
+Author: Stuart Auchterlonie <stuarta(a)mythtv.org>
+Date: Wed Mar 9 19:51:08 2022 +0000
+
+ Merge pull request #71 from garybuhrmaster/people-order
+
+ Display people in priority order when displaying program details
+
+commit 9292d74f30277bd1327285de2a787c7415724e6e
+Author: Korbinian Rosenegger <kroseneg(a)schmidham.net>
+Date: Mon Mar 7 19:09:49 2022 +0100
+
+ Fix videoproperties which were wrong after the schema change to 1362 in commit
e79b8fc.
+
+commit 261c6029328ac2ff4a062c46f173f9cc503509be
+Author: Ian Cameron <1661072+mkbloke(a)users.noreply.github.com>
+Date: Fri Feb 25 17:38:51 2022 +0000
+
+ Update mythweb_id cookie to enable SameSite=Strict
+
+commit a11f393e423e46c73300472f81f907119823636a
+Author: Ian Cameron <1661072+mkbloke(a)users.noreply.github.com>
+Date: Fri Feb 25 20:08:22 2022 +0000
+
+ Update music cookies to enable SameSite=Strict
+
+commit b99922652090c1ab9db173a1d6cc4c939adfd35c
+Author: Ian Cameron <1661072+mkbloke(a)users.noreply.github.com>
+Date: Fri Feb 25 19:31:32 2022 +0000
+
+ Correct paths for apple-touch-icons
+
+commit d2aa192561808b213686620670dc15259292395f
+Author: Gary Buhrmaster <gary.buhrmaster(a)gmail.com>
+Date: Mon Dec 13 17:41:52 2021 +0000
+
+ Display people in priority order when displaying program details
+
+ With MythTV commit bf47572d56 (Include actor roles in cast info)
+ the credits table now maintains the order received from a XMLTV
+ feed(1). This patch returns the credits in the order specified
+ for display purposes. Because an actor may play multiple
+ characters in certain shows, only return an actor's name once.
+
+ Fixes: #40
+
+ (1) All XMLTV grabbers are expected to provide the credits in
+ the order of billing to the best of their abilities, which
+ is typically limited to their upstream guide source(s).
+
+commit 9e9aaf924b5b0719b7a2e4c4df20a7daa736d2af
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sun Dec 12 17:46:59 2021 +0000
+
+ Fix simple typo.
+
+commit 860836bd8c63cfd4f3fcfd51e5e0680fc123f92a
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sun Dec 12 17:32:31 2021 +0000
+
+ Fix typo in ffmpeg.app path.
+
+commit 4fc9840df5fe819e8f6ee9fd61a0d8d97f662477
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Fri Dec 10 22:32:58 2021 +0000
+
+ Undefined constant 'theme_timeslot_size'.
+
+commit 793237a6dda6e75be9887af5e9fde5e6fc6c587c
+Author: Bernhard Geier <2651739+citronalco(a)users.noreply.github.com>
+Date: Sun Oct 10 22:06:43 2021 +0200
+
+ Escape newlines in title and subtitle for javascript
+
+commit ca8d0daa3ed32d44744069c798b0adc44d93765d
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Mon Sep 27 19:58:27 2021 +0100
+
+ Do not edit schedule->channel, it has knock on effects.
+
+commit ae032391414c774f2177c4282b60728df828556e
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sun Sep 26 20:28:50 2021 +0100
+
+ Remove unnecessary sort_hints.
+
+commit c779cbdcbaa6b19b3661f3ca244ffc8d833760cd
+Merge: 22ed144c e79811a3
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sun Sep 26 20:11:08 2021 +0100
+
+ Merge branch 'js-table_sort-schedule' into schedules-table-sort
+
+commit e79811a38065c5cf27a999ecb4d85e261e9d7ec9
+Merge: 407113c0 30e96d51
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sun Sep 26 20:06:42 2021 +0100
+
+ Merge branch 'master' into js-table_sort-schedule
+
+commit 22ed144cb24950e9359c5e419cc9b8cf96736e91
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sun Sep 26 19:43:37 2021 +0100
+
+ Add support for table header sorting with recording schedules.
+
+commit dff18157473bef9a3d259cc2384634016f2a2148
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sun Sep 26 19:05:30 2021 +0100
+
+ Do not display templates in the recording schedule list.
+
+commit 7dd9eb9e1633e5fa174ad54733fdb0810edb8bac
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sun Sep 26 18:52:34 2021 +0100
+
+ Do not reference recgroup when calling recgroup_select.
+
+commit 407113c024b034f5daaafa2ad893bff7f76c89b9
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sun Sep 19 07:47:23 2021 +0100
+
+ Fix the sorting by title in JavaScript.
+ Ignores A, An and The prefixes.
+
+commit c4793911ebe68085abcf4e59da9f0d92d9707552
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sat Sep 18 08:25:24 2021 +0100
+
+ Add missing return value.
+ "Session callback expects true/false return value!!".
+
+commit e0cc95367cc022961259e6136ce470e913d91ac8
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sat Sep 18 08:14:19 2021 +0100
+
+ Add default sort order for tv/schedules.
+
+commit 154956e9a3eca8d5b78cc1d03a0914ff2f0465a8
+Author: Nigel Jewell <nige(a)grufty.co.uk>
+Date: Sat Sep 18 08:07:47 2021 +0100
+
+ Use REQUEST_URI rather than PATH_INFO due to decoding issues.
+
+commit 286ecda3ea49727dc728ca81ceb71585660db8a8
+Author: Ian Cameron <1661072+mkbloke(a)users.noreply.github.com>
+Date: Thu Aug 12 01:30:19 2021 +0100
+
+ Fix "isn't numeric" error in range request header parsing
diff --git a/mythweb-fixes.patch b/mythweb-fixes.patch
new file mode 100644
index 0000000..56d5f84
--- /dev/null
+++ b/mythweb-fixes.patch
@@ -0,0 +1,585 @@
+diff --git a/includes/session.php b/includes/session.php
+index 1bf4f1e6..fb075f3b 100644
+--- a/includes/session.php
++++ b/includes/session.php
+@@ -19,7 +19,15 @@
+ ini_set('session.gc_maxlifetime', 60 * 60 * 24 * 30); // 30 day timeout on
sessions
+ session_set_save_handler('sess_do_nothing', 'sess_do_nothing',
'sess_read', 'sess_write', 'sess_destroy', 'sess_gc');
+ session_start();
+- setcookie(session_name(), session_id(), time() + 60*60*24*30, '/'); //
Update 30 day timeout
++ if (PHP_VERSION_ID < 70300) {
++ setcookie(session_name(), session_id(), time() + 60*60*24*30, '/;
SameSite=Strict'); // Update 30 day timeout
++ } else {
++ setcookie(session_name(), session_id(), [
++ 'expires' => time() + 60*60*24*30,
++ 'path' => '/',
++ 'samesite' => 'Strict'
++ ]);
++ }
+
+ // Register a destruction handler for the db object, since the guys who write
+ // PHP are smoking something and think objects should be destroyed before the
+@@ -65,7 +73,7 @@
+ function sess_write($id, $data) {
+ global $db;
+ if (empty($db))
+- return;
++ return false;
+ if (!empty($_SERVER['REMOTE_USER']))
+ $id = 'user:'.$_SERVER['REMOTE_USER'];
+ $db->query('REPLACE INTO mythweb_sessions (id, modified, data) VALUES
(?,CURRENT_TIMESTAMP,?)',
+diff --git a/includes/sorting.php b/includes/sorting.php
+index e307525b..3b94f013 100644
+--- a/includes/sorting.php
++++ b/includes/sorting.php
+@@ -16,7 +16,7 @@
+ **/
+ function get_sort_link($field, $string) {
+ // Get the URL
+- $url = substr($_SERVER['PATH_INFO'], 1);
++ $url = substr(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 1);
+ if (empty($url))
+ $url = str_replace('mythweb.php/', '',
$_SERVER['PHP_SELF']);
+ else
+@@ -235,3 +235,53 @@
+ if ($a->transcoder == $b->transcoder) return 0;
+ return ($a->transcoder > $b->transcoder) ? 1 : -1;
+ }
++
++ function by_callsign_with_type(&$a, &$b) {
++ // If this is an 'always on any channel' or 'find one' recording
without the 'This Channel' filter, set the callsign to 'Any'
++ if (($a->type == rectype_always || $a->type == rectype_findone) &&
!($a->filter & (1 << 10)))
++ $ac = '['.t('Any').']';
++ else
++ $ac = $a->channel->callsign;
++
++ if (($b->type == rectype_always || $b->type == rectype_findone) &&
!($b->filter & (1 << 10)))
++ $bc = '['.t('Any').']';
++ else
++ $bc = $b->channel->callsign;
++
++ return strnatcasecmp($ac, $bc);
++ }
++
++ function by_channum_with_type(&$a, &$b) {
++ // If this is an 'always on any channel' or 'find one' recording
without the 'This Channel' filter, set the channum to 'Any'
++ if (($a->type == rectype_always || $a->type == rectype_findone) &&
!($a->filter & (1 << 10)))
++ $ac = '['.t('Any').']';
++ else
++ $ac = $a->channel->channum;
++
++ if (($b->type == rectype_always || $b->type == rectype_findone) &&
!($b->filter & (1 << 10)))
++ $bc = '['.t('Any').']';
++ else
++ $bc = $b->channel->channum;
++
++ return strnatcasecmp($ac, $bc);
++ }
++
++ function by_endoffset(&$a, &$b) {
++ if ($a->endoffset == $b->endoffset) return 0;
++ return ($a->endoffset > $b->endoffset) ? 1 : -1;
++ }
++
++ function by_last_record(&$a, &$b) {
++ if ($a->last_record == $b->last_record) return 0;
++ return ($a->last_record > $b->last_record) ? 1 : -1;
++ }
++
++ function by_startoffset(&$a, &$b) {
++ if ($a->startoffset == $b->startoffset) return 0;
++ return ($a->startoffset > $b->startoffset) ? 1 : -1;
++ }
++
++ function by_storagegroup(&$a, &$b) {
++ if ($a->storagegroup == $b->storagegroup) return 0;
++ return ($a->storagegroup > $b->storagegroup) ? 1 : -1;
++ }
+diff --git a/includes/utils.php b/includes/utils.php
+index 4e30d010..a67171b0 100644
+--- a/includes/utils.php
++++ b/includes/utils.php
+@@ -331,8 +331,9 @@
+
+ // Template finder helper
+ function get_template_file($module, $file) {
+- $tmpl = tmpl;
+- if (tmpl == 'tmpl')
++ if (defined('tmpl'))
++ $tmpl = tmpl;
++ else
+ $tmpl = 'default';
+
+ return "modules/{$module}/tmpl/{$tmpl}/{$file}";
+diff --git a/js/table_sort.js b/js/table_sort.js
+index 2608818c..adaeb566 100644
+--- a/js/table_sort.js
++++ b/js/table_sort.js
+@@ -201,7 +201,7 @@ var SortableTable = Class.create({
+ this.doHeaderArrows();
+ // Fix any zebra striping
+ this.fixZebraStripes();
+- // Remove the current index fromt he previous sorts and make sure it's uniq
++ // Remove the current index from the previous sorts and make sure it's uniq
+ this.cache_previous_sorts =
this.cache_previous_sorts.without(this.sort_cell_index).uniq();
+ // Add in the sorted col
+ this.cache_previous_sorts.push(this.sort_cell_index);
+diff --git a/modules/_shared/tmpl/default/header.php
b/modules/_shared/tmpl/default/header.php
+index 9360baf7..bbab3697 100644
+--- a/modules/_shared/tmpl/default/header.php
++++ b/modules/_shared/tmpl/default/header.php
+@@ -50,9 +50,9 @@ EOF;
+ <link rel="icon" href="<?php echo skin_url
?>img/favicon.ico" type="image/x-icon">
+ <link rel="shortcut icon" href="<?php echo skin_url
?>img/favicon.ico" type="image/x-icon">
+
+- <link rel="apple-touch-icon" href="<?php echo skin_url
?>img/apple-touch-icon.png" />
+- <link rel="apple-touch-icon" sizes="72x72"
href="<?php echo skin_url ?>img/apple-touch-icon-72x72.png" />
+- <link rel="apple-touch-icon" sizes="114x114"
href="<?php echo skin_url ?>img/apple-touch-icon-114x114.png" />
++ <link rel="apple-touch-icon" href="<?php echo skin_url
?>img/apple-touch-icons/apple-touch-icon.png" />
++ <link rel="apple-touch-icon" sizes="72x72"
href="<?php echo skin_url
?>img/apple-touch-icons/apple-touch-icon-72x72.png" />
++ <link rel="apple-touch-icon" sizes="114x114"
href="<?php echo skin_url
?>img/apple-touch-icons/apple-touch-icon-114x114.png" />
+
+ <link type="application/opensearchdescription+xml"
rel="search" href="tv/opensearch?type=xml"
title="MythTV">
+
+diff --git a/modules/_shared/tmpl/lite/header.php b/modules/_shared/tmpl/lite/header.php
+index 4c0e0865..c471b9de 100644
+--- a/modules/_shared/tmpl/lite/header.php
++++ b/modules/_shared/tmpl/lite/header.php
+@@ -21,9 +21,9 @@
+ <link rel="icon" href="<?php echo skin_url
?>/img/favicon.ico" type="image/x-icon" />
+ <link rel="shortcut icon" href="<?php echo skin_url
?>/img/favicon.ico" type="image/x-icon" />
+
+- <link rel="apple-touch-icon" href="<?php echo skin_url
?>img/apple-touch-icon.png" />
+- <link rel="apple-touch-icon" sizes="72x72"
href="<?php echo skin_url ?>img/apple-touch-icon-72x72.png" />
+- <link rel="apple-touch-icon" sizes="114x114"
href="<?php echo skin_url ?>img/apple-touch-icon-114x114.png" />
++ <link rel="apple-touch-icon" href="<?php echo skin_url
?>img/apple-touch-icons/apple-touch-icon.png" />
++ <link rel="apple-touch-icon" sizes="72x72"
href="<?php echo skin_url
?>img/apple-touch-icons/apple-touch-icon-72x72.png" />
++ <link rel="apple-touch-icon" sizes="114x114"
href="<?php echo skin_url
?>img/apple-touch-icons/apple-touch-icon-114x114.png" />
+
+ <meta http-equiv="content-type" content="text/html;
charset=utf-8" />
+ <meta name="robots" content="noindex, nofollow">
+diff --git a/modules/music/mp3act_functions.php b/modules/music/mp3act_functions.php
+index d4683442..4c178772 100644
+--- a/modules/music/mp3act_functions.php
++++ b/modules/music/mp3act_functions.php
+@@ -1133,7 +1133,15 @@ function internalUpdatePlaylist($songs, $count, $length)
+ $plId = $db->insert_id();
+ if ($plId)
+ {
+- setcookie('mp3act_playlist_id', $plId, time()+MYTH_PLAYLIST_SAVE_TIME);
++ if (PHP_VERSION_ID < 70300) {
++ setcookie('mp3act_playlist_id', $plId, time()+MYTH_PLAYLIST_SAVE_TIME,
'/; SameSite=Strict');
++ } else {
++ setcookie('mp3act_playlist_id', $plId, [
++ 'expires' => time()+MYTH_PLAYLIST_SAVE_TIME,
++ 'path' => '/',
++ 'samesite' => 'Strict'
++ ]);
++ }
+ return $plId;
+ }
+ }
+@@ -1272,7 +1280,15 @@ function clearPlaylist()
+ $pl = internalGetPlaylist();
+
+ // Trash the cookie (empties the playlist)
+- setcookie('mp3act_playlist_id', false, time()-3600);
++ if (PHP_VERSION_ID < 70300) {
++ setcookie('mp3act_playlist_id', false, time()-3600, '/;
SameSite=Strict');
++ } else {
++ setcookie('mp3act_playlist_id', false, [
++ 'expires' => time()-3600,
++ 'path' => '/',
++ 'samesite' => 'Strict'
++ ]);
++ }
+
+ if (!empty($pl['playlist_name'])
+ && MYTH_WEB_PLAYLIST_NAME == $pl['playlist_name'])
+@@ -1291,7 +1307,15 @@ function deletePlaylist($id)
+ if ($id == $_COOKIE['mp3act_playlist_id'])
+ {
+ $rv = 1;
+- setcookie('mp3act_playlist_id', false, time()-3600);
++ if (PHP_VERSION_ID < 70300) {
++ setcookie('mp3act_playlist_id', false, time()-3600, '/;
SameSite=Strict');
++ } else {
++ setcookie('mp3act_playlist_id', false, [
++ 'expires' => time()-3600,
++ 'path' => '/',
++ 'samesite' => 'Strict'
++ ]);
++ }
+ }
+
+ $query = 'DELETE FROM music_playlists '.
+@@ -1416,7 +1440,15 @@ function playlist_add($type, $itemid)
+ if ('loadplaylist' == $type)
+ {
+ clearPlaylist();
+- setcookie('mp3act_playlist_id', $itemid, time()+MYTH_PLAYLIST_SAVE_TIME);
++ if (PHP_VERSION_ID < 70300) {
++ setcookie('mp3act_playlist_id', $itemid, time()+MYTH_PLAYLIST_SAVE_TIME,
'/; SameSite=Strict');
++ } else {
++ setcookie('mp3act_playlist_id', $itemid, [
++ 'expires' => time()+MYTH_PLAYLIST_SAVE_TIME,
++ 'path' => '/',
++ 'samesite' => 'Strict'
++ ]);
++ }
+ $output[0] = 1;
+ return $output;
+ }
+diff --git a/modules/mythweb/tmpl/default/set_flvplayer.php
b/modules/mythweb/tmpl/default/set_flvplayer.php
+index f6b9ac08..8eade6d5 100644
+--- a/modules/mythweb/tmpl/default/set_flvplayer.php
++++ b/modules/mythweb/tmpl/default/set_flvplayer.php
+@@ -29,7 +29,7 @@
+ break;
+ }
+ elseif (php_uname ('s') == 'Darwin' &&
file_exists ($path."/ffmpeg.app")) {
+- $ffmpeg = $path."/ffmpeg".app;
++ $ffmpeg = $path."/ffmpeg.app";
+ break;
+ }
+ }
+diff --git a/modules/stream/stream_raw.pl b/modules/stream/stream_raw.pl
+index d1be2ac1..a0d5b4cf 100755
+--- a/modules/stream/stream_raw.pl
++++ b/modules/stream/stream_raw.pl
+@@ -120,7 +120,7 @@
+ if ($ENV{'HTTP_RANGE'}) {
+ # Figure out the size of the requested chunk
+ ($start, $end) = $ENV{'HTTP_RANGE'} =~ /bytes\W+(\d*)-(\d*)\W*$/;
+- if ($end < 1 || $end > $size) {
++ if ($end eq '' || $end < 1 || $end > $size) {
+ $end = $size;
+ }
+ $size = $end - $start+1;
+diff --git a/modules/tv/classes/Channel.php b/modules/tv/classes/Channel.php
+index 73611112..b8b5fe47 100644
+--- a/modules/tv/classes/Channel.php
++++ b/modules/tv/classes/Channel.php
+@@ -143,7 +143,7 @@ class Channel extends MythBase {
+ $program_id_counter = 0;
+ ## we will eventually need to check for list vs "by channel" display
+ # for now, we only have the main list display
+- if (defined('theme_num_time_slots')) {
++ if (defined('theme_num_time_slots') &&
defined('theme_timeslot_size')) {
+ $timeslots_left = theme_num_time_slots;
+ $timeslot_size = theme_timeslot_size;
+ } else {
+diff --git a/modules/tv/classes/Program.php b/modules/tv/classes/Program.php
+index 0c07d16b..28b6d6d3 100644
+--- a/modules/tv/classes/Program.php
++++ b/modules/tv/classes/Program.php
+@@ -195,12 +195,14 @@ class Program extends MythBase {
+ $this->dolby = $this->audioproperties & 0x08;
+ $this->audiohardhear = $this->audioproperties & 0x10;
+ $this->audiovisimpair = $this->audioproperties & 0x20;
+- $this->hdtv = $this->videoproperties & 0x01;
+- $this->widescreen = $this->videoproperties & 0x02;
+- $this->avc = $this->videoproperties & 0x04;
+- $this->hd_ready = $this->videoproperties & 0x08;
+- $this->fullhd = $this->videoproperties & 0x10;
+- $this->damaged = $this->videoproperties & 0x20;
++
++ $this->widescreen = $this->videoproperties &
0x0001;
++ $this->hdtv = $this->videoproperties &
0x0002;
++ $this->avc = $this->videoproperties &
0x0008;
++ $this->hd_ready = $this->videoproperties &
0x0020;
++ $this->fullhd = $this->videoproperties &
0x0040;
++ $this->damaged = $this->videoproperties &
0x0400;
++
+ $this->closecaptioned = $this->subtitletype & 0x01;
+ $this->has_subtitles = $this->subtitletype & 0x02;
+ $this->subtitled = $this->subtitletype & 0x04;
+@@ -565,12 +567,13 @@ class Program extends MythBase {
+ // No cached value -- load it
+ if (!isset($this->credits[$role][$add_search_links])) {
+ // Get the credits for the requested role
+- $result = $db->query('SELECT people.name
++ $result = $db->query('SELECT DISTINCT people.name
+ FROM credits, people
+ WHERE credits.person = people.person
+ AND credits.role = ?
+ AND credits.chanid = ?
+- AND credits.starttime = FROM_UNIXTIME(?)',
++ AND credits.starttime = FROM_UNIXTIME(?)
++ ORDER BY credits.priority',
+ $role,
+ $this->chanid,
+ $this->starttime
+diff --git a/modules/tv/classes/Schedule.php b/modules/tv/classes/Schedule.php
+index b433db70..89ad596e 100644
+--- a/modules/tv/classes/Schedule.php
++++ b/modules/tv/classes/Schedule.php
+@@ -112,6 +112,15 @@ class Schedule extends MythBase {
+ case 'airdate':
+ $orderby .= 'starttime';
+ break;
++ case 'callsign_with_type':
++ $orderby .= 'CASE WHEN (type = '.rectype_always.' OR
type = '.rectype_findone.') AND !(filter & (1 << 10)) THEN ""
ELSE callsign END';
++ break;
++ case 'channum_with_type':
++ $orderby .= 'CASE WHEN (type = '.rectype_always.' OR
type = '.rectype_findone.') AND !(filter & (1 << 10)) THEN 0 ELSE
channum END';
++ break;
++ case 'last_record':
++ $orderby .= 'record.last_record';
++ break;
+ case 'recpriority':
+ $orderby .= 'record.recpriority';
+ break;
+diff --git a/modules/tv/schedules.php b/modules/tv/schedules.php
+index 8ef2ad00..77120429 100644
+--- a/modules/tv/schedules.php
++++ b/modules/tv/schedules.php
+@@ -47,6 +47,10 @@
+ // Remove the reference. This prevents duplicate entries showing up in the list
+ unset($schedule);
+
++// Force the default sort preferences
++ if (!is_array($_SESSION['schedules_sortby']) ||
!count($_SESSION['schedules_sortby']))
++ $_SESSION['schedules_sortby'] = array(array('field' =>
'title', 'reverse' => false));
++
+ // Sort the recordings
+ if (count($the_schedules))
+ sort_programs($the_schedules, 'schedules_sortby');
+diff --git a/modules/tv/tmpl/default/_advanced_options.php
b/modules/tv/tmpl/default/_advanced_options.php
+index 4547acd8..97711cef 100644
+--- a/modules/tv/tmpl/default/_advanced_options.php
++++ b/modules/tv/tmpl/default/_advanced_options.php
+@@ -34,8 +34,8 @@
+ new Ajax.Request('<?php echo root_url ?>tv/lookup_metadata',
+ {
+ parameters: {
+- 'title' : "<?php
echo $schedule->title ?>",
+- 'subtitle' : "<?php
echo $schedule->subtitle ?>",
++ 'title' : "<?php
echo preg_replace('/[\n\r]/', '\\n', $schedule->title) ?>",
++ 'subtitle' : "<?php
echo preg_replace('/[\n\r]/', '\\n', $schedule->subtitle) ?>",
+ 'inetref' :
$("inetref").value,
+ 'season' :
$("season").value,
+ 'episode' :
$("episode").value,
+diff --git a/modules/tv/tmpl/default/detail.php b/modules/tv/tmpl/default/detail.php
+index 05bad9be..673a477f 100644
+--- a/modules/tv/tmpl/default/detail.php
++++ b/modules/tv/tmpl/default/detail.php
+@@ -106,8 +106,8 @@
+ new Ajax.Request('<?php echo root_url ?>tv/lookup_metadata',
+ {
+ parameters: {
+- 'title' : "<?php
echo $schedule->title ?>",
+- 'subtitle' : "<?php
echo $schedule->subtitle ?>",
++ 'title' : "<?php
echo preg_replace('/[\n\r]/', '\\n', $schedule->title) ?>",
++ 'subtitle' : "<?php
echo preg_replace('/[\n\r]/', '\\n', $schedule->subtitle) ?>",
+ 'inetref' : "<?php
echo ($program ? $program->inetref : $schedule->inetref) ?>",
+ 'season' : "<?php
echo ($program ? $program->season : $schedule->season) ?>",
+ 'episode' : "<?php
echo ($program ? $program->episode : $schedule->episode) ?>",
+diff --git a/modules/tv/tmpl/default/schedules.php
b/modules/tv/tmpl/default/schedules.php
+index 7eb349dc..408fb9dd 100644
+--- a/modules/tv/tmpl/default/schedules.php
++++ b/modules/tv/tmpl/default/schedules.php
+@@ -28,7 +28,7 @@
+
+ // Print the page contents
+ $group_field = $_GET['sortby'];
+- if ($group_field == 'title' || !in_array($group_field,
array('title', 'channum', 'type', 'profile',
'recgroup')))
++ if ($group_field == 'title' || !in_array($group_field,
array('title', 'callsign', 'channum', 'type',
'profile', 'recgroup')))
+ $group_field = '';
+ ?>
+
+@@ -71,17 +71,17 @@
+ <thead>
+ <tr class="menu">
+ <?php if ($group_field != '') echo "<th
class=\"list\"> </th>\n"; ?>
+- <th class="x-title"><?php echo t('Title' );
?></th>
+- <th class="x-priority"><?php echo t('Recording
Priority' ); ?></th>
+- <th class="x-channel"
sort_hint="sortMythwebChannel"><?php echo t('Channel' );
?></th>
+- <th class="x-profile"><?php echo t('Profile' );
?></th>
+- <th class="x-transcoder"><?php echo t('Transcoder');
?></th>
+- <th class="x-group"><?php echo t('Recording Group');
?></th>
+- <th class="x-type"><?php echo t('Type');
?></th>
+- <th class="x-sgroup"><?php echo t('Storage Group');
?></th>
+- <th class="x-startoffset"><?php echo t('Start Early');
?></th>
+- <th class="x-endoffset"><?php echo t('End Late');
?></th>
+- <th class="x-lastrec"><?php echo t('Last Recorded');
?></th>
++ <th class="x-title"><?php echo
get_sort_link('title', t('Title' )); ?></th>
++ <th class="x-priority"><?php echo
get_sort_link('recpriority', t('Recording Priority' )); ?></th>
++ <th class="x-channel"><?php echo
get_sort_link($_SESSION["prefer_channum"] ? 'channum_with_type' :
'callsign_with_type', t('Channel' )); ?></th>
++ <th class="x-profile"><?php echo
get_sort_link('profile', t('Profile' )); ?></th>
++ <th class="x-transcoder"><?php echo
get_sort_link('transcoder', t('Transcoder')); ?></th>
++ <th class="x-group"><?php echo
get_sort_link('recgroup', t('Recording Group')); ?></th>
++ <th class="x-type"><?php echo get_sort_link('type',
t('Type')); ?></th>
++ <th class="x-sgroup"><?php echo
get_sort_link('storagegroup', t('Storage Group')); ?></th>
++ <th class="x-startoffset"><?php echo
get_sort_link('startoffset', t('Start Early')); ?></th>
++ <th class="x-endoffset"><?php echo
get_sort_link('endoffset', t('End Late')); ?></th>
++ <th class="x-lastrec"><?php echo
get_sort_link('last_record', t('Last Recorded')); ?></th>
+ </tr>
+ </thead>
+ <?php
+@@ -97,8 +97,9 @@
+ $css_class = ($schedule->type == rectype_dontrec ? 'deactivated'
: 'scheduled');
+ // If this is an 'always on any channel' or 'find one' recording
without the 'This Channel' filter, set the channel name to 'Any'
+ if (($schedule->type == rectype_always || $schedule->type ==
rectype_findone) && !($schedule->filter & (1 << 10))) {
+- $schedule->channel->name = '[ '.t('Any').'
]';
+- $schedule->channel->channum = 0;
++ $any_channel = true;
++ } else {
++ $any_channel = false;
+ }
+ // A program id counter for popup info
+ if ($_SESSION["show_popup_info"]) {
+@@ -109,6 +110,8 @@
+ // Print a dividing row if grouping changes
+ if ($group_field == 'type')
+ $cur_group = $schedule->texttype;
++ elseif ($group_field == 'callsign')
++ $cur_group = ($schedule->channel->callsign ?
$schedule->channel->callsign.' - ' :
'').$schedule->channel->name;
+ elseif ($group_field == 'channum')
+ $cur_group = ($schedule->channel->channum ?
$schedule->channel->channum.' - ' :
'').$schedule->channel->name;
+ elseif ($group_field == 'profile')
+@@ -163,15 +166,19 @@
+ echo $schedule->recpriority
+ ?></td>
+ <td class="x-channel"><?php
+- if ($_SESSION["prefer_channum"]) {
+- if ($schedule->channel->channum)
+- echo $schedule->channel->channum.' - ';
++ if ($any_channel) {
++ echo '[ '.t('Any').' ]';
++ } else {
++ if ($_SESSION["prefer_channum"]) {
++ if ($schedule->channel->channum)
++ echo $schedule->channel->channum.' - ';
++ }
++ else {
++ if ($schedule->channel->callsign)
++ echo $schedule->channel->callsign.' - ';
++ }
++ echo $schedule->channel->name;
+ }
+- else {
+- if ($schedule->channel->callsign)
+- echo $schedule->channel->callsign.' - ';
+- }
+- echo $schedule->channel->name;
+ ?></td>
+ <td class="x-profile"><?php echo _or($schedule->profile,
' ') ?></td>
+ <td class="x-transcoder"><?php
+diff --git a/modules/tv/tmpl/lite/detail.php b/modules/tv/tmpl/lite/detail.php
+index 2964d941..72b53b39 100644
+--- a/modules/tv/tmpl/lite/detail.php
++++ b/modules/tv/tmpl/lite/detail.php
+@@ -345,7 +345,7 @@
+ <dt><?php echo t('Transcoder') ?>:</dt>
+ <dd><?php transcoder_select($schedule->transcoder)
?></dd>
+ <dt><?php echo t('Recording Group') ?>:</dt>
+- <dd><?php recgroup_select($schedule->recgroup)
?></dd>
++ <dd><?php recgroup_select($schedule) ?></dd>
+ <dt><?php echo t('Storage Group') ?>:</dt>
+ <dd><?php storagegroup_select($schedule->storagegroup)
?></dd>
+ <dt><?php echo t('Recording Priority')
?>:</dt>
+diff --git a/modules/tv/tmpl/lite/schedules.php b/modules/tv/tmpl/lite/schedules.php
+index 7478ecef..808c0e60 100644
+--- a/modules/tv/tmpl/lite/schedules.php
++++ b/modules/tv/tmpl/lite/schedules.php
+@@ -31,7 +31,7 @@
+
+ // Print the page contents
+ $group_field = $_GET['sortby'];
+- if ($group_field == 'title' || !in_array($group_field,
array('title', 'channum', 'type', 'profile',
'recgroup')))
++ if ($group_field == 'title' || !in_array($group_field,
array('title', 'callsign', 'channum', 'type',
'profile', 'recgroup')))
+ $group_field = '';
+ ?>
+
+@@ -40,7 +40,7 @@
+ <?php if ($group_field != '') echo "<td
class=\"list\"> </td>\n" ?>
+ <td><?php echo get_sort_link('title', t('title'))
?></td>
+ <td><?php echo get_sort_link('recpriority',
t('recpriority')) ?></td>
+- <td><?php echo get_sort_link($_SESSION["prefer_channum"] ?
'channum' : 'callsign', t('channel')) ?></td>
++ <td><?php echo get_sort_link($_SESSION["prefer_channum"] ?
'channum_with_type' : 'callsign_with_type', t('channel'))
?></td>
+ <td><?php echo get_sort_link('profile', t('profile'))
?></td>
+ <td><?php echo get_sort_link('transcoder',
t('transcoder')) ?></td>
+ <td><?php echo get_sort_link('recgroup', t('recgroup'))
?></td>
+@@ -49,19 +49,24 @@
+ $prev_group = '';
+ $cur_group = '';
+ foreach ($the_schedules as $schedule) {
++ // Ignore templates until full support can be added
++ if ($schedule->type == rectype_template)
++ continue;
+ // Reset the command variable to a default URL
+ $urlstr = 'recordid='.$schedule->recordid;
+
+ $css_class = ($schedule->type == rectype_dontrec ? 'deactivated'
: 'scheduled');
+ // If this is an 'always on any channel' or 'find one' recording
without the 'This Channel' filter, set the channel name to 'Any'
+ if (($schedule->type == rectype_always || $schedule->type ==
rectype_findone) && !($schedule->filter & (1 << 10))) {
+- $schedule->channel->name = '[ '.t('Any').'
]';
+- $schedule->channel->channum = 0;
++ $any_channel = true;
++ } else {
++ $any_channel = false;
+ }
+-
+ // Print a dividing row if grouping changes
+ if ($group_field == 'type')
+ $cur_group = $schedule->texttype;
++ elseif ($group_field == 'callsign')
++ $cur_group = ($schedule->channel->callsign ?
$schedule->channel->callsign.' - ' :
'').$schedule->channel->name;
+ elseif ($group_field == 'channum')
+ $cur_group = ($schedule->channel->channum ?
$schedule->channel->channum.' - ' :
'').$schedule->channel->name;
+ elseif ($group_field == 'profile')
+@@ -109,15 +114,19 @@
+ echo $schedule->recpriority
+ ?></td>
+ <td><?php
+- if ($_SESSION["prefer_channum"]) {
+- if ($schedule->channel->channum)
+- echo $schedule->channel->channum.' - ';
+- }
+- else {
+- if ($schedule->channel->callsign)
+- echo $schedule->channel->callsign.' - ';
++ if ($any_channel) {
++ echo '[ '.t('Any').' ]';
++ } else {
++ if ($_SESSION["prefer_channum"]) {
++ if ($schedule->channel->channum)
++ echo $schedule->channel->channum.' - ';
++ }
++ else {
++ if ($schedule->channel->callsign)
++ echo $schedule->channel->callsign.' - ';
++ }
++ echo $schedule->channel->name;
+ }
+- echo $schedule->channel->name;
+ ?></td>
+ <td nowrap><?php echo _or($schedule->profile, ' ')
?></td>
+ <td nowrap>
+diff --git a/modules/tv/tmpl/lite/schedules_custom.php
b/modules/tv/tmpl/lite/schedules_custom.php
+index 8a241c5d..942d60c3 100644
+--- a/modules/tv/tmpl/lite/schedules_custom.php
++++ b/modules/tv/tmpl/lite/schedules_custom.php
+@@ -142,7 +142,7 @@
+ <dt><?php echo t('Transcoder') ?>:</dt>
+ <dd><?php transcoder_select($schedule->transcoder)
?></dd>
+ <dt><?php echo t('Recording Group') ?>:</dt>
+- <dd><?php recgroup_select($schedule->recgroup)
?></dd>
++ <dd><?php recgroup_select($schedule) ?></dd>
+ <dt><?php echo t('Storage Group') ?>:</dt>
+ <dd><?php storagegroup_select($schedule->storagegroup)
?></dd>
+ <dt><?php echo t('Recording Priority')
?>:</dt>
+diff --git a/modules/tv/tmpl/lite/schedules_manual.php
b/modules/tv/tmpl/lite/schedules_manual.php
+index d06ed363..e76004f2 100644
+--- a/modules/tv/tmpl/lite/schedules_manual.php
++++ b/modules/tv/tmpl/lite/schedules_manual.php
+@@ -97,7 +97,7 @@
+ <dt><?php echo t('Transcoder') ?>:</dt>
+ <dd><?php transcoder_select($schedule->transcoder)
?></dd>
+ <dt><?php echo t('Recording Group') ?>:</dt>
+- <dd><?php recgroup_select($schedule->recgroup)
?></dd>
++ <dd><?php recgroup_select($schedule) ?></dd>
+ <dt><?php echo t('Storage Group') ?>:</dt>
+ <dd><?php storagegroup_select($schedule->storagegroup)
?></dd>
+ <dt><?php echo t('Recording Priority')
?>:</dt>
diff --git a/mythweb.spec b/mythweb.spec
index 993a989..760fe05 100644
--- a/mythweb.spec
+++ b/mythweb.spec
@@ -5,7 +5,7 @@ Summary: The web interface to MythTV
URL:
http://www.mythtv.org/
Version: 32.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2 and LGPLv2 and MIT
@@ -13,6 +13,8 @@ Source0:
https://github.com/MythTV/%{name}/archive/v%{version}/%{name}-%{
Source1: mythweb.conf
Source2: ChangeLog
+Patch0: mythweb-fixes.patch
+
# This is needed for perl dependency auto-detection
BuildRequires: perl-generators
@@ -71,6 +73,9 @@ rm %{buildroot}%{_datadir}/mythweb/{LICENSE,README,INSTALL,ChangeLog}
%changelog
+* Fri Jun 03 2022 Richard Shaw <hobbes1069(a)gmail.com> - 32.0-2
+- Update to v32.0-40-gb05906a6.
+
* Thu May 12 2022 Andrew Bauer <zonexpertconsulting(a)outlook.com> - 32.0-1
- Update to 32.0