Kodi Community Forum

Full Version: Is there way to skip album node when clicking artists for music videos.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I have music videos setup. One thing would like is when clicking on artists it will show all music videos for that artist instead of having to click on album first then showing videos on that album.

So was wondering is there way to skip the album node and go straight to titles node.

Thanks for any info
I'm thinking the query

Code:
CGUIMediaWindow::GetDirectory (musicdb://artists/2/?albumartistsonly=false)
CMusicDatabase::GetAlbumsByWhere query: SELECT albumview.* FROM albumview  ....

is hard-coded. Might need an add-on that can use a JSON query to get this.

scott s.
.
video nodes (wiki) (music videos are treated as videos, but have a shortcut in music)
You're right, I was thinking music, but music video works the same, regardless if you go from the music library or video library:

Code:
CGUIMediaWindow::GetDirectory (library://music/musicvideos/artists.xml/)
CGUIMediaWindow::GetDirectory (videodb://musicvideos/artists/55/)
CVideoDatabase::RunQuery took 0 ms for 6 items query: select musicvideo_view.c09, musicvideo_view.idMVideo, actor.name from musicvideo_view JOIN actor_link ON actor_link.media_id=musicvideo_view.idMVideo AND actor_link.media_type='musicvideo' JOIN actor ON actor.actor_id = actor_link.actor_id WHERE actor_link.actor_id = 55 GROUP BY musicvideo_view.c09

The SQL is kind of long but musicvideo_view.c09 is a view grouped by albums. Again I believe that is in the code (specifically, CVideoDatabase::GetMusicVideoAlbumsNav). As in music you have the (optional) * all albums in the list, but I take it OP doesn't want to have to click through that. It could be done in a smart playlist if smart music playlist of type "mixed" had a "group by" artist but it doesn't allow for that (same for songs).

update:

did a little more digging and I'm guessing this is the key code in VideoDatabaseDirectory/DirectoryNodeGrouped.cpp which determines what the "child" node is to the currently viewed node in the library:

Code:
if (params.GetContentType() == VIDEODB_CONTENT_MUSICVIDEOS)
  {
    if (GetType() == NODE_TYPE_ACTOR)
      return NODE_TYPE_MUSICVIDEOS_ALBUM;
    else
      return NODE_TYPE_TITLE_MUSICVIDEOS;
  }

scott s.
.
(2016-03-13, 00:49)scott967 Wrote: [ -> ]You're right, I was thinking music, but music video works the same, regardless if you go from the music library or video library:

Code:
CGUIMediaWindow::GetDirectory (library://music/musicvideos/artists.xml/)
CGUIMediaWindow::GetDirectory (videodb://musicvideos/artists/55/)
CVideoDatabase::RunQuery took 0 ms for 6 items query: select musicvideo_view.c09, musicvideo_view.idMVideo, actor.name from musicvideo_view JOIN actor_link ON actor_link.media_id=musicvideo_view.idMVideo AND actor_link.media_type='musicvideo' JOIN actor ON actor.actor_id = actor_link.actor_id WHERE actor_link.actor_id = 55 GROUP BY musicvideo_view.c09

The SQL is kind of long but musicvideo_view.c09 is a view grouped by albums. Again I believe that is in the code (specifically, CVideoDatabase::GetMusicVideoAlbumsNav). As in music you have the (optional) * all albums in the list, but I take it OP doesn't want to have to click through that. It could be done in a smart playlist if smart music playlist of type "mixed" had a "group by" artist but it doesn't allow for that (same for songs).

update:

did a little more digging and I'm guessing this is the key code in VideoDatabaseDirectory/DirectoryNodeGrouped.cpp which determines what the "child" node is to the currently viewed node in the library:

Code:
if (params.GetContentType() == VIDEODB_CONTENT_MUSICVIDEOS)
  {
    if (GetType() == NODE_TYPE_ACTOR)
      return NODE_TYPE_MUSICVIDEOS_ALBUM;
    else
      return NODE_TYPE_TITLE_MUSICVIDEOS;
  }

scott s.
.

Thanks Scott for looking into it.

So is there anything I can change to skip the album node or is it all hardcoded.

The only workaround for now is I use the file mode when browsing the music videos. They aren't scanned into the library but at least when click on artist folder shows all music videos.

This isn't ideal as its need to access the hard drive all time plus I can't have library info on music videos on homescreen.

Thanks for taking time to look into it. If you find a way round it let me know cheers Smile
Well, instead of using file mode you should by default have an entry when you are in artists view and select an artist, that is "all albums". It can be turned on / off on the settings / video / library -- show "all items" entry. So it takes an extra click but you do get all music videos of the artist.

scott s.
.
Would a folder type custom node work? I don't have any music vdeos to test it for you, but this might work
Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="1" type="folder">
<label>Music Videos</label>
<path>videodb://musicvideos/artists</path>
</node>