jajuk-team / jajuk

Advanded jukebox for users with large or scattered music collections
48 stars 19 forks source link

Jajuk doesn't retrieve cover art - but cover art is out there! #1997

Closed bdabda55 closed 8 years ago

bdabda55 commented 8 years ago

Hi, I like Jajuk a lot and want to use it more but for some reason the "retrieve cover art" function is not working for me.

I click right and select "Select a cover". Only the Jajuk splash screen is displayed on the cover selection pane no matter what search option I select. It's like Jajuk is finding nothing.

Then I go to debug and look at the trace. See the one pasted below, which is for the album "Duffy Rockferry". If I pick up the google part of the query and paste it in a browser, lo and behold there are indeed images out there in Google for this album (try it!).

The photobucket request fails (there are no suitable images), but since Google returns good art shouldn't Jajuk just take that?

I have tested this on several albums always with the same behavior.

I thought I had a firewall issue so I made sure that Jajuk is listed as an exception in my windows firewall (I'm running XP). I do not have a proxy or anything else which should impede Jajuk access to the internet.

My version of Jajuk is 1.10.7.

Any ideas of what to check next?

Thanks. Bruce.

[DEBUG] Query={{Rockferry }} [DEBUG] Search URL: {{http://images.google.com/images?q=Rockferry+&ie=ISO-8859-1&hl=en&btnG=Google+Search&tbs=isz:l}} [DEBUG] Opening Connection With: {{http://images.google.com/images?q=Rockferry+&ie=ISO-8859-1&hl=en&btnG=Google+Search&tbs=isz:l}} [DEBUG] Found Cover: {{http://s156.photobucket.com/user/anikamiranti/media/duffy-rockferry.jpg}} [DEBUG] Local cover list: {{[Type=REMOTE_COVER URL={{http://s156.photobucket.com/user/anikamiranti/media/duffy-rockferry.jpg}}]}} [DEBUG] Display cover: Type=REMOTE_COVER URL={{http://s156.photobucket.com/user/anikamiranti/media/duffy-rockferry.jpg}} at index :0 [DEBUG] Opening Connection With: {{http://s156.photobucket.com/user/anikamiranti/media/duffy-rockferry.jpg}} [WARN] Cover image not found at URL: http://s156.photobucket.com/user/anikamiranti/media/duffy-rockferry.jpg [DEBUG] Removed cover: {{Type=REMOTE_COVER URL={{http://s156.photobucket.com/user/anikamiranti/media/duffy-rockferry.jpg}}}} [DEBUG] Display cover: Type=NO_COVER URL={{jar:file:/C:/Program%20Files/Jajuk/bin/jajuk.jar!/images/included/jajuk-splashscreen.jpg}} at index :0

bflorat commented 8 years ago

I can reproduce this against any album. Maybe Google changed the URLs format. We'll check this ASAP.

gkerdal commented 8 years ago

Hi, I can reproduce it too. @bflorat : the content of the google web page doesn't use a url of the image but data of the image in a base64 format. A browser is able to show it but it requires for jajuk to be adapted.

gkerdal commented 8 years ago

Hi, I found that "Google Image Search API" is deprecated : https://developers.google.com/image-search/v1/jsondevguide

I tried a piece of code from the jsondevguide which requires a few classes from org.json projet (open source), it works on my machine (java 1.7). Cheers.

bflorat commented 8 years ago

OK, fine.

What's strange is that covers unit test still pass : http://integration.jajuk.info/jenkins/job/maintenance/2035/testReport/org.jajuk.services.covers/TestCover/

If you need to add new library, make sure to follow the "new library" procedure at http://www.jajuk.info/integration_procedures.html

gkerdal commented 8 years ago

Hi Bertrand, the Junit Cover test passes because the code which fails is in another class : DownloadManager.getRemoteCoversList.

I prepare a junit test for this method in a new class.

Thanks for the procedure, I get the jar from this place : http://mvnrepository.com/artifact/org.json/json I took the previous version of json to keep java 1.6 compatiblity.

I'll commit very soon.

Cheers,

2015-11-28 11:16 GMT+01:00 Bertrand Florat notifications@github.com:

OK, fine.

What's strange is that covers unit test still pass : http://integration.jajuk.info/jenkins/job/maintenance/2035/testReport/org.jajuk.services.covers/TestCover/

If you need to add new library, make sure to follow the "new library" procedure at http://www.jajuk.info/integration_procedures.html

— Reply to this email directly or view it on GitHub https://github.com/jajuk-team/jajuk/issues/1997#issuecomment-160271330.

bflorat commented 8 years ago

@gkerdal : Thanks for the commit. I tried it but I get this json response in getRemoteCoversList() method : "{"responseData": null, "responseDetails": "This API is no longer available.", "responseStatus": 403}", is it me ?

gkerdal commented 8 years ago

I realized this today too !! The api is deprecated, thanks google ! Google provides a solution but it doesn't fit Jajuk needs :

http://stackoverflow.com/questions/34035422/google-image-search-says-api-no-longer-available

There's a limit of 100 search a day for a search engine. Another solution provided is to use Jsoup. Have you ever heard of this api ?

I'll have a look.

Cheers

2015-12-13 22:02 GMT+01:00 Bertrand Florat notifications@github.com:

Thanks for the commit. I tried it but I get this json response in getRemoteCoversList() method : "{"responseData": null, "responseDetails": "This API is no longer available.", "responseStatus": 403}", is it me ?

— Reply to this email directly or view it on GitHub https://github.com/jajuk-team/jajuk/issues/1997#issuecomment-164298268.

bflorat commented 8 years ago

No, I don't know JSoup. But why not simply fix the current code (parsing HTML results) ?

gkerdal commented 8 years ago

The google html page uses javascript to show the url / images, so it's really difficult (I don't say impossible but I fear it is) without a javascript engine. I'll have a look again anyway.

Cheers.

2015-12-21 23:22 GMT+01:00 Bertrand Florat notifications@github.com:

No, I don't know JSoup. But why not simply fix the current code (parsing HTML results) ?

— Reply to this email directly or view it on GitHub https://github.com/jajuk-team/jajuk/issues/1997#issuecomment-166439970.

gkerdal commented 8 years ago

I pushed a bugfix without any additional API, let me know if this is ok ?

If it is ok I can get rid of Json API which is not used any more.

Cheers.

bflorat commented 8 years ago

It works great ! I think you can close this ticket. I guess I'll have to release an official release soon as this fix is very important.

bflorat commented 8 years ago

Fixed by gkerdal