Skip to content

Instantly share code, notes, and snippets.

@askvictor
Created June 2, 2014 02:39
Show Gist options
  • Save askvictor/44a89af135fb245b7e1d to your computer and use it in GitHub Desktop.
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
(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