summaryrefslogtreecommitdiffstats
path: root/bin/checkMissing
diff options
context:
space:
mode:
Diffstat (limited to 'bin/checkMissing')
-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