Smart Automatic Cover Art Downloader

Here is where you can post tips and tricks to share with other users of MX. Do not ask for help in this Forum.
Post Reply
Message
Author
User avatar
sunrat
Posts: 636
Joined: Mon Mar 28, 2016 9:54 pm

Smart Automatic Cover Art Downloader

#1 Post by sunrat »

It's not often a program blows me away by doing something that I have spent many hours on in the past with a single command. This is such a program.
Smart Automatic Cover Art Downloader is a Python3 program which will search and download album covers for music. It can do a single album at a time or your whole collection at once! It saves the covers in the album directory or can optionally embed them in the music files. CLI only but don't let that put you off, it's as easy as py. :)
You need Python >= 3.5
Install pip:

Code: Select all

apt install python3-pip
Install SACD:

Code: Select all

pip3 install sacad
Here's one I tried:

Code: Select all

$ sacad "Cary Brothers" "Under Control" 500 cover.png
Main: jpegoptim could not be found, JPEG crunching will be disabled
Main: optipng could not be found, PNG crunching will be disabled
LastFmCoverSource: Got 0 relevant (5 excluded) results from source 'LastFmCoverSource'
AmazonCdCoverSource: Got 2 relevant (0 excluded) results from source 'AmazonCdCoverSource'
AmazonDigitalCoverSource: Got 1 relevant (0 excluded) results from source 'AmazonDigitalCoverSource'
GoogleImagesWebScrapeCoverSource: Got 15 relevant (5 excluded) results from source 'GoogleImagesWebScrapeCoverSource'
Cover: Reference is: LastFmCoverSourceResult 'https://lastfm-img2.akamaized.net/i/u/300x300/273d2c3921bf4f8990b5d7b3c27b68f9.png'
Cover: Downloading cover 'https://images-na.ssl-images-amazon.com/images/I/51wO11jhSML.jpg' (part 1/1)...
Cover: Converting to PNG...
Install jpegoptim and optipng if you want to crunch the images.

It will also download covers for every album in a specified directory with sacad_r . I tried it on a directory with 17 albums and the only one it didn't find was a bootleg Grateful Dead album. Magic!

Github page - https://github.com/desbma/sacad

User avatar
rich
Posts: 180
Joined: Sat Mar 31, 2018 6:39 pm

Re: Smart Automatic Cover Art Downloader

#2 Post by rich »

sunrat wrote: Fri Jun 01, 2018 10:36 amit's as easy as py. :)
XD nice

This is wicked cool! Just wanted to throw it out there, for python3-pip to work, it needs its recommended packages, I don't know if it's packaged wrong or what but if you just grab it without them, it gives gnarly errors like

Code: Select all

$ pip3 install sacad
Collecting sacad
  Downloading https://files.pythonhosted.org/packages/bb/45/07acb06012e241fa2cc1b18f7ae789e55f01ecf94db67ddbb39b80772480/sacad-2.1.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named 'setuptools'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-0__hymde/sacad/
So unless you've already adjusted your system, make sure to use

Code: Select all

apt --install-recommends python3-pip

User avatar
sunrat
Posts: 636
Joined: Mon Mar 28, 2016 9:54 pm

Re: Smart Automatic Cover Art Downloader

#3 Post by sunrat »

I tested this in siduction which has decided that recommends should be installed by default now as they are more sensible than they used to be. Only checked to make sure MX has the correct version of Python. I mainly posted this after searching and finding it when motivated by a post here in the Spanish subforum.
There is an AUR package, maybe one could be built for MX/Debian.

It certainly is wicked cool! Will save many hours.

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 1:21 am

Re: Smart Automatic Cover Art Downloader

#4 Post by KoO »

pip3 install -U setuptools = do this if you get and egg error.. [sudo] ?
or
pip install -U setuptools
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

Post Reply

Return to “Tips & Tricks by users”