« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/wiki-data.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/wiki-data.js')
-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}) {