Usable.
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@1070
959494ce-11ee-0310-bf91-
de5d638817bd
fi
file="$(findfile "$base - " "$ep" "$qual")"
fi
file="$(findfile "$base - " "$ep" "$qual")"
+if [ -z "$file" -o ! -r "$file" ]; then
echo "planime: no matching file found" >&2
exit 1
fi
echo "planime: no matching file found" >&2
exit 1
fi
-echo "$file"
-exit 0
-
-if [ ! -r "$ep" ]; then
- if [ -z "$qual" ]; then
- ep="$(basename "$(pwd)") - ${ep}"
- else
- ep="$(basename "$(pwd)") ${qual} - ${ep}"
- fi
- if [ -r "${ep}.ogm" ]; then
- ep="${ep}.ogm"
+case "${file##*.}" in
+ ogm)
- elif [ -r "${ep}.mkv" ]; then
- ep="${ep}.mkv"
defopts=(-slang eng -alang jpn)
defopts=(-slang eng -alang jpn)
- elif [ -r "${ep}.mpg" ]; then
- ep="${ep}.mpg"
- elif [ -r "${ep}.mp4" ]; then
- ep="${ep}.mp4"
- elif [ -r "${ep}.avi" ]; then
- ep="${ep}.avi"
- fi
-fi
-
-if [ ! -r "$ep" ]; then
- echo "no such episode: $ep" >&2
- exit 1
-fi
if [ "`hostname`" = pc6 ]; then chwp=y; fi
if [ "$chwp" = y ]; then (sleep 2; randomwp) & fi
if [ "`hostname`" = pc6 ]; then chwp=y; fi
if [ "$chwp" = y ]; then (sleep 2; randomwp) & fi