We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f498d68 commit b061c21Copy full SHA for b061c21
src/com/joelchristophel/sourceradio/Song.java
@@ -324,7 +324,7 @@ public void initialize(HttpRequest request) throws IOException {
324
325
private static String getYoutubeIdFromUrl(String text) {
326
Pattern pattern = Pattern
327
- .compile("^(?:http(?:s?):\\/\\/)?(?:www\\.)?(?:youtube\\.com\\/watch\\?v=|youtu\\.be\\/)([^?\\/]+).*$");
+ .compile("^(?:http(?:s?):\\/\\/)?(?:www\\.|m\\.)?(?:youtube\\.com\\/(?:watch\\?(?:.+&)?v=|v\\/|embed\\/ )|youtu\\.be\\/)([a-zA-Z0-9_-]{11,}).*$");
328
Matcher matcher = pattern.matcher(text);
329
if (matcher.find()) {
330
return matcher.group(1);
0 commit comments