Skip to content

Commit

Permalink
Merge pull request #261 from garybuhrmaster/deaf-signed
Browse files Browse the repository at this point in the history
add deaf-signed subtitles element for tv_grab_zz_sdjson_sqlite
  • Loading branch information
garybuhrmaster authored Jan 16, 2025
2 parents b868203 + e47c0f4 commit 9e77a0e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion grab/zz_sdjson_sqlite/tv_grab_zz_sdjson_sqlite
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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)
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9e77a0e

Please sign in to comment.