aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/local_playlist.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/local_playlist.py')
-rw-r--r--youtube/local_playlist.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/youtube/local_playlist.py b/youtube/local_playlist.py
index aa3ac27..968f1a6 100644
--- a/youtube/local_playlist.py
+++ b/youtube/local_playlist.py
@@ -26,8 +26,7 @@ def video_ids_in_playlist(name):
def add_to_playlist(name, video_info_list):
- if not os.path.exists(playlists_directory):
- os.makedirs(playlists_directory)
+ os.makedirs(playlists_directory, exist_ok=True)
ids = video_ids_in_playlist(name)
missing_thumbnails = []
with open(os.path.join(playlists_directory, name + ".txt"), "a", encoding='utf-8') as file: