From d762de900a6403772126eaa33703c0afe27e1a77 Mon Sep 17 00:00:00 2001 From: Mark Greenwood Date: Sat, 9 Mar 2024 13:03:44 +0000 Subject: [PATCH] dfhdh --- ui/collectionhelper.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ui/collectionhelper.js b/ui/collectionhelper.js index 7915dd19..2e654753 100644 --- a/ui/collectionhelper.js +++ b/ui/collectionhelper.js @@ -184,11 +184,15 @@ var collectionHelper = function() { if (rdata && rdata.hasOwnProperty('modifiedartists')) { $('#emptycollection').remove(); $.each(rdata.modifiedartists, function(i,v) { - // The only thing to do with artists is to add them in if they don't exist - // NOTE. Do this AFTER inserting new albums, because if we're doing albumbyartist with banners showing - // then the insertAfter logic will be wrong if we've already inserted the artist banner. - if ($('.openmenu[name="'+v.id+'"]').length == 0 && $('#'+v.id).length == 0) { - uiHelper.insertArtist(v); + try { + // The only thing to do with artists is to add them in if they don't exist + // NOTE. Do this AFTER inserting new albums, because if we're doing albumbyartist with banners showing + // then the insertAfter logic will be wrong if we've already inserted the artist banner. + if ($('.openmenu[name="'+v.id+'"]').length == 0 && $('#'+v.id).length == 0) { + uiHelper.insertArtist(v); + } + } catch (err) { + } }); }