aboutsummaryrefslogtreecommitdiffstats
path: root/src/youload_playlist.py
diff options
context:
space:
mode:
authornathansmithsmith <nathansmith7@mailfence.com>2023-11-09 18:28:44 +0000
committernathansmithsmith <nathansmith7@mailfence.com>2023-11-09 18:28:44 +0000
commita923bfde6c4612f013c40354a3726aa1f06de15c (patch)
tree33397092aab0a08bf10b7b29257e5b65e7d62c04 /src/youload_playlist.py
parentbfdf9baefe2d0fa3b8e4f20ee59cdbb7afa934c5 (diff)
downloadyouload-a923bfde6c4612f013c40354a3726aa1f06de15c.tar.gz
youload-a923bfde6c4612f013c40354a3726aa1f06de15c.tar.bz2
youload-a923bfde6c4612f013c40354a3726aa1f06de15c.zip
Folder chooser thingy working
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)