diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 215fb3050..27fdfdc7a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -55,6 +55,14 @@
android:host="m.youtube.com"
android:scheme="https"
android:pathPrefix="/watch"/>
+
+
queryArguments = new HashMap<>();
- for(String e : queryElements) {
- String[] s = e.split("=");
- queryArguments.put(s[0], s[1]);
+ URI uri = new URI(videoUrl);
+ if(uri.getHost().contains("youtube")) {
+ String query = uri.getQuery();
+ String queryElements[] = query.split("&");
+ Map queryArguments = new HashMap<>();
+ for (String e : queryElements) {
+ String[] s = e.split("=");
+ queryArguments.put(s[0], s[1]);
+ }
+ return queryArguments.get("v");
+ } else if(uri.getHost().contains("youtu.be")) {
+ // uri.getRawPath() does somehow not return the last character.
+ // so we do a workaround instead.
+ //return uri.getRawPath();
+ String url[] = videoUrl.split("/");
+ return url[url.length-1];
+ } else {
+ Log.e(TAG, "Error could not parse url: " + videoUrl);
+
}
- return queryArguments.get("v");
- } catch(Exception e) {
+ } catch(Exception e) {
Log.e(TAG, "Error could not parse url: " + videoUrl);
e.printStackTrace();
return "";
}
+ return null;
}
@Override
diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml
new file mode 100644
index 000000000..e0b443174
--- /dev/null
+++ b/app/src/main/res/values-v21/styles.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index ff356914a..eaf1f6c18 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,5 +1,6 @@
- #dd0000
+ #dd0000
+ #bb0000
#66000000
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 4e752773a..454286d7f 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -4,13 +4,15 @@