From a923bfde6c4612f013c40354a3726aa1f06de15c Mon Sep 17 00:00:00 2001 From: nathansmithsmith Date: Thu, 9 Nov 2023 11:28:44 -0700 Subject: Folder chooser thingy working --- src/youload_playlist.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/youload_playlist.py') diff --git a/src/youload_playlist.py b/src/youload_playlist.py index 1d62ee5..803b1c1 100644 --- a/src/youload_playlist.py +++ b/src/youload_playlist.py @@ -19,6 +19,10 @@ class YouLoadPlayList: video_size = video.streams.get_highest_resolution().filesize // 1048576 return f"Title: {video.title}, Size: {video_size} MB" + def set_download_directory(self, directory: str) -> None: + """Sets where the playlist folder will be downloaded""" + self.folder_name = os.path.join(directory, make_alpha_numeric(self.yt_playlist.title)) + def prepare_for_download(self) -> None: """Gets the playlist ready for download. Creates the output folder and that stuff.""" os.mkdir(self.folder_name) -- cgit v1.2.3