diff options
Diffstat (limited to 'src/static/js')
-rw-r--r-- | src/static/js/client.js | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/static/js/client.js b/src/static/js/client.js index 771d2011..bee82938 100644 --- a/src/static/js/client.js +++ b/src/static/js/client.js @@ -3862,36 +3862,12 @@ function generateSidebarSearchResult(result) { function getSearchResultImageSource(result) { const {artwork} = result.data; - if (!artwork) return null; - const [kind, ...opts] = artwork; - - switch (kind) { - case 'flash': - return rebase( - ('flash-art' - + `/${result.directory}.small.jpg`), - 'rebaseThumb'); - - case 'track': - return rebase( - (`album-art` - + `/${opts[0]}` - + `/${result.directory}` - + `.small.jpg`), - 'rebaseThumb'); - - case 'track-album': - return rebase( - (`album-art` - + `/${opts[0]}` - + `/cover.small.jpg`), - 'rebaseThumb'); - - default: - return null; - } + return ( + rebase( + artwork.replace('<>', result.directory), + 'rebaseThumb')); } function generateSidebarSearchResultTemplate(slots) { |