2011-12-20, 22:14
TobiasTheCommie Wrote:Yeah, now i get the good stuff.
PHP Code:09:51:09 T:5052 ERROR: XBMC.PlayMedia could not play media: http://www.youtube.com/watch?v=zcDikgkoAqU&feature=youtube_gdata_player
in contrast to:
PHP Code:09:51:57 T:5248 NOTICE: YouTube-2.8.0 ARGV: ['plugin://plugin.video.youtube/', '0', '?path=/root/search&action=play_video&videoid=zcDikgkoAqU']
So looks like the XBMC Remote indeed can't handle any "&" after the "v".
XBMC remote code looks all right to me. What might be wrong here?
Code:
final Pattern pattern = Pattern.compile(".*v=([a-z0-9_\\-]+)(?:&.)*", Pattern.CASE_INSENSITIVE);
final Matcher matcher = pattern.matcher(path);
if (matcher.matches()) {
url = "plugin://plugin.video.youtube/?path=/root/search&action=play_video&videoid=" + matcher.group(1);
message = "Do you want to play\nYoutube video " + matcher.group(1) + " on XBMC? Youtube addon required!";
} else {
url = playuri.toString();
}
Do we maybe need to add A-Z in the regex?