From 19651d506e75eb0adf93c9177db0700706af4c6c Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Wed, 12 Mar 2025 14:18:24 +0100 Subject: [PATCH] Add number before songs --- app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 05b370a..fc72946 100644 --- a/app.py +++ b/app.py @@ -62,8 +62,10 @@ def save2csv(result): playlist_file_name = os.path.join(working_dir, playlist + '.csv') with open(playlist_file_name, mode='w', encoding="iso-8859-1") as playlist_file: + count = 0 for item in result[playlist]: - playlist_file.write(item + '\n') + count += 1 + playlist_file.write(str(count) + '. ' + item + '\n') if __name__ == '__main__': extract()