From d1c595279d7724443824bfd939614d0d1357ce5b Mon Sep 17 00:00:00 2001 From: nate-moo <40650681+nate-moo@users.noreply.github.com> Date: Fri, 14 Jan 2022 20:11:36 -0500 Subject: [PATCH] Fix bug in anime watch with empty watch list not exiting automatically --- anime_downloader/commands/watch.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/anime_downloader/commands/watch.py b/anime_downloader/commands/watch.py index b5e147c..40b5f1e 100644 --- a/anime_downloader/commands/watch.py +++ b/anime_downloader/commands/watch.py @@ -66,6 +66,13 @@ def command(anime_name, new, update_all, _list, quality, remove, util.print_info(__version__) watcher = _watch.Watcher() + with open(watcher.WATCH_FILE, "r") as f: + contents = f.read() + # print(contents) + if "[]" in contents or "[{}]" in contents: + logger.error("Add something to the watch list using `anime watch --new`") + sys.exit(1) + if new: if anime_name: query = anime_name