Add comments and echo to watch

This commit is contained in:
finga 2020-04-23 18:49:00 +02:00
parent 448736f5e4
commit 6e3b60e406

View file

@ -35,6 +35,7 @@ fi
find_series | while read -r series; do
if [ "$1" = "$series" ]; then
cd "$src_path/$series"
# use absolute or relative linking
if [ -z "$link_path" ]; then
src_path=""
current="${series}_current"
@ -43,10 +44,12 @@ find_series | while read -r series; do
current="${link_path}/${series}_current"
fi
# create first symlink if series was never watched before
if [ ! -f "$current" ]; then
ln -s "$src_path$(find . -maxdepth 1 -printf "%f\\n" | tail -n+2 | sort | head -n1)" "$current"
fi
echo "Playing: $(readlink "$current")"
mpv --input-conf "${conf_path}/input.conf" "$current" && ln -sf "$src_path$(next)" "$current"
fi
done