Skip to main content

Topic: SACAD, a command line cover downloader (Read 7078 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
SACAD (Smart Automatic Cover Art Downloader)

I was quite fed up with the lack of a reliable solution to download album covers automatically on Linux, so I wrote one.
The good news it's that it's written in Python and should work on all platforms.

It works without manual intervention, ideal for integration in scripts, audio players, etc.

I need Windows testers, I have only tested it on Windows XP 32bits.

Features:
  • Can target specific image size
  • Support JPEG and PNG formats
  • Currently support 4 cover sources:
    • Last.fm
    • Google Images
    • ecover.to
    • Amazon.com
  • Smart sorting algorithm to select THE best cover for a given query, using several factors: source reliability, image format, image size, image similarity with reference cover, etc.
  • Automatically crunch images with optipng or jpegoptim (can save 30% of filesize without any loss of quality, great for portable players)
  • Cache search results locally for faster future search
  • Do everything to avoid getting blocked by the sources: hide user-agent and automatically take care of rate limiting
  • Automatically convert/resize image if needed


It's open source (MPL license), so if you are a developer you can mess up with the code, add new sources, etc.
Source is on GitHub.

Usage example:
To download front cover of album 'album' by artist 'artist', targeting 900x900 JPEG image: 
Code: [Select]
sacad 'artist' 'album' 900 cover.jpg


Installation:


Please report any problem you encounter.
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

  • ozok
  • [*][*][*][*]
SACAD, a command line cover downloader
Reply #1
Hi,

I've tried the following code and got an error.
Code: [Select]
>sacad.exe "Queen" "The Game" 900 cover.jpg

Error:
Code: [Select]
Traceback (most recent call last):
  File "C:\Python33\lib\site-packages\lxml\cssselect.py", line 16, in <module>
  File "C:\Python\32-bit\3.3\lib\importlib\_bootstrap.py", line 1567, in _find_and_load
  File "C:\Python\32-bit\3.3\lib\importlib\_bootstrap.py", line 1531, in _find_and_load_unlocked
ImportError: No module named 'cssselect'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python33\lib\site-packages\cx_Freeze\initscripts\Console3.py", line 27, in <module>
  File "sacad.py", line 28, in <module>
  File "C:\Python\32-bit\3.3\lib\importlib\_bootstrap.py", line 1567, in _find_and_load
  File "C:\Python\32-bit\3.3\lib\importlib\_bootstrap.py", line 1534, in _find_and_load_unlocked
  File "C:\Python33\lib\site-packages\lxml\cssselect.py", line 18, in <module>
ImportError: cssselect seems not to be installed. See http://packages.python.org
/cssselect/

I'm using the windows binaries you provide under win7 64bit.

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #2
Sorry, I uploaded a buggy Windows archive, here is a new one that should work.

EDIT: Does anyone know if there any way to edit that first post to update the old link?
  • Last Edit: 13 April, 2014, 03:27:55 PM by dutch109
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

  • ozok
  • [*][*][*][*]
SACAD, a command line cover downloader
Reply #3
Thanks, it works now. Ask a mod to edit your first post.

Edit: Can't you make a single exe for windows? Like youtube-dl has?
  • Last Edit: 13 April, 2014, 03:36:42 PM by ozok

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #4
Can't you make a single exe for windows? Like youtube-dl has?

Unfortunately it is not currently possible.

From what I can see in their source, youtube-dl uses py2exe, which can make single executable but does not support Python 3 (which SACAD is written in).
I use cx_Freeze, which works with Python 3, but does not support single executable 
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

SACAD, a command line cover downloader
Reply #5
Currently testing this out on Windows 8.1 64-bit.

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #6
Currently testing this out on Windows 8.1 64-bit.

Great, let me know if you have any problem.
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

  • Roseval
  • [*][*][*][*][*]
SACAD, a command line cover downloader
Reply #7
Tried
sacad "Michael Gees" "improviSatie" 1500 cover1.jpg
sacad "Christoph Prégardien  Michael Gees" "Die schöne Müllerin" 1500 cover2.jpg
sacad "Christoph Pregardien  Michael Gees" "Schubert Die schöne Mullerin" 1500 cover3.jpgen symphony

Must be between Dquote  on Win

1 is work by Satie but I got a Beethoven symphony by Jan Willem de Vriend as result
2 doesn't work at all
3 returned the right composition by the wrong artists
  • Last Edit: 18 April, 2014, 05:16:33 PM by Roseval
TheWellTemperedComputer.com

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #8
Tried
sacad "Michael Gees" "improviSatie" 1500 cover1.jpg
sacad "Christoph Prégardien  Michael Gees" "Die schöne Müllerin" 1500 cover2.jpg
sacad "Christoph Pregardien  Michael Gees" "Schubert Die schöne Mullerin" 1500 cover3.jpgen symphony

Must be between Dquote  on Win

1 is work by Satie but I got a Beethoven symphony by Jan Willem de Vriend as result
2 doesn't work at all
3 returned the right composition by the wrong artists


Thanks for the feedback.
  • None of the reliable cover sources have the result with a resolution that high, as a result you get the first image from Google Images which satisfies that resolution but is unrelated.
    You have 3 solutions:
    • use the -d option, which to quote the help:
      Code: [Select]
      -d, --disable-low-quality-sources
                              Disable cover sources that may return unreliable
                              results (ie. Google Images). It will speed up
                              processing and improve reliability, but may fail to
                              find results for some difficult searches.

      In that case it would juste tell you there is no result.
    • Lower the target resolution.
      I believe
      Code: [Select]
      sacad "Michael Gees" "improviSatie" 800 cover1.jpg
      returns the right result.
    • Tell SACAD that you target a high resolution, but are ready to make compromises if that criteria can not be satisfied, using the -t option:
      Code: [Select]
      -t SIZE_TOLERANCE_PRCT, --size-tolerance SIZE_TOLERANCE_PRCT
                              Tolerate this percentage of size difference with the
                              target size. Note that covers with size above or close
                              to the target size will still be preferred if
                              available

      In this example you target a 1500px resolution but are ready to accept a cover that is 70% smaller if there are no other results:
      Code: [Select]
      sacad "Michael Gees" "improviSatie" 1500 cover1.jpg -t 70 -d
  • It seems to be a bug with accentuated chars, I'll look at this.
    In the meantime, the following command works:
    Code: [Select]
    sacad "Christoph Pregardien Michael Gees" "Die schone Mullerin" 1500 cover2.jpg -t 70 -d
  • By removing the accent and running
    Code: [Select]
    sacad "Christoph Pregardien Michael Gees" "Schubert Die schone Mullerin" 1500 cover3.jpg -t 70
    I get the same result as 2), can you confirm this is not the result you want?
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #9
Here is a new Windows version that fixes searches with accentuated chars.

Additionnaly, to enable lossless image optimization, you can download optipng, and jpegoptim and add them to your path.
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

  • Roseval
  • [*][*][*][*][*]
SACAD, a command line cover downloader
Reply #10
Here is a new Windows version that fixes searches with accentuated chars.

Additionnaly, to enable lossless image optimization, you can download optipng, and jpegoptim and add them to your path.

Downloaded the latest version

sacad "Michael Gees" "improviSatie" 1500 cover1.jpg -t 70 -d
right cover
sacad "Christoph Prégardien Michael Gees" "Schubert Die schöne Müllerin" 1500 cover2.jpg -t 70
No cover at all
sacad "Christoph Pregardien Michael Gees" "Schubert Die schone Mullerin" 1500 cover3.jpg -t 70
right cover

Thanks
TheWellTemperedComputer.com

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #11
sacad "Christoph Prégardien Michael Gees" "Schubert Die schöne Müllerin" 1500 cover2.jpg -t 70
No cover at all
sacad "Christoph Pregardien Michael Gees" "Schubert Die schone Mullerin" 1500 cover3.jpg -t 70
right cover

I can not reproduce this, could you add -v debug to the first command, and post the output here? Thanks
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

  • Roseval
  • [*][*][*][*][*]
SACAD, a command line cover downloader
Reply #12
sacad "Christoph Prégardien Michael Gees" "Schubert Die schöne Müllerin" 1500 cover2.jpg -v debug





C:\Users\Vincent\Downloads\sacad>sacad "Christoph PrΘgardien Michael Gees" "Schu
bert Die sch÷ne Mⁿllerin" 1500 cover2.jpg -v debug
MainThread: optipng could not be found, PNG crunching will be disabled
MainThread: jpegoptim could not be found, JPEG crunching will be disabled
MainThread: 0 obsolete entries have been removed from cache 'cover_source_api_da
ta'
MainThread: Cache 'cover_source_api_data' contains 21 entries
MainThread: Total size of file 'c:\users\vincent\appdata\local\temp\sacad-cache.
sqlite': 847KB
MainThread: Searching with source 'LastFmCoverSource'...
MainThread: Querying URL 'http://ws.audioscrobbler.com/2.0/?method=album.getinfo
&api_key=2410a53db5c7490d0f50c100a020f359&album=schubert+die+sch%C3%B7ne+mnlleri
n&artist=christoph+prtgardien+michael+gees'...
MainThread: Search with source 'LastFmCoverSource' failed: 400 Client Error: Bad
Request
MainThread: Searching with source 'CoverParadiseCoverSource'...
MainThread: Got data for URL 'http://ecover.to/?Module=ExtendedSearch&SearchStri
ng=christoph+prtgardien+michael+gees+schubert+die+sch%C3%B7ne+mnllerin' from cac
he
MainThread: Got 0 relevant (0 excluded) results from source 'CoverParadiseCoverS
ource'
MainThread: Searching with source 'AmazonCoverSource'...
MainThread: Got data for URL 'http://www.amazon.com/gp/search?search-alias=popul
ar&field-artist=christoph+prtgardien+michael+gees&field-title=schubert+die+sch%C
3%B7ne+mnllerin&sort=relevancerank' from cache
MainThread: Got 0 relevant (0 excluded) results from source 'AmazonCoverSource'
MainThread: Searching with source 'GoogleImagesWebScrapeCoverSource'...
MainThread: Got data for URL 'http://www.google.com/images?gbv=2&q=%22christoph+
prtgardien+michael+gees%22+%22schubert+die+sch%C3%B7ne+mnllerin%22+front+cover&t
bs=isz%3Al' from cache
MainThread: Got 0 relevant (0 excluded) results from source 'GoogleImagesWebScra
peCoverSource'
MainThread: No reference result found
MainThread: No results

C:\Users\Vincent\Downloads\sacad>pause
Press any key to continue . . .
TheWellTemperedComputer.com

SACAD, a command line cover downloader
Reply #13
I really like this script.  It has worked well for most searches I have tried, retrieving the correct cover in good quality.  I have encountered just a couple problems.  Should I just post them as I encounter them?

This is a query I tried that resulted in an error.  It worked when I used a size of 500 but failed with a size of 1000, as shown below.


C:\Users\Dave\Downloads\sacad\sacad>sacad -v debug "neu" "neu 2" 1000 test.jpg
MainThread: 0 obsolete entries have been removed from cache 'cover_source_api_da
ta'
MainThread: Cache 'cover_source_api_data' contains 24 entries
MainThread: Total size of file 'c:\users\dave\appdata\local\temp\sacad-cache.sql
ite': 1.49MB
MainThread: Searching with source 'LastFmCoverSource'...
MainThread: Got data for URL 'http://ws.audioscrobbler.com/2.0/?method=album.get
info&api_key=2410a53db5c7490d0f50c100a020f359&album=neu+2&artist=neu' from cache

WebCacheThread: 0 obsolete entries have been removed from cache 'cover_image_dat
a'
WebCacheThread: 0 obsolete entries have been removed from cache 'cover_metadata'

WebCacheThread: Cache 'cover_image_data' contains 44 entries
WebCacheThread: Cache 'cover_metadata' contains 17 entries
WebCacheThread: Total size of file 'c:\users\dave\appdata\local\temp\Console3-ca
che.sqlite': 6.19MB
Thread-1: Got metadata for URL 'http://images.amazon.com/images/P/B000056IKU.02.
_SCMZZZZZZZ_.jpg' from cache
MainThread: Got 0 relevant (5 excluded) results from source 'LastFmCoverSource'
MainThread: Searching with source 'CoverParadiseCoverSource'...
MainThread: Got data for URL 'http://ecover.to/?Module=ExtendedSearch&SearchStri
ng=neu+neu+2' from cache
MainThread: Got 3 relevant (0 excluded) results from source 'CoverParadiseCoverS
ource'
MainThread:    - (01) JPEG  953x 953 http://ecover.to/res/exe/GetElement.php?ID
=79672
MainThread:    - (02) JPEG 1429x1429 http://ecover.to/res/exe/GetElement.php?ID
=478222
MainThread:    - (03) JPEG 1409x1383 http://ecover.to/res/exe/GetElement.php?ID
=1105210
MainThread: Searching with source 'AmazonCoverSource'...
MainThread: Got data for URL 'http://www.amazon.com/gp/search?search-alias=popul
ar&field-artist=neu&field-title=neu+2&sort=relevancerank' from cache
MainThread: Got data for URL 'http://www.amazon.com/Try-Something-Neu-Andrew/dp/
B002F3BQKI/ref=sr_1_1/191-0057135-0507017?s=music&ie=UTF8&sr=1-1' from cache
MainThread: Got data for URL 'http://www.amazon.com/Neu-2/dp/B000A87W9E/ref=sr_1
_2/191-0057135-0507017?s=music&ie=UTF8&sr=1-2' from cache
Thread-2: Got metadata for URL 'http://ecx.images-amazon.com/images/I/51CwDZCx96
L.jpg' from cache
Thread-3: Got metadata for URL 'http://ecx.images-amazon.com/images/I/41XUBoYAOW
L.jpg' from cache
Thread-4: Got metadata for URL 'http://ecx.images-amazon.com/images/I/41ILkO-txC
L.jpg' from cache
Thread-5: Got metadata for URL 'http://ecx.images-amazon.com/images/I/41s2cFCBBI
L.jpg' from cache
Thread-6: Got metadata for URL 'http://ecx.images-amazon.com/images/I/317ntQ9c29
L.jpg' from cache
Thread-7: Got metadata for URL 'http://ecx.images-amazon.com/images/I/41L5-aiosF
L.jpg' from cache
Thread-8: Got metadata for URL 'http://ecx.images-amazon.com/images/I/318V3p6m02
L.jpg' from cache
Thread-2: Got metadata for URL 'http://ecx.images-amazon.com/images/I/61ILT10qA3
L.jpg' from cache
MainThread: Got 0 relevant (9 excluded) results from source 'AmazonCoverSource'
MainThread: Searching with source 'GoogleImagesWebScrapeCoverSource'...
MainThread: Got data for URL 'http://www.google.com/images?gbv=2&q=%22neu%22+%22
neu+2%22+front+cover&tbs=isz%3Al' from cache
Thread-10: Downloading file header for URL 'http://fanart.tv/api/download.php%3F
type%3Ddownload%26image%3D44177%26section%3D2'...
Thread-11: Downloading file header for URL 'http://fanart.tv/api/download.php%3F
type%3Ddownload%26image%3D23802%26section%3D2'...
Thread-12: Downloading file header for URL 'http://fanart.tv/api/download.php%3F
type%3Ddownload%26image%3D102221%26section%3D2'...
Thread-13: Got metadata for URL 'http://images.urbanoutfitters.com/is/image/Urba
nOutfitters/28556017_000_b%3F%24zoom%24' from cache
Thread-14: Downloading file header for URL 'http://fanart.tv/api/download.php%3F
type%3Ddownload%26image%3D106896%26section%3D2'...
Traceback (most recent call last):
  File "C:\Python33\lib\site-packages\cx_Freeze\initscripts\Console3.py", line 2
7, in <module>
  File "sacad.py", line 1020, in <module>
  File "sacad.py", line 925, in main
  File "sacad.py", line 536, in search
  File "C:\Python33\lib\concurrent\futures\thread.py", line 54, in run
  File "sacad.py", line 171, in updateImageMetadata
  File "C:\Python33\lib\site-packages\requests\api.py", line 55, in get
  File "C:\Python33\lib\site-packages\requests\api.py", line 44, in request
  File "C:\Python33\lib\site-packages\requests\sessions.py", line 349, in reques
t
  File "C:\Python33\lib\site-packages\requests\sessions.py", line 287, in prepar
e_request
  File "C:\Python33\lib\site-packages\requests\models.py", line 287, in prepare
  File "C:\Python33\lib\site-packages\requests\models.py", line 345, in prepare_
url
LookupError: unknown encoding: idna
Thread-10: Unable to get file metadata for URL 'http://fanart.tv/api/download.ph
p%3Ftype%3Ddownload%26image%3D44177%26section%3D2', falling back to API data
Thread-11: Unable to get file metadata for URL 'http://fanart.tv/api/download.ph
p%3Ftype%3Ddownload%26image%3D23802%26section%3D2', falling back to API data

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #14
sacad "Christoph Prégardien Michael Gees" "Schubert Die schöne Müllerin" 1500 cover2.jpg -v debug



C:\Users\Vincent\Downloads\sacad>sacad "Christoph Pr?gardien Michael Gees" "Schu
bert Die sch÷ne M?llerin" 1500 cover2.jpg -v debug
...

I think there is a problem with the way you pass the command. It the first line of the quote above, the characters are correctly encoded, however in what you pasted above, they seems to be all messed up, which can indicate that the script file in which the command is read is badly encoded.
Can you please try to type the command directly in a command prompt, to see if the problem is gone?
You should also add "-t 70" or lower the target resolution as I explained previously, otherwise you would get no results for this particular query.
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #15
I have encountered just a couple problems.  Should I just post them as I encounter them?

Yes, please do.
I have tested it for my own use on Linux with my library, but I need testers for other OS and contexts.

This is a query I tried that resulted in an error.  It worked when I used a size of 500 but failed with a size of 1000, as shown below.
...

I can not reproduce this problem.
Did you try with the last version I posted above?
If not, please do and let me know if you still have this error.
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

  • Roseval
  • [*][*][*][*][*]
SACAD, a command line cover downloader
Reply #16
I use a BAT file edoted with Notepad

If I paste in CMD


C:\Users\Vincent\Downloads\sacad>sacad "Christoph Prégardien Michael Gees" "Schu
bert Die schöne Müllerin" 1500 cover2.jpg -v debug
MainThread: optipng could not be found, PNG crunching will be disabled
MainThread: jpegoptim could not be found, JPEG crunching will be disabled
MainThread: 0 obsolete entries have been removed from cache 'cover_source_api_da
ta'
MainThread: Cache 'cover_source_api_data' contains 21 entries
MainThread: Total size of file 'c:\users\vincent\appdata\local\temp\sacad-cache.
sqlite': 847KB
MainThread: Searching with source 'LastFmCoverSource'...
MainThread: Querying URL 'http://ws.audioscrobbler.com/2.0/?method=album.getinfo
&api_key=2410a53db5c7490d0f50c100a020f359&album=schubert+die+sch%C3%B6ne+m%C3%BC
llerin&artist=christoph+pr%C3%A9gardien+michael+gees'...
MainThread: Search with source 'LastFmCoverSource' failed: 400 Client Error: Bad
Request
MainThread: Searching with source 'CoverParadiseCoverSource'...
MainThread: Querying URL 'http://ecover.to/?Module=ExtendedSearch&SearchString=c
hristoph+pr%C3%A9gardien+michael+gees+schubert+die+sch%C3%B6ne+m%C3%BCllerin'...

MainThread: Got 0 relevant (0 excluded) results from source 'CoverParadiseCoverS
ource'
MainThread: Searching with source 'AmazonCoverSource'...
MainThread: Got data for URL 'http://www.amazon.com/gp/search?search-alias=popul
ar&field-artist=christoph+pregardien+michael+gees&field-title=schubert+die+schon
e+mullerin&sort=relevancerank' from cache
MainThread: Got data for URL 'http://www.amazon.com/Schubert-schone-Mullerin-Fra
nz-Vienna/dp/B0012IM8K4/ref=sr_1_1/186-3146855-1574555?s=music&ie=UTF8&sr=1-1' f
rom cache
WebCacheThread: 0 obsolete entries have been removed from cache 'cover_image_dat
a'
WebCacheThread: 0 obsolete entries have been removed from cache 'cover_metadata'

WebCacheThread: Cache 'cover_image_data' contains 5 entries
WebCacheThread: Cache 'cover_metadata' contains 4 entries
WebCacheThread: Total size of file 'c:\users\vincent\appdata\local\temp\Console3
-cache.sqlite': 1.33MB
Thread-1: Got metadata for URL 'http://ecx.images-amazon.com/images/I/41U4mCZAOK
L.jpg' from cache
MainThread: Got 0 relevant (1 excluded) results from source 'AmazonCoverSource'
MainThread: Searching with source 'GoogleImagesWebScrapeCoverSource'...
MainThread: Querying URL 'http://www.google.com/images?gbv=2&q=%22christoph+pr%C
3%A9gardien+michael+gees%22+%22schubert+die+sch%C3%B6ne+m%C3%BCllerin%22+front+c
over&tbs=isz%3Al'...
MainThread: Got 4 relevant (2 excluded) results from source 'GoogleImagesWebScra
peCoverSource'
MainThread:    - (01) JPEG 1710x1536 http://webapp.new-art.nl/content/files/060
8917232424-cover.jpg
MainThread:    - (02) JPEG 2128x1416 http://webapp.new-art.nl/content/files/MG_
Photo_Neu.jpg
MainThread:    - (03) JPEG 1711x1473 http://webapp.new-art.nl/content/files/060
8917251227-cover.jpg
MainThread:    - (05) JPEG 1701x2268 http://webapp.new-art.nl/content/img/galle
ry/1321797165-.jpg
MainThread: No reference result found
MainThread: Cover is from a potentially unreliable source and may be unrelated t
o the search
MainThread: Downloading cover 'http://webapp.new-art.nl/content/files/0608917232
424-cover.jpg'...

C:\Users\Vincent\Downloads\sacad>
C:\Users\Vincent\Downloads\sacad>
TheWellTemperedComputer.com

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #17
I use a BAT file edoted with Notepad

If I paste in CMD


C:\Users\Vincent\Downloads\sacad>sacad "Christoph Prégardien Michael Gees" "Schu
bert Die schöne Müllerin" 1500 cover2.jpg -v debug
...

So you get a result when typing the command manually, and none when running the same command from a bat file, am I right?
In that case, I suggest you try using Notepad++ or something similar, and ensure the bat file is using UTF-8 character encoding.
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

SACAD, a command line cover downloader
Reply #18
I have encountered just a couple problems.  Should I just post them as I encounter them?

Yes, please do.
I have tested it for my own use on Linux with my library, but I need testers for other OS and contexts.

This is a query I tried that resulted in an error.  It worked when I used a size of 500 but failed with a size of 1000, as shown below.
...

I can not reproduce this problem.
Did you try with the last version I posted above?
If not, please do and let me know if you still have this error.


Yes, I encountered the problem with the latest version you posted.

Also, I'm not sure if this is intended for the script, but there was one cover where if I specified a size of 600 or 800 it would return a cover that was 700x700.  If I tried a value further of 400 or 900, it would resize to those values.  Does this seem correct?

I did not specify '-t' in any case.  Is there a tolerance that the script uses by default, or if you don't specify a '-t,' should it return a cover with the exact size you indicate?
  • Last Edit: 20 April, 2014, 05:02:05 PM by fluzzknock

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #19
Yes, I encountered the problem with the latest version you posted.

That's strange. From what I have found by googling the error, it can be a Python module (encodings.idna) that is not being included in the Windows build, however I checked in the last version I posted and it is definitely here.
I also tried the command you posted and it works on my Windows XP VM.
Does it always occur for that command or is it random?

Also, I'm not sure if this is intended for the script, but there was one cover where if I specified a size of 600 or 800 it would return a cover that was 700x700.  If I tried a value further of 400 or 900, it would resize to those values.  Does this seem correct?

I did not specify '-t' in any case.  Is there a tolerance that the script uses by default, or if you don't specify a '-t,' should it return a cover with the exact size you indicate?

The default size tolerance value (-t parameter) is 25%. If you want a file with the exact size you specified, you need to pass "-t 0".
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

SACAD, a command line cover downloader
Reply #20
Yes, I encountered the problem with the latest version you posted.

That's strange. From what I have found by googling the error, it can be a Python module (encodings.idna) that is not being included in the Windows build, however I checked in the last version I posted and it is definitely here.
I also tried the command you posted and it works on my Windows XP VM.
Does it always occur for that command or is it random?

Also, I'm not sure if this is intended for the script, but there was one cover where if I specified a size of 600 or 800 it would return a cover that was 700x700.  If I tried a value further of 400 or 900, it would resize to those values.  Does this seem correct?

I did not specify '-t' in any case.  Is there a tolerance that the script uses by default, or if you don't specify a '-t,' should it return a cover with the exact size you indicate?

The default size tolerance value (-t parameter) is 25%. If you want a file with the exact size you specified, you need to pass "-t 0".


Hi, I figured out the problem has something to do with jpegoptim.  When I deleted jpegoptim from the path, the same command now worked.  When I added it back, I got the error again.

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #21
I have uploaded a new version which fixes the ecover.to cover source (mainly affects search for high resolution covers, ie. > 1000px wide).

Windows download here
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #22
I have uploaded a new version which fixes the ecover.to cover source (again) for some searches.

Windows download here (from now on, this link will always point to the latest Windows version).
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/

  • Fux
  • [*]
SACAD, a command line cover downloader
Reply #23
Hello,
thanks for this great downloader. Unfortunately i get since a few weeks the following errormessage for the LastFM source:

Code: [Select]
Search with source 'LastFmCoverSource' failed: 400 Client Error: Bad Request


I am using the latest revision 1.2.5 from yesterday. May this be a problem with the ID?

Regards
Fux
  • Last Edit: 02 March, 2015, 03:52:35 PM by Fux

  • dutch109
  • [*][*][*]
SACAD, a command line cover downloader
Reply #24
Hello,
thanks for this great downloader. Unfortunately i get since a few weeks the following errormessage for the LastFM source:

Code: [Select]
Search with source 'LastFmCoverSource' failed: 400 Client Error: Bad Request


I am using the latest revision 1.2.5 from yesterday. May this be a problem with the ID?

Regards
Fux

Hi,

This is the generic error LastFM returns when an artist and/or album is not found.

Unless you get this error for every search, there is nothing to worry about
Vorbis -q2/5 (Android/PC) & WavPack -hhx6m
https://playnoise.com/