Skip to content

Commit 603f7de

Browse files
author
SM_SAYEED
committed
"Use /data/drive_music.csv for persistent storage"
1 parent a359fdc commit 603f7de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def public_clips():
419419
clips = []
420420

421421
try:
422-
with open('drive_music.csv', encoding='utf-8') as f:
422+
with open('/data/drive_music.csv', encoding='utf-8') as f:
423423
reader = csv.DictReader(f)
424424

425425
# ✅ Safety check: ensure CSV has required headers
@@ -559,7 +559,7 @@ def extract_drive_id(link):
559559
preview_url = f"https://drive.google.com/file/d/{file_id}/preview"
560560
download_url = f"https://drive.google.com/uc?export=download&id={file_id}"
561561
try:
562-
with open('drive_music.csv', 'a', newline='', encoding='utf-8') as f:
562+
with open('/data/drive_music.csv', 'a', newline='', encoding='utf-8') as f:
563563
writer = csv.writer(f)
564564
writer.writerow([title, description, preview_url, download_url])
565565
message = "✅ Clip added successfully!"

0 commit comments

Comments
 (0)