mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 01:16:18 -05:00
Creating videos and archives directory when they don't exist.
This commit is contained in:
parent
b5ea4fe3de
commit
e0b5966717
2 changed files with 5 additions and 2 deletions
|
|
@ -26,7 +26,10 @@ ARCHIVE_SERVICE = 'http://archive:8080'
|
|||
|
||||
|
||||
def get_archive_directory() -> pathlib.Path:
|
||||
return get_media_directory() / 'archive'
|
||||
archive_directory = get_media_directory() / 'archive'
|
||||
if not archive_directory.is_dir():
|
||||
archive_directory.mkdir()
|
||||
return archive_directory
|
||||
|
||||
|
||||
def get_domain_directory(url: str) -> pathlib.Path:
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class VideoDownloader(Downloader, ABC):
|
|||
out_dir = get_no_channel_directory()
|
||||
if channel:
|
||||
out_dir = channel.directory.path
|
||||
out_dir.mkdir(exist_ok=True)
|
||||
out_dir.mkdir(exist_ok=True, parents=True)
|
||||
|
||||
try:
|
||||
video_path, entry = self.prepare_filename(url, out_dir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue