Initial code commit

This commit is contained in:
KeksNino
2025-09-19 23:48:10 +02:00
committed by GitHub
parent 2aeaf8d19c
commit ccfe41e74e
+20
View File
@@ -0,0 +1,20 @@
import os
import csv
download_folder = "/home/user/Music/test/"
csv_file = "syntax-error.csv"
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")
# 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}")