Rename watch to series

To resolve the naming conflict with `watch` which executes a program
periodically and shows its output.
This commit is contained in:
finga 2021-11-05 11:04:09 +01:00
parent 381e6ab072
commit 52de56b79d
3 changed files with 7 additions and 7 deletions

View file

@ -1,4 +1,4 @@
# watch
# `series`
A small script to help me remember were I left off playing
alphabetically correct ordered media files.
@ -7,9 +7,9 @@ The idea is to have a symlink which is updated each time a clip is
played until the end. Then it points to the next Episode.
## Configuration
The path containing the media can be set via the `WATCH_SRC_PATH`
The path containing the media can be set via the `SERIES_SRC_PATH`
environment variable. The path for keeping the symlinks (the current
file to be watched) can be set via the `WATCH_LINK_PATH` environment
variable. If `WATCH_LINK_PATH` is not set the symlinks are kept in the
file to be watched) can be set via the `SERIES_LINK_PATH` environment
variable. If `SERIES_LINK_PATH` is not set the symlinks are kept in the
folder of the series and will point to a relative path. If
`WATCH_LINK_PATH` is set the symlink points to an absolute path.
`SERIES_LINK_PATH` is set the symlink points to an absolute path.

View file

@ -1,8 +1,8 @@
#!/bin/sh
set -e
src_path="${WATCH_SRC_PATH:-/media/hdd1/media/series}"
link_path="${WATCH_LINK_PATH:-}"
src_path="${SERIES_SRC_PATH:-/media/hdd1/media/series}"
link_path="${SERIES_LINK_PATH:-}"
find_series() {
find "$src_path" -maxdepth 1 -printf "%f\\n" | sort | grep -v "$(basename "$src_path")"