Bug 4625 - artists cli query does not always return an artist for tracks in compilations
: artists cli query does not always return an artist for tracks in compilations
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: CLI
: 6.5.1
: PC All
: P2 normal (vote)
: ---
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-28 15:48 UTC by Dominik M�hl
Modified: 2007-05-26 11:39 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik M�hl 2006-12-28 15:48:55 UTC
Hi,

I'm playing around with your CLI interface quite a bit and discovered the following problem:

if I send an "artists track_id:idA" query to the server where idA is the track id I will get no artist returned.

After some investigation I found out the following:

It happens only when the following criterias are met:
1. The track belong to a compilation
2. The track's artist has no full/complete album elsewhere in the database (meaning, that there is no non-compilation album  for that artist)

I digged a bit more deeply and analysed the sql statements. What I found was this in the debug output:

2006-12-29 00:19:56.1874 CLI: Processing request [artists]
2006-12-29 00:19:56.1890 CLI: Dispatching [artists]
2006-12-29 00:19:56.1936 SELECT me.name, me.value FROM metainformation me WHERE ( name = ? ): 'isScanning'
2006-12-29 00:19:56.2051 SELECT COUNT( DISTINCT( me.id ) ) FROM contributors me LEFT JOIN contributor_album contributorAlbums ON ( contributorAlbums.contributor = me.id )  JOIN albums album ON ( album.id = contributorAlbums.album ) LEFT JOIN contributor_track contributorTracks ON ( contributorTracks.contributor = me.id ) WHERE ( ( ( contributorTracks.track = ? ) AND ( ( ( album.compilation IS NULL ) OR ( album.compilation = ? ) ) AND contributorAlbums.role IN ( ?, ? ) ) ) ): '4237', '0', '1', '5'
2006-12-29 00:19:56.2129 CLI: 192.168.0.131:57738 - Sending response [artists 0 2147483647 track_id%3A4237 jsqID%3A33 count%3A...]
2006-12-29 00:19:56.2146 CLI: Sent response to 192.168.0.131:57738
2006-12-29 00:19:56.2201 CLI: 192.168.0.131:57738 - Buffered [genres 0 2147483647 track_id%3A4237 jsqID%3A34]

For artists, who have a full album elsewhere in the library the statement above looks the same but another one which gets the real data follows.

I executed the (hopefully) important portion of that statement on the mysql console and got the following for a track which has no artist returned:

mysql> SELECT me.id, me.name, album.compilation, contributorAlbums.role FROM contributors me LEFT JOIN contributor_album contributorAlbums ON ( contributorAlbums.contributor = me.id )  JOIN albums album ON ( album.id = contributorAlbums.album ) LEFT JOIN contributor_track contributorTracks ON ( contributorTracks.contributor = me.id ) WHERE ( ( ( contributorTracks.track = 4244 ) ) );
+-----+----------+-------------+------+
| id  | name     | compilation | role |
+-----+----------+-------------+------+
| 372 | S.O.A.P. |           1 |    1 | 
+-----+----------+-------------+------+
1 row in set (0.00 sec)

And this for a track which gets an artist:

mysql> SELECT me.id, me.name, album.compilation, contributorAlbums.role FROM contributors me LEFT JOIN contributor_album contributorAlbums ON ( contributorAlbums.contributor = me.id )  JOIN albums album ON ( album.id = contributorAlbums.album ) LEFT JOIN contributor_track contributorTracks ON ( contributorTracks.contributor = me.id ) WHERE ( ( ( contributorTracks.track = 4231 ) ) );
+----+-------------------+-------------+------+
| id | name              | compilation | role |
+----+-------------------+-------------+------+
| 91 | Sophie B. Hawkins |        NULL |    1 | 
| 91 | Sophie B. Hawkins |           1 |    1 | 
| 91 | Sophie B. Hawkins |           1 |    1 | 
+----+-------------------+-------------+------+
3 rows in set (0.00 sec)

With my limited understanding of the inner workings I cannot see if or where this bug lies, but IMHO an "artists" query should always return the tracks artist or at least the "Various Artists" no matter what the server settings are. In my server settings I have enabled "Group compilations together".

Bug 4252 seems also related to this. Maybe :)

Quick server info:
SlimServer Version: 6.5.1 - 11039 - solaris - EN - iso-8859-1
Perl Version: 5.8.8 i86pc-solaris-thread-multi
MySQL Version: 5.0.22

I hope this bug reports helps you and I look forward hearing from you. As a side comment: Apart from this one thing I so far really like what you've done with the CLI.

Bye,

Dominik
Comment 1 Dominik M�hl 2006-12-28 15:57:18 UTC
A quick note: If I use "songinfo" with the tags for artist and artist_id I get the correct artist for that track id. So there must be something :)
Comment 2 Fred 2007-02-12 16:08:55 UTC
Waow, the bug report. Sorry it took so long for me to notice it, will have a look right away.
Comment 3 Fred 2007-02-12 16:16:00 UTC
This should return Various Artists if "Group compilations together" is enabled, no matter if the artists has a full album available, when requested from a track which is part of a compilation. Or?
I am not sure what is right but there is certainly something wrong here!
Comment 4 Fred 2007-05-19 14:18:11 UTC
Fixed in r12054. Should be merged to 6.5.3?
Comment 5 Fred 2007-05-26 03:49:48 UTC
Should I patch this in 6.5.3? If not,we can close.
Comment 6 Dominik M�hl 2007-05-26 06:09:08 UTC
(In reply to comment #5)
> Should I patch this in 6.5.3? If not,we can close.
> 

Hi,

of course it would be nice to fix this in the next version. But If it is causing too much trouble I could wait till 7.0.

Thanks for your support

Dominik
Comment 7 KDF 2007-05-26 11:39:34 UTC
if the change is easily ported to 6.5.3, i'd say go for it as it does fit with the other bugs we're trying to deal with in regard to artist/metadata reporting.  It's still early in the cycle so plenty of time for testing.