Skip to content

Commit

Permalink
Fixes #11472, this adds the season and episode numbers into the filename
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Smith <kormoc@mythtv.org>
  • Loading branch information
campbsb authored and kormoc committed Apr 7, 2013
1 parent 6570722 commit 8908516
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions modules/stream/stream_raw.pl
Expand Up @@ -45,6 +45,7 @@
if ($name =~ /^\d+_\d+\.\w+$/) {
if ($title =~ /\w/) {
$name = $title;
$name .= sprintf(" - %dx%02d", $season, $episode) if $season and $episode;
if ($subtitle =~ /\w/) {
$name .= " - $subtitle";
}
Expand Down
4 changes: 2 additions & 2 deletions modules/stream/tv.pl
Expand Up @@ -24,12 +24,12 @@
}

# Get the basename from the database
my $sh = $dbh->prepare('SELECT basename, title, subtitle, endtime-starttime
my $sh = $dbh->prepare('SELECT basename, title, subtitle, endtime-starttime, season, episode
FROM recorded
WHERE starttime=FROM_UNIXTIME(?)
AND recorded.chanid = ?');
$sh->execute($starttime, $chanid);
our ($basename, $title, $subtitle, $runtime) = $sh->fetchrow_array();
our ($basename, $title, $subtitle, $runtime, $season, $episode) = $sh->fetchrow_array();
$sh->finish;

# No match?
Expand Down

0 comments on commit 8908516

Please sign in to comment.