Cover search | Locale: Germany

Locked
Maier540

Cover search | Locale: Germany

Post by Maier540 » Mon Nov 21, 2005 2:02 pm

Hi wbartels,

is there an opportunity to get the internet image update via advanced search from http://www.slothradio.com/covers/index.php?adv=1 ??
I`ve got a lot of German Punk-Music. There are german Covers on slothradio. But there are not listed via netjukebox image updaet at the web-interface.

do you have any script to search in advanced and normal cover search !

User avatar
wbartels
netjukebox developer
Posts: 792
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Cover search | Locale: Germany

Post by wbartels » Mon Nov 21, 2005 4:40 pm

Maier540 wrote:do you have any script to search in advanced and normal cover search !
Not, yet.
I will try to add this feature to the next netjukebox version.
Can you give me some search examples that will only be found in advanced search?

In the meantime you can change update.php with this to get your German Punk-Music covers:

Old code:

Code: Select all

$matches = '';
$content = file_get_contents('http://www.slothradio.com/covers/?artist=' . rawurlencode($artist_strip) . '&album=' . rawurlencode($album_strip)); 
preg_match_all('/<!-- RESULT ITEM START -->.*?<img src="(http:\/\/images\.amazon.*?)"/s', $content, $matches);
New code:

Code: Select all

$matches = '';
$content = file_get_contents('http://www.slothradio.com/covers/?adv=1&genre=p&imgsize=x&locale=de&sort=%2Bsalesrank&artist=' . rawurlencode($artist_strip) . '&album=' . rawurlencode($album_strip)); 
preg_match_all('/<!-- RESULT ITEM START -->.*?<img src="(http:\/\/images\.amazon.*?)"/s', $content, $matches);

Maier540

Post by Maier540 » Mon Nov 21, 2005 5:59 pm

hi bartel, ;-)

thanks very much for the code. I will try to get my german covers.
Your interface is amazing !

a few a examples are:
Rantanplan
Wizo
Boehse Onkelz
Kassierer
Hans Soellner


the multi-language feature would be nice for the next version ;-)

thanks for all

greetings from munich




:lol:

Maier540

Post by Maier540 » Tue Nov 22, 2005 5:04 pm

Hi wbartels,

something is strange !!

The URL and the parameters seems to work
I`ve tried to put your url part of the code into the browser like this
http://www.slothradio.com/covers/?adv=1 ... Bsalesrank
and there are covers found !!

but not at your interface !?!? :(

can you help me, please !?

greetings

User avatar
wbartels
netjukebox developer
Posts: 792
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels » Tue Nov 22, 2005 5:59 pm

Maier540 wrote:Hi wbartels,

something is strange !!

The URL and the parameters seems to work
I`ve tried to put your url part of the code into the browser like this
http://www.slothradio.com/covers/?adv=1 ... Bsalesrank
and there are covers found !!

but not at your interface !?!? :(

can you help me, please !?

greetings
When setting "locale=de" the images come from another server.
So the code has to be changed a little.
This would do the trick :wink:

Code: Select all

$matches = '';
$content = file_get_contents('http://www.slothradio.com/covers/?artist=' . rawurlencode($artist_strip) . '&album=' . rawurlencode($album_strip)); 
preg_match_all('/<!-- RESULT ITEM START -->.*?<img src="(.*?amazon\.com.*?)"/s', $content, $matches);
This will allow images from:
http://images.amazon.com and http://images-eu.amazon.com

And block images form:
http://images.google.com

Maier540

Post by Maier540 » Tue Nov 22, 2005 6:27 pm

hey...

the right code is:
;-)

Code:
$matches = '';
$content = file_get_contents('http://www.slothradio.com/covers/?adv=1 ... nk&artist=' . rawurlencode($artist_strip) . '&album=' . rawurlencode($album_strip));
preg_match_all('/<!-- RESULT ITEM START -->.*?<img src="(.*?amazon\.com.*?)"/s', $content, $matches);


now it works perfect !!!
thanks a lot

Locked