* Separate album containers with different artists.

This commit is contained in:
Justin Maggard 2011-11-03 00:48:14 +00:00
parent 6b3729a147
commit 4d4d96e1bb

View File

@ -88,11 +88,13 @@ insert_container(const char * item, const char * rootParent, const char * refID,
int ret = 0; int ret = 0;
sqlite_int64 detailID = 0; sqlite_int64 detailID = 0;
result = sql_get_text_field(db, "SELECT OBJECT_ID from OBJECTS" result = sql_get_text_field(db, "SELECT OBJECT_ID from OBJECTS o "
" where PARENT_ID = '%s'" "left join DETAILS d on (o.DETAIL_ID = d.ID)"
" and NAME like '%q'" " where o.PARENT_ID = '%s'"
" and CLASS = 'container.%s' limit 1", " and o.NAME like '%q'"
rootParent, item, class); " and d.ARTIST %s %Q"
" and o.CLASS = 'container.%s' limit 1",
rootParent, item, artist?"like":"is", artist, class);
if( result ) if( result )
{ {
base = strrchr(result, '$'); base = strrchr(result, '$');