PDA

View Full Version : Getting Album artist via CLI



jkish
2009-04-15, 20:31
If I want to get the artist for an album and I have the album id, what is the best way to get the artist for that album (and other info like year, etc).

I could use the albums command with the right tags, but that seems very wasteful in terms of the amount of data that would be sent from the server for large collections when I just want the info for one album.

I could use songinfo and restrict to an album id and get the artist, year, etc there from one of the songs.

What else?

pippin
2009-04-15, 22:01
If I want to get the artist for an album and I have the album id, what is the best way to get the artist for that album (and other info like year, etc).

I could use the albums command with the right tags, but that seems very wasteful in terms of the amount of data that would be sent from the server for large collections when I just want the info for one album.

I could use songinfo and restrict to an album id and get the artist, year, etc there from one of the songs.

What else?
albums album_id:xxx
Doesn't that work?

jkish
2009-04-16, 04:16
albums album_id:xxx
Doesn't that work?

It would be great if it did - I didn't try since the doc doesn't show it as a possibility. I'll try it and see. Thanks.

jkish
2009-04-16, 17:59
albums album_id:xxx
Doesn't that work?

No dice on that - it seems to ignore the album_id setting.

Any more ideas?

How does iPeng handle that?

pippin
2009-04-16, 22:56
No dice on that - it seems to ignore the album_id setting.

Any more ideas?

How does iPeng handle that?

iPeng caches a table with album data for all albums so that's an internal lookup and I never just request that information for a single album.
So I was indeed guessing, sounded too logical that it should be there.

mherger
2009-04-16, 23:59
>> albums album_id:xxx
>
> No dice on that - it seems to ignore the album_id setting.

make this:

albums 0 1 album_id:xyz

albums et al. expect you to say how many items from which starting point
you want. The above will give you starting from the first (index 0) 1
album.

Michael

jkish
2009-04-17, 05:06
>> albums album_id:xxx
>
> No dice on that - it seems to ignore the album_id setting.

make this:

albums 0 1 album_id:xyz

albums et al. expect you to say how many items from which starting point
you want. The above will give you starting from the first (index 0) 1
album.

Michael

Yes, I tried it that way. Actually, the real command I sent was:

albums 0 1 album_id:xyz tags:lajy

It always returns the first album in the album list no matter what the value of xyz is set to.

jkish
2009-04-17, 07:41
iPeng caches a table with album data for all albums so that's an internal lookup and I never just request that information for a single album.
So I was indeed guessing, sounded too logical that it should be there.

I tried that originally, but when I added 'a' to the tags on the albums command, the request started taking a huge amount of time. I was attempting to get all of the info for 250 albums at a time so maybe that is just too much data or something.

pippin
2009-04-17, 08:18
I tried that originally, but when I added 'a' to the tags on the albums command, the request started taking a huge amount of time. I was attempting to get all of the info for 250 albums at a time so maybe that is just too much data or something.

No. SC is known to be slow on delivering albums with artist data. Hopefully New Schema in 7.4 will help with that.
I read chunks of 300 albums with quite a lot of data (ljywags) so from that POV it should be fine. Don't know about CLI performance, though.
I know 24.000 albums need 6 minutes on a fast system but through a remote connection. No idea whether iPhone slows things down due to own processing, though but I didn't have the impression that it does (simulator did take similar time).

jkish
2009-04-17, 08:45
No. SC is known to be slow on delivering albums with artist data. Hopefully New Schema in 7.4 will help with that.
I read chunks of 300 albums with quite a lot of data (ljywags) so from that POV it should be fine. Don't know about CLI performance, though.
I know 24.000 albums need 6 minutes on a fast system but through a remote connection. No idea whether iPhone slows things down due to own processing, though but I didn't have the impression that it does (simulator did take similar time).

Do you have a rough guess on how long the 300 album fetch takes?

I had a timeout set a 10 seconds and was hitting that when I was getting artist info with the albums command.

pippin
2009-04-17, 08:57
Do you have a rough guess on how long the 300 album fetch takes?

I had a timeout set a 10 seconds and was hitting that when I was getting artist info with the albums command.

Depends entirely on the server. But can easily take longer than 10s, indeed. My impression is there's quite a bit of overhead involved, hence the large chunks.

jkish
2009-04-17, 10:55
Depends entirely on the server. But can easily take longer than 10s, indeed. My impression is there's quite a bit of overhead involved, hence the large chunks.

Sounds like I may have to load the whole list up in (small) pieces in the background in order to get the performance I need.

Locuth
2009-04-18, 06:45
Hi there

Have you considered querying 'the other way around'
artists 0 100 album_id:xyz

which of course is only usefull, if you need a single album's information rather than all album's.

Also, the artist for an album is not unique, is it?
The CLI manual states (depends on server configuration)

jkish
2009-04-20, 07:03
Hi there

Have you considered querying 'the other way around'
artists 0 100 album_id:xyz

which of course is only usefull, if you need a single album's information rather than all album's.

Also, the artist for an album is not unique, is it?
The CLI manual states (depends on server configuration)

Thought about that, but I need more info than just artist and I can't get some of the other info in the same way such as artwork track id etc. I ended up just using the albums command in small sizes in the background to build up the list I needed. That seems to work.