Paul Webster wrote:
> I suspect it is this bit of ScanHLS.pm and same in HLSPLAY.pm
>
> >
Code:
--------------------
> >
> my ($urlbase) = $url =~ /(.*)\//;
> $chunkurl = $urlbase . "/" . $chunkurl;
>
--------------------
> >
I think that the solution to this part is something like this:
Code:
--------------------
my $urlbase = '';
if ($chunkurl =~ /^\//){
($urlbase) = $url =~ /(.*\/\/.*?)\//;
$chunkurl = $urlbase . $chunkurl;
} else {
($urlbase) = $url =~ /(.*)\//;
$chunkurl = $urlbase . "/" . $chunkurl;
}
--------------------
although I am sure that there is a much shorter way of doing it.
The problem it is trying to solve is that in the original code the .* is
greedy so it results in everything up to the last / being taken - but
when the chunkurl starts with a / then we need everything up to the
first / after the protocol specifier.
With this change (in ScanHLS.pm and HLSPLAY.pm) I am able to play the
FIP HLS stream.
Annoyingly it does not get matched by my modified plugin so I will have
to adjust my plugin regex again.
Paul Webster
http://dabdig.blogspot.com
author of \"now playing\" plugins covering radio france (fip etc), kcrw,
supla finland, abc australia, cbc/radio-canada and rte ireland
------------------------------------------------------------------------
Paul Webster's Profile: http://forums.slimdevices.com/member.php?userid=105
View this thread: http://forums.slimdevices.com/showthread.php?t=103158
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins