From ff4e9ca61470853c328c288386e1fe80a5eef9df Mon Sep 17 00:00:00 2001 From: TylerCG <117808427+TylerCG@users.noreply.github.com> Date: Tue, 29 Apr 2025 17:04:32 -0400 Subject: [PATCH] force update --- app/download.py | 6 +++--- app/main.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/download.py b/app/download.py index 38d9040..e390f71 100644 --- a/app/download.py +++ b/app/download.py @@ -12,7 +12,7 @@ class grab(): seasons = [item.replace(url+'/season:', '') for item in option_values] return seasons - def poster(url, name, save_dir='/data/posters/', force_download=False): + def poster(url, name, force_download, save_dir='/data/posters/'): # Use alt for filename if available, fallback to a generic name alt_value = name path = urlsplit(url).path @@ -174,7 +174,7 @@ class dropout(): ydl.download([entry['webpage_url']]) - def series(): + def series(force_download): json_data=[] html=requests.get('https://www.dropout.tv/series').text @@ -200,7 +200,7 @@ class dropout(): info_data['SHOW'] = show.get('alt', 'No title') info_data['URL'] = show.get('href', 'No link') info_data['LINK'] = re.sub(r".*dropout.tv/", "", show.get('href', '')) - info_data['POSTER'] = grab.poster(show.get('src', ''), show.get('alt', '')) + info_data['POSTER'] = grab.poster(show.get('src', ''), show.get('alt', ''),force_download) json_data.append(info_data) # Sort the json_data by the 'SHOW' key diff --git a/app/main.py b/app/main.py index 6f6f440..d9b65b2 100644 --- a/app/main.py +++ b/app/main.py @@ -21,10 +21,10 @@ cached_data = None # api @app.get("/dropout/update") -async def dropoutUpdate(): +async def dropoutUpdate(force: str = True): global cached_data try: - download.dropout.series() + download.dropout.series(force) with open('/data/dropout.json') as f: cached_data = json.load(f) return JSONResponse(status_code=200, content={"status": "success", "message": "Series grab complete."})