Dolda2000 GitWeb
/
utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New extension handling.
[utils.git]
/
planime
diff --git
a/planime
b/planime
index
731a467
..
41332ae
100755
(executable)
--- a/
planime
+++ b/
planime
@@
-96,39
+96,19
@@
if [ "$nextep" = y -a -r nextep ]; then
fi
file="$(findfile "$base - " "$ep" "$qual")"
fi
file="$(findfile "$base - " "$ep" "$qual")"
-if [ -z "$file" ]; then
+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)
defopts=(-aid 1 -sid 0)
defopts=(-aid 1 -sid 0)
- elif [ -r "${ep}.mkv" ]; then
- ep="${ep}.mkv"
+ ;;
+ 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
+ ;;
+esac
ifile=".${ep}.info"
ifile=".${ep}.info"
@@
-153,4
+133,4
@@
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
-"${cmdline[@]}" "$
ep
"
+"${cmdline[@]}" "$
file
"