diff --git a/backend/config.py b/backend/config.py index daba5d4..4cfa230 100644 --- a/backend/config.py +++ b/backend/config.py @@ -13,10 +13,6 @@ class Config: # Cookies are in Netscape CSV format, see yt-dlp docs self.cookies_dir = Path(os.getenv('COOKIES_DIR') or 'cookies') - # Note: yt-dlp's path trimmer also counts album_path_tmpl, not only filename - # Why 235? 255 is the ext4 limit. 255 - len("/var/lib/musicdlp/") = 237, rounded down to 235 - self.path_length = int(os.getenv('PATH_LENGTH') or 235) - self.tmpl = os.path.join( # `artists.0` instead of `artist`, because the latter can contain "feat. ..." os.getenv('ALBUM_PATH_TMPL') or 'music/%(artists.0)s/%(album)s', diff --git a/backend/ydl_pool.py b/backend/ydl_pool.py index 9c06a3e..4cc869b 100644 --- a/backend/ydl_pool.py +++ b/backend/ydl_pool.py @@ -63,7 +63,6 @@ class Downloader: if ydl is None: ydl = create_ydl_fn[site]() - ydl.params['trim_file_name'] = cfg.path_length # Note: not only filename, but path in outtmpl ydl.params['outtmpl']['default'] = cfg.tmpl ydl.add_post_processor(id3pp.ID3TagsPP(), when='post_process')