Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add deaf-signed subtitles element #261

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading