mirror of https://github.com/nathom/streamrip.git
Implement source_subdirectories feature
This commit is contained in:
parent
577d914e93
commit
265a1216ee
|
@ -84,6 +84,9 @@ class PendingAlbum(Pending):
|
|||
return Album(meta, pending_tracks, self.config, album_folder, self.db)
|
||||
|
||||
def _album_folder(self, parent: str, meta: AlbumMetadata) -> str:
|
||||
formatter = self.config.session.filepaths.folder_format
|
||||
config = self.config.session
|
||||
if config.downloads.source_subdirectories:
|
||||
parent = os.path.join(parent, self.client.source.capitalize())
|
||||
formatter = config.filepaths.folder_format
|
||||
folder = meta.format_folder_path(formatter)
|
||||
return os.path.join(parent, folder)
|
||||
|
|
|
@ -197,6 +197,9 @@ class PendingSingle(Pending):
|
|||
c = self.config.session
|
||||
parent = c.downloads.folder
|
||||
formatter = c.filepaths.folder_format
|
||||
if c.downloads.source_subdirectories:
|
||||
parent = os.path.join(parent, self.client.source.capitalize())
|
||||
|
||||
return os.path.join(parent, meta.format_folder_path(formatter))
|
||||
|
||||
async def _download_cover(self, covers: Covers, folder: str) -> str | None:
|
||||
|
|
Loading…
Reference in New Issue