Skip to content

Commit d25ef31

Browse files
committed
Merge remote-tracking branch 'alewando/mythlink-metadata' into HEAD
Fixes #11919 (cherry picked from commit da90015)
1 parent c02d8cd commit d25ef31

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

mythtv/bindings/perl/MythTV/Program.pm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,14 @@ package MythTV::Program;
319319
$omonth = '00';
320320
$oday = '00';
321321
}
322+
# Season/Episode/InetRef
323+
my ($season, $episode, $inetref);
324+
$season = ($self->{'season'} or '');
325+
$season = "0$season" if ($season && $season < 10);
326+
$episode = ($self->{'episode'} or '');
327+
$episode = "0$episode" if ($episode && $episode < 10);
328+
$inetref = ($self->{'intetref'} or '');
329+
322330
# Build a list of name format options
323331
my %fields;
324332
($fields{'T'} = ($self->{'title'} or '')) =~ s/%/%%/g;
@@ -400,6 +408,11 @@ package MythTV::Program;
400408
$fields{'om'} = $omonth; # month, leading zero
401409
$fields{'oj'} = int($oday); # day of month
402410
$fields{'od'} = $oday; # day of month, leading zero
411+
# Season/Episode/Inetref
412+
$fields{'ss'} = $season;
413+
$fields{'ep'} = $episode;
414+
$fields{'in'} = $inetref;
415+
403416
# Literals
404417
$fields{'%'} = '%';
405418
($fields{'-'} = $separator) =~ s/%/%%/g;

mythtv/contrib/user_jobs/mythlink.pl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@
110110
\%T = Title (show name)
111111
\%S = Subtitle (episode name)
112112
\%R = Description
113+
\%ss = Season (leading zero)
114+
\%ep = Episode (leading zero)
115+
\%in = Internet reference number
113116
\%C = Category
114117
\%U = RecGroup
115118
\%hn = Hostname of the machine where the file resides

0 commit comments

Comments
 (0)