Added some new video helper scripts
[videoscripts/.git] / save_movie
diff --git a/save_movie b/save_movie
new file mode 100755 (executable)
index 0000000..ce92e50
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+DROPBOX="/naspool/dropbox/New Movies"
+ENCODED="/naspool/dropbox/Encoded"
+MOVIE="$1"
+CATEGORY=$2
+
+if [[ -z $MOVIE ]] || [[ -z $CATEGORY ]]; then
+  echo "Usage: $0 <movie.mkv> <Children|Collection|Holiday|Family|Church|Mobile>"
+  exit 1
+fi
+
+if [[ ! -e "$MOVIE" ]]; then
+  echo "-E- Bad movie name: $MOVIE"
+  exit 1
+fi
+
+if [[ ! -d "$DROPBOX/$CATEGORY" ]] ; then
+  echo "-E- Unsupported category: $CATEGORY"
+  exit 1
+fi
+
+echo "-> Saving movie \"$MOVIE\" to our movie library: $CATEGORY"
+mv "$MOVIE" "$DROPBOX/$CATEGORY"
+