From 043fc36a668bedc2c67827ef612c359464969aeb Mon Sep 17 00:00:00 2001 From: KeksNino <87879013+KeksNino@users.noreply.github.com> Date: Sat, 20 Sep 2025 00:03:18 +0200 Subject: [PATCH] fix the entire code --- csv_file_sync.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/csv_file_sync.py b/csv_file_sync.py index b0bc16c..2d8418c 100644 --- a/csv_file_sync.py +++ b/csv_file_sync.py @@ -9,12 +9,13 @@ playlist_tracks = set() with open(download_folder + csv_file, newline='', encoding='utf-8') as f: reader = csv.reader(f) for row in reader: - row = row[:-1] - print(f"{row[1]} - {row[0]}.mp3") + row = row[:-1]y + filename = f"{row[1]} - {row[0]}.mp3" + playlist_tracks.add(filename) # Scan download folder for file in os.listdir(download_folder): if file not in playlist_tracks: file_path = os.path.join(download_folder, file) os.remove(file_path) - print(f"Deleted: {file}") + print(f"Deleted File: {file}")