diff --git a/watch/README.md b/series/README.md similarity index 57% rename from watch/README.md rename to series/README.md index 58df721..da6c7bc 100644 --- a/watch/README.md +++ b/series/README.md @@ -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. diff --git a/watch/input.conf b/series/input.conf similarity index 100% rename from watch/input.conf rename to series/input.conf diff --git a/watch/watch.sh b/series/watch.sh similarity index 94% rename from watch/watch.sh rename to series/watch.sh index f895c46..36ced9a 100755 --- a/watch/watch.sh +++ b/series/watch.sh @@ -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")"