summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Badia <dbadia@gmail.com>2011-06-26 23:48:00 (GMT)
committer Gavin Hurlbut <ghurlbut@mythtv.org>2011-06-27 00:01:21 (GMT)
commitfc3ce90daa5efe82f21fda93fd900c3285d0a337 (patch)
tree5a17645f242b459ae2043d23a3fc4843b47879e0
parente3953dc8a90b877eb303f063a9a1878e26bc7d5b (diff)
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> (cherry picked from commit 09310ac79700182c78ced64dd4289f2da449a59d)
-rw-r--r--mythtv/bindings/perl/MythTV.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/mythtv/bindings/perl/MythTV.pm b/mythtv/bindings/perl/MythTV.pm
index 9406702..c3160a6 100644
--- a/mythtv/bindings/perl/MythTV.pm
+++ b/mythtv/bindings/perl/MythTV.pm
@@ -547,6 +547,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) {