Fix bug in anime watch with empty watch list not exiting automatically

master
nate-moo 2022-01-14 20:11:36 -05:00
parent 17fb8fe8bc
commit d1c595279d
1 changed files with 7 additions and 0 deletions

View File

@ -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