Small fixes V1.0.4
This commit is contained in:
@@ -5,7 +5,10 @@ import hashlib
|
||||
|
||||
def rotate_downloads(downloads_dir: str):
|
||||
MAX_FILES = os.getenv('MAX_FILES')
|
||||
if not MAX_FILES.isnumeric():
|
||||
return {'status': 'error', 'message': f'MAX_FILES: {MAX_FILES} - nie jest cyfrą.'}
|
||||
|
||||
MAX_FILES = int(MAX_FILES)
|
||||
files = [
|
||||
os.path.join(downloads_dir, f)
|
||||
for f in os.listdir(downloads_dir)
|
||||
@@ -23,7 +26,7 @@ def rotate_downloads(downloads_dir: str):
|
||||
def download_video(yt_url: str) -> dict:
|
||||
MAX_DUR = os.getenv('MAX_DURATION')
|
||||
if not MAX_DUR.isnumeric():
|
||||
return {'status': 'error', 'message': f'MAX_DUR: {MAX_DUR} nie jest cyfrą.'}
|
||||
return {'status': 'error', 'message': f'MAX_DUR: {MAX_DUR} - nie jest cyfrą.'}
|
||||
|
||||
MAX_DUR = int(MAX_DUR)
|
||||
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
Reference in New Issue
Block a user