Win Getting DBID / List albums by certain artist?
#1
Hi all,

First time poster, long(ish) xml-hacker here.
(Not at my kodi-hacking station, so examples are very pseudo - sorry)

Can you enlighten me about the DBID? - Or more specifically getting the album artist DBID from an album listing?

I want to make a list of albums by a certain album-artist to show in album view as a second listing. I don't think this is asking too much of a music database engine? It has however proved to be beyond my hacking-skills. But seeing that we can get the album artist name, the DBID just has to be right around the corner? I have it all pretty much working nicely, except for getting the album artist DBID number.

With the album-artist DBID I could use "music://artists/DBID" as contents to fill the artist specific list of albums.
My music "skin" is setup using albums in a dynamic content contatiner that has target="music", works nicely and I can get the album.DBID and artist name and other text-extractions, but the Artist.DBID is simply not there?. Shows albums, songs and what not in a single view.

Thanks, and sorry if I am being unclear, I am not that deep in the terminology - yet Smile
Reply
#2
No one?

Unless you think I am being impatient, then please ell me the cause:
1. My english is really bad and you don't understand what I ask.
2. Getting the DBID is not - as I assumed - a simple task.
3. I got it all/something else wrong.. please clarify.

Else I will just assume that no one knows anything about DBID Smile
Reply
#3
you're impatient :-)

you can't get the artist dbid from an album listing.
it's only possible to get the artist dbid from an artist listing.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#4
Thanks ronie :o)

I must say I am surprised - and kind of disappointed - that we cannot get the artist DBID?

Why is it like that?

I am sure there is a good reason for this, and what I assume is wrong: The name of the artist we get from the album $info originates from the artist database entry which can only mean that the DBID of the artist is well known to the album entry?

I am sorry if this has been covered a gazillion times in the past, but googol return little on the subject.
Reply
#5
i'm not an database expert, but if you check the album table in the musicdb you'll see the artistid is not stored there, the artist name is.
so no, i don't think the artist id is known to the album entry. it would likely require an additional database lookup to fetch the artist id.

again, i'm not knowledgeable in that area, it's just my best guess.

regardless of that, the main reason is probably that nobody has ever written the code needed to expose the artist dbid to skins on an album level.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
Wink 
Oh, I see. Thanks for clearing that up ronie! ..You are probably right in that extra lookup.

So... Who will be the gentleman and make the lookup of the artist DBID given an artist name possible? =D

Or alternatively ofcourse: How do you lookup the albums by an artist knowing only the artist name?

Aaaand if I may be so free.. In my humble an unexperienced not-important opinion: What an odd design choice that I fail completely to understand?!

One thing is that If the album artist, or whatever missspelled version of it - is the real "key" there is just bound to be loads of erroneous entries as I am sure there are several bands out there - through history - sharing the same name!?

Another thing is that the whole "music://album/DBID" path-thingy seem to require the DBID and not the Artist name to function.

I surely cannot be the first to want to list albums by artist this way?
Reply
#7
(Seems my last posting from cell missfired)

Anyone? Dbid from actorname?

If I have to code it myself would you consider it an easy task and give some pointers, thanks :-)
Reply
#8
Thanks for the help everyone. This forum is amazing!
See the link below for the solution, or keep ignore me.. whatever.

http://forum.kodi.tv/showthread.php?tid=242487
Reply
#9
(2015-09-28, 12:19)Torben Wrote: I want to make a list of albums by a certain album-artist

Simply Use "ListItem.DBID" In the Artist listing to show the Related Albums via "dinamic Content" there.


Why you can't do this in Album Listnings (/Album View)? -> Albums got there own DBID which isnt directly related to the Artist in aniway.

Hope this Helps

Regards.
Reply
#10
Hi Rantanplan-1, thanks for you reply.

I am not sure I follow? I am sure you aren't saying I can "musicdb://artists/Album_DBID/ to get a list of albums by the artists on that album?

My (achieved) goal was to go directly from the album selected in an album view, to a discography of the album artist. I achieved it using the path "musicdb://artists/Artist_dbid/". I could not however pull this Artist_dbid out of the information passed to the album list, so I rolled a script that did the lookup in the artists table based on the album artist name.

If there is a smarter way of doing it, I'd like to know very much! Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Getting DBID / List albums by certain artist?0