Skip to content

Commit

Permalink
Change TMDb default blacklist threshold to 5
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinHeist committed Apr 15, 2022
1 parent 0e9c3e6 commit fb82532
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/TMDbInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TMDbInterface(WebInterface):
API_BASE_URL = 'https://api.themoviedb.org/3/'

"""Default for how many failed requests lead to a blacklisted entry"""
BLACKLIST_THRESHOLD = 3
BLACKLIST_THRESHOLD = 5

"""Generic translated episode format strings for each language code"""
GENERIC_TITLE_FORMATS = {
Expand Down
3 changes: 2 additions & 1 deletion modules/WebInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _get(self, url: str, params: dict) -> dict:

def download_image(self, image_url: str, destination: 'Path') -> None:
"""
Downloads the provided image URL to the destination filepath.
Download the provided image URL to the destination filepath.
:param image_url: The image url to download.
:param destination: The destination for the requested image.
Expand All @@ -68,6 +68,7 @@ def download_image(self, image_url: str, destination: 'Path') -> None:
# Make parent folder structure
destination.parent.mkdir(parents=True, exist_ok=True)

# Attempt to download the image, if an error happens log to user
try:
with destination.open('wb') as file_handle:
file_handle.write(get(image_url).content)
Expand Down

0 comments on commit fb82532

Please sign in to comment.