aboutsummaryrefslogtreecommitdiffstats
path: root/src/youload_playlist.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/youload_playlist.py')
-rw-r--r--src/youload_playlist.py4
1 files changed, 4 insertions, 0 deletions
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)