From 9b675364bc0d800e9b5810b741777753cb6e7009 Mon Sep 17 00:00:00 2001 From: Ray Lyon Date: Sun, 24 Apr 2022 11:02:10 -0400 Subject: [PATCH] return movie even with sa api can't find it --- telegram-moviebot/telegram-moviebot.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/telegram-moviebot/telegram-moviebot.py b/telegram-moviebot/telegram-moviebot.py index 1f27c83..acf3ed3 100644 --- a/telegram-moviebot/telegram-moviebot.py +++ b/telegram-moviebot/telegram-moviebot.py @@ -89,12 +89,7 @@ def movie_lookup(movie): sa_response, services = movie_check.sa_lookup(sa_url, sa_headers, movie_id) if sa_response == "404": - tg_reply = ("I'm having trouble finding that movie\. " + - "Check your spelling and try again\.") logger.info('Movie not found by the Streaming Availability API.') - similarity = 0 - error_response = False - return tg_reply, similarity, error_response if sa_response == "401": tg_reply = ("Invalid Streaming Availability API token\. " + @@ -117,7 +112,7 @@ def movie_lookup(movie): f"\n[TMDB]({tmdb_page}{movie_id})") logger.info(f'Returning movie: "{movie_title}: ({movie_year})"') - if not services: + if not services or sa_response == "404": tg_reply = tg_reply + "\n\nStreaming not available :\(" else: for s in services: