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