GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
This PR add the following ListItems:
ListItem.DBType <- provides the Database Type for video(availible types - movie, tvshow, episode, musicvideo, set, season)
ListItem.DBID <- provides Database ID of the current selected Audio/Video Library level
It might be better to remove the ListItem.ArtistID/AlbumID and add the ListItems.Properties(artist_id/album_id) from PR #963
For the music artist ID/album ID you need to add SetDatabaseId() in the MusicDatabase::GetArtistsByWhere, GetAlbumsByWhere - I have them in my tree already due to my work on music thumbs, but feel free to add them in here if that's what the problem is.
Not sure how to best handle the other properties (artistid/albumid) - I presume they're useful on songs and albums (artistid) primarily? Also, technically speaking the artistid is not unique for a song or an album, though ofcourse albumID is unique for a song.
@jmarshallnz - not sure which branch of yours to look in for the code you think might fix the problem.
Heh - I hadn't pushed. Turns out that I don't have such a commit.
For albums, I think you need to set it in CMusicInfoTag::SetAlbum() (the one that takes a CAlbum).
Artists should already be OK by the looks (it's set in GetArtistsByWhere at least?)
@jmarshallnz - I have tried(and failed) to have the Artist's ID and Album's ID(using ListItem) set when accessing them thru the their Info screens(ie, DialogAlbumInfo.xml) So I've put back ListItem.Property(Album_ID) and ListItem.Property(Artist_ID). These ID's properly match the ID's in the Database albumview. I'm not sure if I can do a better job.
Have you tried setting the id in CGUIDialogMusicInfo::SetAlbum/SetArtist - by the looks there is no id there (and no retrieval of that info from the db). You should have the id in the CAlbum and CArtist passed in.
And please unify to ListItem.DbId - no need for a difference between music and video for this.
By using the following in CGUIDialogMusicInfo::SetAlbum
and in CGUIDialogMusicInfo::SetArtist
ListItem.DBID reports the ID's for the Artist, Album and Song when on the matching Music Info screen. I'll rebase after I do one final compile(I wish I had a multi-core processor on my XBMC Machine... )
Provide Database ID's for Audio and Video Files to skins via ListItem…
Ok squashed and rebased against master... I hope this turns out to be the proper way. It works properly.
Looks good - nice work :)
Merge pull request #1017 from Giftie/skin_dbid
Provide skins access to the Database/Library ID's for Audio/Video
@jmarshallnz - Thanks for the assist.. I really need to learn C++...
thank you @Giftie :D