IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
SACAD, a command line cover downloader, Command line, multi-platform, ideal for batch queries
dutch109
post Apr 13 2014, 15:11
Post #1





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



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
sacad 'artist' 'album' 900 cover.jpg


Installation:


Please report any problem you encounter.


--------------------
Vorbis -q2/5 (Android/PC) & WavPack -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
ozok
post Apr 13 2014, 17:12
Post #2





Group: Members
Posts: 309
Joined: 9-December 12
From: Eskişehir
Member No.: 105075



Hi,

I've tried the following code and got an error.
CODE
>sacad.exe "Queen" "The Game" 900 cover.jpg

Error:
CODE
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.
Go to the top of the page
+Quote Post
dutch109
post Apr 13 2014, 20:23
Post #3





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



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?

This post has been edited by dutch109: Apr 13 2014, 20:27


--------------------
Vorbis -q2/5 (Android/PC) & WavPack -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
ozok
post Apr 13 2014, 20:35
Post #4





Group: Members
Posts: 309
Joined: 9-December 12
From: Eskişehir
Member No.: 105075



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?

This post has been edited by ozok: Apr 13 2014, 20:36
Go to the top of the page
+Quote Post
dutch109
post Apr 14 2014, 21:35
Post #5





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



QUOTE (ozok @ Apr 13 2014, 21:35) *
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 sad.gif


--------------------
Vorbis -q2/5 (Android/PC) & WavPack -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
fluzzknock
post Apr 18 2014, 03:18
Post #6





Group: Members
Posts: 21
Joined: 18-April 14
Member No.: 115570



Currently testing this out on Windows 8.1 64-bit.
Go to the top of the page
+Quote Post
dutch109
post Apr 18 2014, 18:47
Post #7





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



QUOTE (fluzzknock @ Apr 18 2014, 04:18) *
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 -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
Roseval
post Apr 18 2014, 22:15
Post #8





Group: Members
Posts: 496
Joined: 26-March 08
Member No.: 52303



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

This post has been edited by Roseval: Apr 18 2014, 22:16


--------------------
TheWellTemperedComputer.com
Go to the top of the page
+Quote Post
dutch109
post Apr 19 2014, 12:35
Post #9





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



QUOTE (Roseval @ Apr 18 2014, 23:15) *
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.
  1. 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
      -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
      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
      -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
      sacad "Michael Gees" "improviSatie" 1500 cover1.jpg -t 70 -d
  2. It seems to be a bug with accentuated chars, I'll look at this.
    In the meantime, the following command works:
    CODE
    sacad "Christoph Pregardien Michael Gees" "Die schone Mullerin" 1500 cover2.jpg -t 70 -d
  3. By removing the accent and running
    CODE
    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 -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
dutch109
post Apr 19 2014, 13:32
Post #10





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



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 -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
Roseval
post Apr 19 2014, 15:57
Post #11





Group: Members
Posts: 496
Joined: 26-March 08
Member No.: 52303



QUOTE (dutch109 @ Apr 19 2014, 14:32) *
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
Go to the top of the page
+Quote Post
dutch109
post Apr 19 2014, 17:01
Post #12





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



QUOTE (Roseval @ Apr 19 2014, 16:57) *
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 -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
Roseval
post Apr 19 2014, 17:27
Post #13





Group: Members
Posts: 496
Joined: 26-March 08
Member No.: 52303



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
Go to the top of the page
+Quote Post
fluzzknock
post Apr 19 2014, 19:11
Post #14





Group: Members
Posts: 21
Joined: 18-April 14
Member No.: 115570



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
Go to the top of the page
+Quote Post
dutch109
post Apr 19 2014, 21:48
Post #15





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



QUOTE (Roseval @ Apr 19 2014, 18:27) *
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 -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
dutch109
post Apr 19 2014, 21:52
Post #16





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



QUOTE (fluzzknock @ Apr 19 2014, 20:11) *
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. smile.gif

QUOTE (fluzzknock @ Apr 19 2014, 20:11) *
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 -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
Roseval
post Apr 19 2014, 21:55
Post #17





Group: Members
Posts: 496
Joined: 26-March 08
Member No.: 52303



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
Go to the top of the page
+Quote Post
dutch109
post Apr 20 2014, 13:30
Post #18





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



QUOTE (Roseval @ Apr 19 2014, 22:55) *
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 -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
fluzzknock
post Apr 20 2014, 21:58
Post #19





Group: Members
Posts: 21
Joined: 18-April 14
Member No.: 115570



QUOTE (dutch109 @ Apr 19 2014, 16:52) *
QUOTE (fluzzknock @ Apr 19 2014, 20:11) *
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. smile.gif

QUOTE (fluzzknock @ Apr 19 2014, 20:11) *
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?

This post has been edited by fluzzknock: Apr 20 2014, 22:02
Go to the top of the page
+Quote Post
dutch109
post Apr 20 2014, 22:42
Post #20





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



QUOTE (fluzzknock @ Apr 20 2014, 22:58) *
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?

QUOTE (fluzzknock @ Apr 20 2014, 22:58) *
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 -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
fluzzknock
post Apr 21 2014, 03:12
Post #21





Group: Members
Posts: 21
Joined: 18-April 14
Member No.: 115570



QUOTE (dutch109 @ Apr 20 2014, 17:42) *
QUOTE (fluzzknock @ Apr 20 2014, 22:58) *
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?

QUOTE (fluzzknock @ Apr 20 2014, 22:58) *
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.
Go to the top of the page
+Quote Post
dutch109
post Jun 28 2014, 00:11
Post #22





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



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 -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post
dutch109
post Oct 29 2014, 13:22
Post #23





Group: Members
Posts: 125
Joined: 20-June 06
Member No.: 32044



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 -hhx6
http://playnoise.com/
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd December 2014 - 00:02