PDA

View Full Version : How to get a random cover art jpg?



st2000
2007-06-30, 06:51
Hi...

I am a little confused. I would like to get cover art from slimserver
based on the ID. But the connection between the ID I get back from the
CLI and the ID to be used with the http request is not clear. Actually
they look like two different values. Am I not understanding something here?

....thanks

st2000
2007-06-30, 07:33
stuart wrote:
> Hi...
>
> I am a little confused. I would like to get cover art from slimserver
> based on the ID. But the connection between the ID I get back from the
> CLI and the ID to be used with the http request is not clear. Actually
> they look like two different values. Am I not understanding something here?
>
> ...thanks
>

Let me be more specific. If I send this command to the CLI:
albums 12 6

I get back this:
albums 12 6 count%3A123 id%3A100 album%3AThe%20Best%20Of%201990-2000
id%3A114 album%3AThe%20Best%20Of%20Movie%20Hits%20Vol%201 id%3A116
album%3AThe%20Best%20Of%20Movie%20Hits%20Vol%202 id%3A115
album%3AThe%20Best%20Of%20Movie%20Hits%20Vol%203 id%3A51
album%3ABest%20of%20Narada%20New%20Age%20Disc%202 id%3A52
album%3ABest%20of%20Narada%20New%20Age%20Disk%201

So let's say I want the album cover for the first album above. I try
this http command:
http://192.168.0.201:9000/music/100/cover.jpg

But all I get back is the default slimserver image. I assume this
indicates there is no image. But if I play this album and pull the
current album using:
http://192.168.0.201:9000/music/current/cover.jpg

I get back the image of the correct album cover. So it does work! To
some extent... Anyone know what type of pilot error has occurred in the
above exorcise?

....thanks

st2000
2007-06-30, 07:49
stuart wrote:
>
> stuart wrote:
>> Hi...
>>
>> I am a little confused. I would like to get cover art from slimserver
>> based on the ID. But the connection between the ID I get back from the
>> CLI and the ID to be used with the http request is not clear. Actually
>> they look like two different values. Am I not understanding something here?
>>
>> ...thanks
>>
>
> Let me be more specific. If I send this command to the CLI:
> albums 12 6
>
> I get back this:
> albums 12 6 count%3A123 id%3A100 album%3AThe%20Best%20Of%201990-2000
> id%3A114 album%3AThe%20Best%20Of%20Movie%20Hits%20Vol%201 id%3A116
> album%3AThe%20Best%20Of%20Movie%20Hits%20Vol%202 id%3A115
> album%3AThe%20Best%20Of%20Movie%20Hits%20Vol%203 id%3A51
> album%3ABest%20of%20Narada%20New%20Age%20Disc%202 id%3A52
> album%3ABest%20of%20Narada%20New%20Age%20Disk%201
>
> So let's say I want the album cover for the first album above. I try
> this http command:
> http://192.168.0.201:9000/music/100/cover.jpg
>
> But all I get back is the default slimserver image. I assume this
> indicates there is no image. But if I play this album and pull the
> current album using:
> http://192.168.0.201:9000/music/current/cover.jpg
>
> I get back the image of the correct album cover. So it does work! To
> some extent... Anyone know what type of pilot error has occurred in the
> above exorcise?
>
> ...thanks

Ok, I get it - I was using the album ID and to get the art work I need
to use the TRACK_ID.

So, what I really want is a way to get the 1st TRACK_IDs (actually any
one TRACK_ID from each album) for a given set of albums. So, if I
wanted the album art work from the first 6 albums, I could use:

album 0 6

....to get a list of the 6 albums.

Then, er..., well, then what? I guess I could search for tracks on each
album.

There must be a better way... hints anyone?

st2000
2007-06-30, 08:12
stuart wrote:
>
> stuart wrote:
>> stuart wrote:
>>> Hi...
>>>
>>> I am a little confused. I would like to get cover art from slimserver
>>> based on the ID. But the connection between the ID I get back from the
>>> CLI and the ID to be used with the http request is not clear. Actually
>>> they look like two different values. Am I not understanding something here?
>>>
>>> ...thanks
>>>
>> Let me be more specific. If I send this command to the CLI:
>> albums 12 6
>>
>> I get back this:
>> albums 12 6 count%3A123 id%3A100 album%3AThe%20Best%20Of%201990-2000
>> id%3A114 album%3AThe%20Best%20Of%20Movie%20Hits%20Vol%201 id%3A116
>> album%3AThe%20Best%20Of%20Movie%20Hits%20Vol%202 id%3A115
>> album%3AThe%20Best%20Of%20Movie%20Hits%20Vol%203 id%3A51
>> album%3ABest%20of%20Narada%20New%20Age%20Disc%202 id%3A52
>> album%3ABest%20of%20Narada%20New%20Age%20Disk%201
>>
>> So let's say I want the album cover for the first album above. I try
>> this http command:
>> http://192.168.0.201:9000/music/100/cover.jpg
>>
>> But all I get back is the default slimserver image. I assume this
>> indicates there is no image. But if I play this album and pull the
>> current album using:
>> http://192.168.0.201:9000/music/current/cover.jpg
>>
>> I get back the image of the correct album cover. So it does work! To
>> some extent... Anyone know what type of pilot error has occurred in the
>> above exorcise?
>>
>> ...thanks
>
> Ok, I get it - I was using the album ID and to get the art work I need
> to use the TRACK_ID.
>
> So, what I really want is a way to get the 1st TRACK_IDs (actually any
> one TRACK_ID from each album) for a given set of albums. So, if I
> wanted the album art work from the first 6 albums, I could use:
>
> album 0 6
>
> ...to get a list of the 6 albums.
>
> Then, er..., well, then what? I guess I could search for tracks on each
> album.
>
> There must be a better way... hints anyone?
>

I guess I should just wait to post until I am done. I think this is the
way to go about it. If anyone has a better way please follow up:

Use:
albums 0 6
....to get a given list of albums, the first 6 in this case. From that
list use the album id like this:
titles 0 1 album_id:<album id>
....to get the 1st track from that album. Now you have the the track id.
Now you can do:
http://<server's ip addr>:9000/music/<track's id>/cover.jpg
....do this for each of the 6 album id's you have.
....QED

mherger
2007-06-30, 08:14
> So, what I really want is a way to get the 1st TRACK_IDs (actually any
> one TRACK_ID from each album) for a given set of albums. So, if I
> wanted the album art work from the first 6 albums, I could use:

In SlimServer 7 this will be available through the J parameter
(artwork_track_id).

Michael