From e47c0f4060ea66526a1eedff7c16cbae7ed08670 Mon Sep 17 00:00:00 2001 From: Gary Buhrmaster Date: Thu, 16 Jan 2025 02:24:11 +0000 Subject: [PATCH] add deaf-signed subtitles element (cherry picked from commit 7b9803a6fbba51bb9814de1a4709b75334f64b78) --- grab/zz_sdjson_sqlite/tv_grab_zz_sdjson_sqlite | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/grab/zz_sdjson_sqlite/tv_grab_zz_sdjson_sqlite b/grab/zz_sdjson_sqlite/tv_grab_zz_sdjson_sqlite index 15923a79..2693c8c9 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: # +# 2025/01/16 - 1.138 - add deaf-signed subtitles element # 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 @@ -232,7 +233,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.137'; +my $SCRIPT_VERSION = '1.138'; my $SCRIPT_DB_VERSION = 2; # Used for script/db updates (see DB_open) @@ -2387,6 +2388,9 @@ $w->startTag('tv', # to collect the closed caption information for future # reporting. my $audioHasCC = 0; # Need to carry forward + my $audioHasSubtitle = 0; + my $audioHasDVS = 0; + my $audioHasSigned = 0; if (defined($scheduleDetails->{'audioProperties'})) { # Ugly because dtd only allows one type, and source data @@ -2400,6 +2404,9 @@ $w->startTag('tv', $audioHasDolby = 1 if ($audioProperty eq 'Dolby'); $audioHasStereo = 1 if ($audioProperty eq 'stereo'); $audioHasCC = 1 if ($audioProperty eq 'cc'); + $audioHasSubtitle = 1 if ($audioProperty eq 'subtitled'); + $audioHasDVS = 1 if ($audioProperty eq 'dvs'); + $audioHasSigned = 1 if ($audioProperty eq 'signed'); } if ($audioHasDolbySurround || $audioHasDolby || $audioHasStereo) { @@ -2467,6 +2474,8 @@ $w->startTag('tv', # Carried forward from audio eval to match DTD $w->emptyTag('subtitles', 'type' => 'teletext') if ($audioHasCC); + $w->emptyTag('subtitles', 'type' => 'onscreen') if ($audioHasSubtitle); + $w->emptyTag('subtitles', 'type' => 'deaf-signed') if ($audioHasSigned); # XMLTV ratings (and the system) are arbitrary values, and # have no implied priority or order. However, for