diff --git a/docs/config.example.toml b/docs/config.example.toml index 7944a6f..219c6f9 100644 --- a/docs/config.example.toml +++ b/docs/config.example.toml @@ -137,7 +137,7 @@ allowed = [ # album = "albums/{album.artist} - {album.title}" # you can access: {playlist} -# playlist = "playlists/{title}" +# playlist = "playlists/{playlist.title}" [m3u] diff --git a/tiddl/cli/commands/download/__init__.py b/tiddl/cli/commands/download/__init__.py index c30a6d3..7950127 100644 --- a/tiddl/cli/commands/download/__init__.py +++ b/tiddl/cli/commands/download/__init__.py @@ -679,7 +679,7 @@ def download_callback( and playlist.squareImage ): Cover( - playlist.squareImage, size=max(CONFIG.cover.size, 1080) + playlist.squareImage, size=min(CONFIG.cover.size, 1080) ).save_to_directory( path=DOWNLOAD_PATH / format_template( diff --git a/tiddl/core/metadata/cover.py b/tiddl/core/metadata/cover.py index aa4eeca..fcee65f 100644 --- a/tiddl/core/metadata/cover.py +++ b/tiddl/core/metadata/cover.py @@ -50,6 +50,10 @@ class Cover: if not self.data: self.data = self.fetch_data() + if not self.data: + log.debug(f"cover data is empty ({file})") + return + file.parent.mkdir(parents=True, exist_ok=True) try: