fix the entire code

This commit is contained in:
KeksNino
2025-09-20 00:03:18 +02:00
committed by GitHub
parent fb2b342322
commit 043fc36a66
+4 -3
View File
@@ -9,12 +9,13 @@ playlist_tracks = set()
with open(download_folder + csv_file, newline='', encoding='utf-8') as f: with open(download_folder + csv_file, newline='', encoding='utf-8') as f:
reader = csv.reader(f) reader = csv.reader(f)
for row in reader: for row in reader:
row = row[:-1] row = row[:-1]y
print(f"{row[1]} - {row[0]}.mp3") filename = f"{row[1]} - {row[0]}.mp3"
playlist_tracks.add(filename)
# Scan download folder # Scan download folder
for file in os.listdir(download_folder): for file in os.listdir(download_folder):
if file not in playlist_tracks: if file not in playlist_tracks:
file_path = os.path.join(download_folder, file) file_path = os.path.join(download_folder, file)
os.remove(file_path) os.remove(file_path)
print(f"Deleted: {file}") print(f"Deleted File: {file}")