summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2012-06-12 10:27:22 +0200
committerFlorian Bruhin <me@the-compiler.org>2012-06-12 10:27:22 +0200
commitc9e308f267366f69033d085b97aeab7aafbc564f (patch)
tree34a0172c192a3a561f5f780fcaf0d0fcc63f2058
downloadquvi-dwb-c9e308f267366f69033d085b97aeab7aafbc564f.tar.gz
quvi-dwb-c9e308f267366f69033d085b97aeab7aafbc564f.zip
Initial commit
-rwxr-xr-xquvi.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/quvi.sh b/quvi.sh
new file mode 100755
index 0000000..7444ca0
--- /dev/null
+++ b/quvi.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+# dwb: Control m
+exec="mplayer %u"
+
+formats=$(quvi -v quiet -F "$DWB_URI" 2>&1)
+
+if [[ "$formats" == "error: no support"* ]]; then
+ echo "js window.alert('Quvi does not support this page!');" >> "$DWB_FIFO"
+ exit 1
+fi
+
+IFS='|' read -a format_array <<< "${formats%% : *}"
+
+if [[ ${#format_array[@]} == 1 ]]; then
+ format="${format_array[0]}"
+else
+ format=$(zenity --text "Which format do you want?" --list --column=format default best "${format_array[@]}")
+fi
+
+quvi -f "$format" --exec "$exec" -v mute "$DWB_URI"