mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 14:36:34 +00:00
Use mkdir_p in youtube.py
This commit is contained in:
parent
a33620f555
commit
80a7718a64
@ -9,6 +9,7 @@ from pathlib import Path
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from copy import copy
|
from copy import copy
|
||||||
from common.logger import log
|
from common.logger import log
|
||||||
|
from .utils import mkdir_p
|
||||||
import yt_dlp
|
import yt_dlp
|
||||||
|
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ _youtubedl_tempdir = getattr(settings, 'YOUTUBE_DL_TEMPDIR', None)
|
|||||||
if _youtubedl_tempdir:
|
if _youtubedl_tempdir:
|
||||||
_youtubedl_tempdir = str(_youtubedl_tempdir)
|
_youtubedl_tempdir = str(_youtubedl_tempdir)
|
||||||
_youtubedl_tempdir_path = Path(_youtubedl_tempdir)
|
_youtubedl_tempdir_path = Path(_youtubedl_tempdir)
|
||||||
_youtubedl_tempdir_path.mkdir(parents=True, exist_ok=True)
|
mkdir_p(_youtubedl_tempdir_path)
|
||||||
(_youtubedl_tempdir_path / '.ignore').touch(exist_ok=True)
|
(_youtubedl_tempdir_path / '.ignore').touch(exist_ok=True)
|
||||||
_paths = _defaults.get('paths', {})
|
_paths = _defaults.get('paths', {})
|
||||||
_paths.update({ 'temp': _youtubedl_tempdir, })
|
_paths.update({ 'temp': _youtubedl_tempdir, })
|
||||||
|
Loading…
Reference in New Issue
Block a user