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:
parent
381e6ab072
commit
52de56b79d
|
@ -1,4 +1,4 @@
|
||||||
# watch
|
# `series`
|
||||||
A small script to help me remember were I left off playing
|
A small script to help me remember were I left off playing
|
||||||
alphabetically correct ordered media files.
|
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.
|
played until the end. Then it points to the next Episode.
|
||||||
|
|
||||||
## Configuration
|
## 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
|
environment variable. The path for keeping the symlinks (the current
|
||||||
file to be watched) can be set via the `WATCH_LINK_PATH` environment
|
file to be watched) can be set via the `SERIES_LINK_PATH` environment
|
||||||
variable. If `WATCH_LINK_PATH` is not set the symlinks are kept in the
|
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
|
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.
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
src_path="${WATCH_SRC_PATH:-/media/hdd1/media/series}"
|
src_path="${SERIES_SRC_PATH:-/media/hdd1/media/series}"
|
||||||
link_path="${WATCH_LINK_PATH:-}"
|
link_path="${SERIES_LINK_PATH:-}"
|
||||||
|
|
||||||
find_series() {
|
find_series() {
|
||||||
find "$src_path" -maxdepth 1 -printf "%f\\n" | sort | grep -v "$(basename "$src_path")"
|
find "$src_path" -maxdepth 1 -printf "%f\\n" | sort | grep -v "$(basename "$src_path")"
|
Loading…
Reference in a new issue