* 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;
sqlite_int64 detailID = 0;
result = sql_get_text_field(db, "SELECT OBJECT_ID from OBJECTS"
" where PARENT_ID = '%s'"
" and NAME like '%q'"
" and CLASS = 'container.%s' limit 1",
rootParent, item, class);
result = sql_get_text_field(db, "SELECT OBJECT_ID from OBJECTS o "
"left join DETAILS d on (o.DETAIL_ID = d.ID)"
" where o.PARENT_ID = '%s'"
" and o.NAME like '%q'"
" and d.ARTIST %s %Q"
" and o.CLASS = 'container.%s' limit 1",
rootParent, item, artist?"like":"is", artist, class);
if( result )
{
base = strrchr(result, '$');