diff --git a/scripts/add_item.py b/scripts/add_item.py index 4e4b46d..fa42ac9 100644 --- a/scripts/add_item.py +++ b/scripts/add_item.py @@ -481,7 +481,7 @@ def cleanup_result(item, media_type) -> dict: del item[f"original_{title_key}"], item["original_language"] if "tv-episodes" == media_type: - item['series']['tmdb_id'] = item['show_id'] + item['series'] = { 'tmdb_id': item['show_id'] } del item['show_id'] if "books" == media_type: @@ -561,8 +561,8 @@ def main() -> None: elif "tv-episodes" == media_type: log = "log" - while re.search("[0-9]+", item_id) is None: - item_id = input("Enter IMDB ID: ") + while re.search("(tt)?[0-9]+", item_id) is None: + item_id = input("Enter TVDB or IMDB ID: ") elif "tv-series" == media_type: log = "" @@ -572,7 +572,7 @@ def main() -> None: while re.search("[0-9]+", item_id) is None: item_id = input("Enter TMDB ID: ") - add_item_to_log(re.search("[0-9]+", item_id)[0], media_type, log) + add_item_to_log(re.search("(tt)?[0-9]+", item_id)[0], media_type, log) except Exception: logger.exception("Exception occurred")