Permalink
Browse files

Allow stream_backend_file to accept a myth url (perl bindings)

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...
1 parent 18a00f6 commit 2d59109cfccd9d01e8a3bdce94e741d98e703013 @dbadia dbadia committed with Beirdo Jun 26, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 mythtv/bindings/perl/MythTV.pm
@@ -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) {

0 comments on commit 2d59109

Please sign in to comment.