Skip to content

Commit

Permalink
add maxwidth setting for album art
Browse files Browse the repository at this point in the history
  • Loading branch information
returntoreality committed Nov 3, 2024
1 parent 0efd908 commit 88e5b34
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion beetsplug/alternatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def parse_config(self, config: confuse.ConfigView):
self.query, _ = parse_query_string(query, Item)

self.removable = config.get(dict).get("removable", True) # type: ignore
self.album_art_maxwidth = config.get(dict).get("album_art_maxwidth", None) # type: ignore

if "directory" in config:
dir = config["directory"].as_path()
Expand Down Expand Up @@ -342,7 +343,14 @@ def _sync_art(self, item: Item, path: Path):
album = item.get_album()
if album and album.artpath and Path(str(album.artpath, "utf8")).is_file():
self._log.debug(f"Embedding art from {album.artpath} into {path}")
art.embed_item(self._log, item, album.artpath, itempath=bytes(path))

art.embed_item(
self._log,
item,
album.artpath,
maxwidth=self.album_art_maxwidth,
itempath=bytes(path),
)


class ExternalConvert(External):
Expand Down

0 comments on commit 88e5b34

Please sign in to comment.