commit 4a95c0a2fdf5e5c5fb26af311b5e68d2a2d02372
Author: Gary Buhrmaster <gary.buhrmaster(a)gmail.com>
Date: Wed Aug 7 02:58:33 2024 +0000
Pull in upstream patches since 1.3.0
0001-uk_freeview-adjust-cache-location.patch | 25 +++++++++++
..._freeview-fix-actor-names-containing-utf8.patch | 25 +++++++++++
...eview-fix-grab-times-wrong-during-BST-230.patch | 48 ++++++++++++++++++++++
...reeview-fix-missing-title-in-api-data-231.patch | 29 +++++++++++++
0005-fix-error-handling-in-DB_open.patch | 42 +++++++++++++++++++
xmltv.spec | 15 ++++++-
6 files changed, 183 insertions(+), 1 deletion(-)
---
diff --git a/0001-uk_freeview-adjust-cache-location.patch
b/0001-uk_freeview-adjust-cache-location.patch
new file mode 100644
index 0000000..c1d4517
--- /dev/null
+++ b/0001-uk_freeview-adjust-cache-location.patch
@@ -0,0 +1,25 @@
+From b7c742cbab9936b0fc40a7d3bee11a7831f5ccd3 Mon Sep 17 00:00:00 2001
+From: Honir <honir999(a)gmail.com>
+Date: Thu, 23 May 2024 11:25:21 +0100
+Subject: [PATCH 1/5] uk_freeview: adjust cache location
+
+---
+ grab/uk_freeview/tv_grab_uk_freeview | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/grab/uk_freeview/tv_grab_uk_freeview b/grab/uk_freeview/tv_grab_uk_freeview
+index edaac09b..c8f1194e 100755
+--- a/grab/uk_freeview/tv_grab_uk_freeview
++++ b/grab/uk_freeview/tv_grab_uk_freeview
+@@ -171,7 +171,7 @@ XMLTV::Ask::init($opt_gui);
+ # Initialise the web page cache
+ if ($opt_debug) {
+ HTTP::Cache::Transparent::init( {
+- BasePath => '/root/.xmltv/cache',
++ BasePath => '/tmp/.xmltv/cache',
+ NoUpdate => 60*60, # cache time in seconds
+ MaxAge => 24, # flush time in hours
+ Verbose => $opt_debug,
+--
+2.45.2
+
diff --git a/0002-uk_freeview-fix-actor-names-containing-utf8.patch
b/0002-uk_freeview-fix-actor-names-containing-utf8.patch
new file mode 100644
index 0000000..eb18cec
--- /dev/null
+++ b/0002-uk_freeview-fix-actor-names-containing-utf8.patch
@@ -0,0 +1,25 @@
+From 2170454685371698bcd8920560c0d24dfbfa5d87 Mon Sep 17 00:00:00 2001
+From: Honir <honir999(a)gmail.com>
+Date: Thu, 23 May 2024 11:29:00 +0100
+Subject: [PATCH 2/5] uk_freeview: fix actor names containing utf8
+
+---
+ grab/uk_freeview/tv_grab_uk_freeview | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/grab/uk_freeview/tv_grab_uk_freeview b/grab/uk_freeview/tv_grab_uk_freeview
+index c8f1194e..c19c2ab4 100755
+--- a/grab/uk_freeview/tv_grab_uk_freeview
++++ b/grab/uk_freeview/tv_grab_uk_freeview
+@@ -635,7 +635,7 @@ sub get_programmes {
+ my $fullname = (defined $fname ? $fname . ' ' : '') . $lname;
+ my $attr = $roles{lc($role)} if defined $role;
+
+- push (@{$p_credits{$attr}}, (defined $character ? [ $fullname, $character ] :
$fullname ) ) if defined $attr;
++ push (@{$p_credits{$attr}}, (defined $character ? [ toUTF8($fullname),
toUTF8($character) ] : toUTF8($fullname) ) ) if defined $attr;
+ }
+
+ # we can get the Series/Ep in the synopsis for some channels (e.g. Sky Arts)
+--
+2.45.2
+
diff --git a/0003-uk_freeview-fix-grab-times-wrong-during-BST-230.patch
b/0003-uk_freeview-fix-grab-times-wrong-during-BST-230.patch
new file mode 100644
index 0000000..1a21e06
--- /dev/null
+++ b/0003-uk_freeview-fix-grab-times-wrong-during-BST-230.patch
@@ -0,0 +1,48 @@
+From de77b48377dc37b36ff0c820b95fc07a10383463 Mon Sep 17 00:00:00 2001
+From: Honir <honir999(a)gmail.com>
+Date: Thu, 23 May 2024 11:32:45 +0100
+Subject: [PATCH 3/5] uk_freeview: fix grab times wrong during BST (#230)
+
+---
+ grab/uk_freeview/tv_grab_uk_freeview | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/grab/uk_freeview/tv_grab_uk_freeview b/grab/uk_freeview/tv_grab_uk_freeview
+index c19c2ab4..9a68aefa 100755
+--- a/grab/uk_freeview/tv_grab_uk_freeview
++++ b/grab/uk_freeview/tv_grab_uk_freeview
+@@ -371,13 +371,17 @@ foreach my $ch_did (@channels) {
+
+
+ # time limits for grab
+-my $today_date = DateTime->today(time_zone => 'Europe/Lisbon');
+-my $grab_start = $today_date->epoch() + ($opt_offset * 86400);
++my $today_date = DateTime->today(time_zone => 'Europe/London');
++my $grab_start = $today_date->epoch + ($opt_offset * 86400);
+ my $grab_stop = $grab_start + ($opt_days * 86400);
+-print STDERR "\n start/end grab: $grab_start $grab_stop \n" if $opt_debug;
+
+-my $dt_start = DateTime->from_epoch( epoch => $grab_start );
+-my $dt_stop = DateTime->from_epoch( epoch => $grab_stop );
++my $dt_start = DateTime->from_epoch( epoch => $grab_start
)->set_time_zone('Europe/London');
++my $dt_stop = DateTime->from_epoch( epoch => $grab_stop
)->set_time_zone('Europe/London');
++
++$grab_start += ($dt_start->is_dst * 3600);
++$grab_stop += ($dt_stop->is_dst * 3600);
++
++print STDERR "start/end grab: $grab_start $grab_stop \n" if $opt_debug;
+
+
+ # get the programmes and write the <programme> elements
+@@ -496,7 +500,7 @@ sub get_programmes {
+ t "Getting programmes \n";
+
+ my $programmes = {};
+- my $start_time = $grab_start; # note start_time has to be xxxT00:00:00
++ my $start_time = $grab_start; # note start_time has to be xxxT00:00:00 (in local
time)
+
+ while ( $start_time < $grab_stop ) {
+
+--
+2.45.2
+
diff --git a/0004-uk_freeview-fix-missing-title-in-api-data-231.patch
b/0004-uk_freeview-fix-missing-title-in-api-data-231.patch
new file mode 100644
index 0000000..d73554d
--- /dev/null
+++ b/0004-uk_freeview-fix-missing-title-in-api-data-231.patch
@@ -0,0 +1,29 @@
+From c452563faceebda0118b6847ad13eecbe4512570 Mon Sep 17 00:00:00 2001
+From: Honir <honir999(a)gmail.com>
+Date: Sat, 25 May 2024 09:45:13 +0100
+Subject: [PATCH 4/5] uk_freeview: fix missing title in api data (#231)
+
+---
+ grab/uk_freeview/tv_grab_uk_freeview | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/grab/uk_freeview/tv_grab_uk_freeview b/grab/uk_freeview/tv_grab_uk_freeview
+index 9a68aefa..2ff192c3 100755
+--- a/grab/uk_freeview/tv_grab_uk_freeview
++++ b/grab/uk_freeview/tv_grab_uk_freeview
+@@ -551,6 +551,12 @@ sub get_programmes {
+ $p_rating = ''; # needs 'details' page
+ $p_subtitle = $prog->{'secondary_title'};
+
++ # progs with no title are typically ones where the schedule is not yet known (e.g.
Filmstream ch.269 on day 6)
++ # we probably don't want these placeholders ("TBA") polluting our EPG
so let's drop them
++ if (!defined $p_title) {
++ print STDERR "p_title undefined $ch_xmltv_id at
$prog->{'start_time'}"."\n" if $opt_debug;
++ next;
++ }
+
+ # get prog times
+ my ($y,$m,$d,$h,$i,$s,$z) = $prog->{'start_time'} =~
/^(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)\+(\d\d\d\d)$/;
+--
+2.45.2
+
diff --git a/0005-fix-error-handling-in-DB_open.patch
b/0005-fix-error-handling-in-DB_open.patch
new file mode 100644
index 0000000..3cb688b
--- /dev/null
+++ b/0005-fix-error-handling-in-DB_open.patch
@@ -0,0 +1,42 @@
+From 10cb36a3bc9ebdbcc6d9bab19ca769897ffa7e76 Mon Sep 17 00:00:00 2001
+From: Gary Buhrmaster <gary.buhrmaster(a)gmail.com>
+Date: Fri, 2 Aug 2024 14:07:46 +0000
+Subject: [PATCH 5/5] fix error handling in DB_open
+
+---
+ grab/zz_sdjson_sqlite/tv_grab_zz_sdjson_sqlite | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/grab/zz_sdjson_sqlite/tv_grab_zz_sdjson_sqlite
b/grab/zz_sdjson_sqlite/tv_grab_zz_sdjson_sqlite
+index 1712102b..15923a79 100644
+--- a/grab/zz_sdjson_sqlite/tv_grab_zz_sdjson_sqlite
++++ b/grab/zz_sdjson_sqlite/tv_grab_zz_sdjson_sqlite
+@@ -44,6 +44,7 @@
+ #
+ # Version history:
+ #
++# 2024/08/02 - 1.137 - fix error handling in DB_open
+ # 2024/01/27 - 1.136 - extend detail in schedules direct user-agent
+ # 2024/01/27 - 1.135 - move from legacy cvs to modern versioning
+ # 2024/01/25 - 1.134 - parameterize retries
+@@ -231,7 +232,7 @@ my $RFC2838_COMPLIANT = 1; # RFC2838 compliant
station ids,
+ my $SCRIPT_URL =
'https://github.com/garybuhrmaster/tv_grab_zz_sdjson_sqlite';
+ my $SCRIPT_NAME = basename("$0");
+ my $SCRIPT_NAME_DIR = dirname("$0");
+-my $SCRIPT_VERSION = '1.136';
++my $SCRIPT_VERSION = '1.137';
+
+ my $SCRIPT_DB_VERSION = 2; # Used for script/db updates (see
DB_open)
+
+@@ -4526,7 +4527,7 @@ sub DB_open
+
+ if (!defined($DBH))
+ {
+- print (STDERR "Unable to open database file $dbname: " .
$DBH->errstr . "\n");
++ print (STDERR "Unable to open database file $dbname: " .
DBI->errstr . "\n");
+ exit(1);
+ }
+
+--
+2.45.2
+
diff --git a/xmltv.spec b/xmltv.spec
index 65c8543..89eebee 100644
--- a/xmltv.spec
+++ b/xmltv.spec
@@ -1,12 +1,22 @@
Name: xmltv
Version: 1.3.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A set of utilities to manage your TV viewing
License: GPL-2.0
URL:
http://xmltv.org/wiki/
Source0:
https://github.com/XMLTV/xmltv/archive/v%{version}/xmltv-v%{version}.tar.gz
+#
+# Patches since 1.3.0 release
+#
+Patch0001: 0001-uk_freeview-adjust-cache-location.patch
+Patch0002: 0002-uk_freeview-fix-actor-names-containing-utf8.patch
+Patch0003: 0003-uk_freeview-fix-grab-times-wrong-during-BST-230.patch
+Patch0004: 0004-uk_freeview-fix-missing-title-in-api-data-231.patch
+Patch0005: 0005-fix-error-handling-in-DB_open.patch
+
+
BuildArch: noarch
BuildRequires: perl
@@ -254,6 +264,9 @@ make test
%changelog
+* Tue Aug 06 2024 Gary Buhrmaster <gary.buhrmaster(a)gmail.com> - 1.3.0-3
+- Pull in upstream patches since 1.3.0
+
* Fri Aug 02 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> -
1.3.0-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild