summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-08-23 16:05:09 +0200
committerlassulus <lass@aidsballs.de>2015-08-23 16:05:09 +0200
commit0f7433691efe4b1f90587439fe59428bfa6b82fb (patch)
tree7629c910c3bde129f1327dea6773135f076a2ad7 /bin
parent4b8b1d250f4cb1ddfe512054e824736c472479f3 (diff)
add missing song check
Diffstat (limited to 'bin')
-rwxr-xr-xbin/checkMissing9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/checkMissing b/bin/checkMissing
new file mode 100755
index 0000000..16cb477
--- /dev/null
+++ b/bin/checkMissing
@@ -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\\.ogg\$"); then
+ echo $uri
+fi