summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-11-08 12:23:14 +0100
committerlassulus <lass@aidsballs.de>2015-11-08 12:23:36 +0100
commit533d789a1a549bb8fb1aac940a0d8d6ed36e8c38 (patch)
tree4d7ddb479fbc50aa96c0190dd7cffa5f7f235251 /bin
parente29d40227ee37f6fd4b2a6d770bff90ff36727a9 (diff)
add checkMissingmp3
Diffstat (limited to 'bin')
-rwxr-xr-xbin/checkMissingmp39
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/checkMissingmp3 b/bin/checkMissingmp3
new file mode 100755
index 0000000..d7722d2
--- /dev/null
+++ b/bin/checkMissingmp3
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+uri=$1
+musicDir=${musicDir-./}
+id=$(echo "$uri" | sed -n 's@^https\?://www\.youtube\.com/watch?v=@@p' | sed 's/#.*$//')
+
+if ! file=$(find $musicDir | grep -q "[-]$id\\.mp3\$"); then
+ echo $uri
+fi