Skip to content
Browse files

allow https in playlists

  • Loading branch information...
1 parent d61c0a7 commit 64a05ac833581397348d6a9198385a10de904482 @msoap committed
Showing with 4 additions and 4 deletions.
  1. +2 −2 mojolicious-radio-box.pl
  2. +2 −2 src/util.pm
View
4 mojolicious-radio-box.pl
@@ -91,7 +91,7 @@ sub get_radio_stations {
if ($ext eq 'm3u') {
$title = $1 if ! $title && $line =~ /^\#EXTINF: -?\d+, (.+?) \s* $/x;
- if (! $url && $line =~ m{^http://}) {
+ if (! $url && $line =~ m{^https?://}) {
$url = $line;
$url =~ s/\s+//g;
}
@@ -103,7 +103,7 @@ sub get_radio_stations {
} elsif ($ext eq 'pls') {
$pls{$1}->{title} = $title = $2 if $line =~ m{^Title(\d+)=(.+)\s*$};
- $pls{$1}->{url} = $2 if $line =~ m{^File(\d+)=(http?://.+?)\s*$};
+ $pls{$1}->{url} = $2 if $line =~ m{^File(\d+)=(https?://.+?)\s*$};
}
}
View
4 src/util.pm
@@ -59,7 +59,7 @@ sub get_radio_stations {
if ($ext eq 'm3u') {
$title = $1 if ! $title && $line =~ /^\#EXTINF: -?\d+, (.+?) \s* $/x;
- if (! $url && $line =~ m{^http://}) {
+ if (! $url && $line =~ m{^https?://}) {
$url = $line;
$url =~ s/\s+//g;
}
@@ -71,7 +71,7 @@ sub get_radio_stations {
} elsif ($ext eq 'pls') {
$pls{$1}->{title} = $title = $2 if $line =~ m{^Title(\d+)=(.+)\s*$};
- $pls{$1}->{url} = $2 if $line =~ m{^File(\d+)=(http?://.+?)\s*$};
+ $pls{$1}->{url} = $2 if $line =~ m{^File(\d+)=(https?://.+?)\s*$};
}
}

0 comments on commit 64a05ac

Please sign in to comment.
Something went wrong with that request. Please try again.