Update app.py
Browse files
app.py
CHANGED
@@ -79,6 +79,7 @@ def cleanup_dir(dir_path: Path):
|
|
79 |
logger.error(f"Error cleaning up {dir_path}: {e}")
|
80 |
|
81 |
|
|
|
82 |
# Download a Spotify track and return a download URL
|
83 |
@app.post("/spot-track/{track_id}")
|
84 |
async def download_spotify_track(
|
@@ -86,7 +87,6 @@ async def download_spotify_track(
|
|
86 |
background_tasks: BackgroundTasks
|
87 |
):
|
88 |
try:
|
89 |
-
spo = SpoLogin(credentials_path=CREDENTIALS_PATH)
|
90 |
downloads_dir = Path("downloads")
|
91 |
# Create unique directory for this download
|
92 |
download_id = uuid.uuid4().hex
|
|
|
79 |
logger.error(f"Error cleaning up {dir_path}: {e}")
|
80 |
|
81 |
|
82 |
+
spo = SpoLogin(credentials_path=CREDENTIALS_PATH)
|
83 |
# Download a Spotify track and return a download URL
|
84 |
@app.post("/spot-track/{track_id}")
|
85 |
async def download_spotify_track(
|
|
|
87 |
background_tasks: BackgroundTasks
|
88 |
):
|
89 |
try:
|
|
|
90 |
downloads_dir = Path("downloads")
|
91 |
# Create unique directory for this download
|
92 |
download_id = uuid.uuid4().hex
|