From 12f76cc566ad8c741650a5cc79e5b33eb101bbb6 Mon Sep 17 00:00:00 2001 From: thecookingsenpai Date: Wed, 27 Dec 2023 23:45:23 +0100 Subject: [PATCH] Saving description is indeed useful --- term.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/term.py b/term.py index 4a9acc8..382eadb 100644 --- a/term.py +++ b/term.py @@ -153,6 +153,7 @@ def managePlaylist(playlist, to_download=False, to_convert=False, named=True): if not to_download: return playlist counter = 0 + description = playlist.description normalized_title = slugify(playlist.title) path_to_download_folder = ( str(os.path.dirname(os.path.realpath(__file__))) @@ -162,6 +163,9 @@ def managePlaylist(playlist, to_download=False, to_convert=False, named=True): # Creating a folder for the playlist if it doesn't exist if not os.path.isdir(path_to_download_folder): os.mkdir(path_to_download_folder) + # Saving the description to a file as a courtesy + with open(path_to_download_folder + "/description.txt", "w") as f: + f.write(description) # Iterating and doing our job(s) for url in playlist: counter += 1