Inconsistency with Various artists
#1
Music 
Hi,
I have my music organised into the following three "sources":
Music - Adults
Music - Kids
Music - Shared

In each source "Various artists" shows as a single artist (as it should)

I have then tried creating both custom nodes and smart playlists to cover the following group
Adults - contains "Music - Adults" and "Music - Shared"
Kids - contains "Music - Kids" and "Music - Shared"

The issue I have is with albums by "Various artists".

In the Adults node which is sorted by Artist, correctly "Various artists" is shown as a single artist, and albums are shown within that.
Bizarrely, the Kids node (which to me looks identical other than the sources used), shows the individual artists on the "Various artist" albums and then the album under that.

Any ideasHuh?
Reply
#2
Please show your custom node xml files, should be able to spot the problem.
Reply
#3
Thanks so much @DaveBlake.

adultsmusic.xml:
Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="10" type="filter">
    <label>Adults Music</label>
    <content>artists</content>
    <rule field="path" operator="startswith">
        <value>smb://MEDIASERVER/Music/Adults/</value>
    </rule>
    <rule field="path" operator="startswith">
        <value>smb://MEDIASERVER/Music/Shared/</value>
    </rule>
    <match>any</match>
    <order direction="ascending">artist</order>
</node>

kidsmusic.xml
Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="20" type="filter">
    <label>Kids Music</label>
    <content>artists</content>
    <rule field="path" operator="startswith">
        <value>smb://MEDIASERVER/Music/Shared/</value>
    </rule>
    <rule field="path" operator="startswith">
        <value>smb://MEDIASERVER/Music/Shared/</value>
    </rule>
    <match>any</match>
    <order direction="ascending">artist</order>
</node>

No difference that I can see

So, here's my directory structure (Adults not expanded for clarity):
Image

Adults Music node is showing this which is totally correct - all adult and shared artists shown:
Image

Kids Music node is showing this which is an apparent random mixture of artists - some from shared, some adults, but none kids!
Image
Reply
#4
Code:
<rule field="path" operator="startswith">
        <value>smb://MEDIASERVER/Music/Shared/</value>
    </rule>
    <rule field="path" operator="startswith">
        <value>smb://MEDIASERVER/Music/Shared/</value>


Those are the same, change one to /Kids or whatever
Reply
#5
(2017-02-09, 17:07)helta Wrote:
Code:
<rule field="path" operator="startswith">
        <value>smb://MEDIASERVER/Music/Shared/</value>
    </rule>
    <rule field="path" operator="startswith">
        <value>smb://MEDIASERVER/Music/Shared/</value>


Those are the same, change one to /Kids or whatever

Sorry - that was my bad - just a copy/paste error. Actually as per below - will update above:
Code:
<?xml version='1.0' encoding='UTF-8'?>
<node order="20" type="filter">
    <label>Kids Music</label>
    <content>artists</content>
    <rule field="path" operator="startswith">
        <value>smb://MEDIASERVER/Music/Kids/</value>
    </rule>
    <rule field="path" operator="startswith">
        <value>smb://MEDIASERVER/Music/Shared/</value>
    </rule>
    <match>any</match>
    <order direction="ascending">artist</order>
</node>
Reply
#6
Is this on the same Kodi client, or do the kids have their own Kodi system? If they do then my thinking is the "Show album and song artists" setting is different.

If all on one machine then get me a debug log for looking at those varied nodes. I'm interested to see the SQL Kodi is using for each.
Reply
#7
Thanks Dave - on the same client. It's not even as if the Kids list is bringing up anything from the kids directory, just (apparently) random stuff.

Have uploaded a log with debug logging on and verbose SMB logging. Obviously music stuff is at the end so worth starting there! Entered Adults music first, then back to home, then into Kids.

http://pastebin.com/FdNJzMP5
Reply
#8
Same client, nothing amiss with the SQL in the log.

OK, put your MyMusic60.db on the cloud for me to have a look at, because I'm not seeing that is happening here. PM me the link if you feel that is a bit personal.
Reply
#9
Thanks Dave. Couldn't find the location of the shared MySql but exported via HeidiSQL so hopefully ok?
https://www.dropbox.com/s/k8afxnbqu43i0g...0.sql?dl=0
Reply
#10
Am wondering if the issue is that it's picking up the artists included on the compilations that exist elsewhere in the library rather than Album artist?

Shouldn't do as "Show song and album artists" definitely unchecked.
Reply
#11
Yeap that's fine. With MySQL, and I should have asked rather than assume local db, there isn't a separate file so export is the thing to do.

Here's the thing, having loaded the db you providied as if it was mine, disabled "Show song and album artists", and created those nodes every thing is behaving as I think it should. But did you send me different data to what you have in those screen shots? I ask because I have 600 "adult" artists (while screen shot shows 349) and 54 "kids" but these all come from the .../shared/... folder, there is nothing with a path smb://MEDIASERVER/Music/Kids...

You are running Kodi client/server, the MySQL shared between multiple devices running Kodi. Do all the devices have advancedsettings.xml set up to use the MySQL db? Maybe you just exported the wrong one? I can't tell, but the issue is related to that in some way.
Reply
#12
OK, so first, I'm a bit of a tool as I realise the Kids library didn't import correctly. Have reuploaded the data here:
https://www.dropbox.com/s/721i1zx8wjwkp7...0.sql?dl=0

However, the problem persists.

Basically I have a Media Server (192.168.1.100) running Kodi. I have several machines all pointing correctly to that location. However, for the avoidance of doubt I have created these nodes on the server and still get the same results) so maybe I screwed up the export?

select distinct album_artist.strArtist from album_artist gives 355 artists

The query for the Music Adults node appears to be this. (sorry forum wouldn't allow me to post raw sql)

The issue is that this is appears to be dealing with SONG artists even though I'm wanting album artists. As such the list includes artists such as "5 Seconds of Summer". Whilst they probably have songs on some of the compilations in "Shared", the only place they exist as a standalone artist is in "Kids".

Image

This also is reflected in the Music Kids node sql.

Here, there are (now) artists from the kids section, but those from compilations are shown with no sign of "Various artists" anywhere.

Image

As such, I think that's the key issue - I want to show Album artist (based on my settings) but it's extracting Song artist.
Reply
#13
OK, I was distracted by only having part of the data (that is my excuse :p), I see the issue now.

It is correct for the query to look at the song_artistsong table, it has too in order to find the connection between artist and path. It also checks the album_artist table to ensure that the artist is an album artist. The problem is how the query is built when it has path rules combined with OR, and then applies the "is an ambumatist" rule as an AND. All rules needs to be applied for the same song, and they aren't. It is a weakness in the current smart playlist facility that I am generally aware of but was unable to fix in v17 - even raised a PR, but it was never up to standard, and no one else in the team was familiar enough with the music db to get what I was trying to do.

Prize for being the first user to report a problem related to the potential issue I could see, but no one had complained about. :p
I am very happy to see a user trying to get the most out of what databses can do, just sorry the query interface isn't quite there yet.

Current query is finding the song artists of songs with path = "kids" or "shared", and then showing only those that are album artists too. But they could be album artists of other ("adults") albums, not the kids or shared albums where they are just featured on songs.

Let me give it a bit of thought and see if we can trick it into doing what you want instead.
Reply
#14
Awesome - thanks (especially for the prize Wink ). Wonder if there's a way of creating some sort of virtual folders? An adults one could contain links to the "adult" and "shared", and a kids one containing links to "kids" and "shared"?
Reply
#15
Yeap the SQL we want is (remove the _ from the word that upsets Cloudflare)
Code:
S_ELECT artistview.* FROM artistview  
WHERE EXISTS(S_ELECT 1 FROM album_artist JOIN song ON album_artist.idAlbum = song.idAlbum
WHERE album_artist.idArtist = artistview.idArtist  
AND ( EXISTS (S_ELECT 1 FROM path
WHERE path.idpath = song.idpath
AND (path.strPath LIKE 'smb://MEDIASERVER/Music/Kids/%' or path.strPath LIKE 'smb://MEDIASERVER/Music/Shared/%')
)))
AND ( artistview.strArtist != '')
although there are many ways to achieve the same thing. My aborted PR would have done that, so at least I have it in mind for v18 Smile

But current smart playlist implementation is designed around one where clause element per rule, and the kind of query you want is more inter-related than that.
Reply

Logout Mark Read Team Forum Stats Members Help
Inconsistency with Various artists0