Skip to content

Commit

Permalink
Allow stream_backend_file to accept a myth url (perl bindings)
Browse files Browse the repository at this point in the history
Myth backend will pass URLs to customer user jobs when the recording is on a
remote storage group.  This patch allows stream_backend_file to accept the myth
url so the developer does not need to parse it into it's parts.

Patch applies cleanly to 24-fixes and master

Fixes #9838

Signed-off-by: Gavin Hurlbut <ghurlbut@mythtv.org>
  • Loading branch information
dbadia authored and Beirdo committed Jun 27, 2011
1 parent 18a00f6 commit 2d59109
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mythtv/bindings/perl/MythTV.pm
Expand Up @@ -540,6 +540,16 @@ EOF
# $seek is optional, and is the amount to seek from the start of the file
# (for resuming downloads, etc.)
my $seek = (shift or 0);
# Check to see if we were passed a URL using the myth protocol - if so,
# override the values set above accordingly
if (substr($basename, 0,7) eq "myth://") {
$basename = substr($basename, 7);
my $index = index($basename, ":");
$host = substr($basename, 0, $index);
my $endindex = index($basename, "/", $index);
$port = substr($basename, $index+1, $endindex-$index-1);
$basename = substr($basename, $endindex);
}
# We need to figure out if we were passed a file handle or a filename. If
# it was a pathname, we should open the file for writing.
if ($target_path) {
Expand Down

0 comments on commit 2d59109

Please sign in to comment.