Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add Season/Episode/InetRefNum support to mythlink.pl #32

Merged
merged 1 commit into from

7 participants

@alewando

Allow mythlink to use episode and season number (left padded with 0's to two digits) and Internet reference number when formatting the symlink. Works well with Plex Media Server (format: '%T/Season %ss/%T%-s%sse%ep').

@ex-nerd ex-nerd was assigned by stuartm
@dekarl
Owner

Please file a ticket at https://code.mythtv.org/trac/newticket so this does not get overlooked.

@bennettpeter

I vote for adding this feature.

@ex-nerd ex-nerd was unassigned by stuartm
@stuartm stuartm self-assigned this
@schlussbilanz

Is it possible to use mythlink to create the links to movies in a directory "movies" and the links to series in a directory "series"?
I would use kodi as a additional frontend for watching the records in another room and it wants separate directorys for movies and series to fill the local database correctly.

@bennettpeter
@bennettpeter
@Beirdo Beirdo merged commit edac9b0 into MythTV:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 17, 2013
  1. @alewando

    Add support for using episode, season, and internet reference number …

    alewando authored
    …when formatting program name
This page is out of date. Refresh to see the latest.
View
13 mythtv/bindings/perl/MythTV/Program.pm
@@ -319,6 +319,14 @@ package MythTV::Program;
$omonth = '00';
$oday = '00';
}
+ # Season/Episode/InetRef
+ my ($season, $episode, $inetref);
+ $season = ($self->{'season'} or '');
+ $season = "0$season" if ($season && $season < 10);
+ $episode = ($self->{'episode'} or '');
+ $episode = "0$episode" if ($episode && $episode < 10);
+ $inetref = ($self->{'intetref'} or '');
+
# Build a list of name format options
my %fields;
($fields{'T'} = ($self->{'title'} or '')) =~ s/%/%%/g;
@@ -400,6 +408,11 @@ package MythTV::Program;
$fields{'om'} = $omonth; # month, leading zero
$fields{'oj'} = int($oday); # day of month
$fields{'od'} = $oday; # day of month, leading zero
+ # Season/Episode/Inetref
+ $fields{'ss'} = $season;
+ $fields{'ep'} = $episode;
+ $fields{'in'} = $inetref;
+
# Literals
$fields{'%'} = '%';
($fields{'-'} = $separator) =~ s/%/%%/g;
View
3  mythtv/contrib/user_jobs/mythlink.pl
@@ -110,6 +110,9 @@
\%T = Title (show name)
\%S = Subtitle (episode name)
\%R = Description
+ \%ss = Season (leading zero)
+ \%ep = Episode (leading zero)
+ \%in = Internet reference number
\%C = Category
\%U = RecGroup
\%hn = Hostname of the machine where the file resides
Something went wrong with that request. Please try again.