Created
June 2, 2014 02:39
-
-
Save askvictor/44a89af135fb245b7e1d to your computer and use it in GitHub Desktop.
Messy hack for Plugin.pm in squeezebox youtube plugin to deal with full youtube URLs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(my $x1, my $x2, my $x3, my $x4, my $x5) = ($args->{'search'} =~ /(youtu be\/|youtube com\/(watch\?(.*&)?v=|(embed|v)\/))([^\?&"'>]+)/); | |
if ($x5) { | |
$url = 'youtube://' . $x5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment