desbma / sacad

Smart Automatic Cover Art Downloader
Mozilla Public License 2.0
315 stars 17 forks source link

SACAD

Smart Automatic Cover Art Downloader

PyPI version AUR version CI status Supported Python versions License

SACAD is a multi platform command line tool to download album covers without manual intervention, ideal for integration in scripts, audio players, etc.

SACAD also provides a second command line tool, sacad_r, to scan a music library, read metadata from audio tags, and download missing covers automatically, optionally embedding the image into audio audio files.

Features

SACAD is designed to be robust and be executed in batch of thousands of queries:

Installation

SACAD requires Python >= 3.8.

Standalone Windows executable

Windows users can download a standalone binary which does not require Python.

Arch Linux

Arch Linux users can install the sacad AUR package.

From PyPI (with PIP)

  1. If you don't already have it, install pip for Python 3
  2. Install SACAD: pip3 install sacad

From source

  1. If you don't already have it, install setuptools for Python 3
  2. Clone this repository: git clone https://github.com/desbma/sacad
  3. Install SACAD: python3 setup.py install

Optional

Additionally, if you want to benefit from image crunching (lossless recompression to save additional space):

On Ubuntu and other Debian derivatives, you can install them with sudo apt-get install optipng jpegoptim.

Note that depending of the speed of your CPU, crunching may significantly slow down processing as it is very CPU intensive (especially with optipng).

Command line usage

Two tools are provided: sacad to search and download one cover, and sacad_r to scan a music library and download all missing covers.

Run sacad -h / sacad_r -h to get full command line reference.

Examples

To download the cover of Master of Puppets from Metallica, to the file AlbumArt.jpg, targetting ~ 600x600 pixel resolution: sacad "metallica" "master of puppets" 600 AlbumArt.jpg.

To download covers for your library with the same parameters as previous example: sacad_r library_directory 600 AlbumArt.jpg.

Limitations

Adding cover sources

Adding a new cover source is very easy if you are a Python developer, you need to inherit the CoverSource class and implement the following methods:

See comments in the code for more information.

License

Mozilla Public License Version 2.0