« get me outta code hell

non-jpg full res art links, artist avatars - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-03-05 21:34:59 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-03-05 21:34:59 -0400
commit3bbeea69c6356edd5792ac7898b9623c2e1519de (patch)
treebd8727673d528e5b540db2b2dc51627ca209819b /src/util
parent21c6220356b3769b6321bd64e85398fee618cfb1 (diff)
non-jpg full res art links, artist avatars
Diffstat (limited to 'src/util')
-rw-r--r--src/util/wiki-data.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js
index 36c61454..870c0b0e 100644
--- a/src/util/wiki-data.js
+++ b/src/util/wiki-data.js
@@ -98,7 +98,7 @@ export function filterAlbumsByCommentary(albums) {
 }
 
 export function getAlbumCover(album, {to}) {
-    return to('media.albumCover', album.directory);
+    return to('media.albumCover', album.directory, album.coverArtFileExtension);
 }
 
 export function getAlbumListTag(album) {
@@ -143,9 +143,7 @@ export function getArtistCommentary(artist, {justEverythingMan}) {
 }
 
 export function getFlashCover(flash, {to}) {
-    return (flash.jiff
-        ? to('media.flashArtGif', flash.directory)
-        : to('media.flashArt', flash.directory));
+    return to('media.flashArt', flash.directory, flash.coverArtFileExtension);
 }
 
 export function getFlashLink(flash) {
@@ -162,10 +160,14 @@ export function getTrackCover(track, {to}) {
     if (!track.hasCoverArt) {
         return getAlbumCover(track.album, {to});
     } else {
-        return to('media.trackCover', track.album.directory, track.directory);
+        return to('media.trackCover', track.album.directory, track.directory, track.coverArtFileExtension);
     }
 }
 
+export function getArtistAvatar(artist, {to}) {
+    return to('media.artistAvatar', artist.directory, artist.avatarFileExtension);
+}
+
 // Big-ass homepage row functions
 
 export function getNewAdditions(numAlbums, {wikiData}) {