1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

consolidate all library icons into a single method

This commit is contained in:
dkanada 2019-07-01 14:49:34 -07:00
parent f3707153a0
commit 752212413c
5 changed files with 42 additions and 137 deletions

View file

@ -28,7 +28,37 @@ define(["browser"], function (browser) {
}
}
function getLibraryIcon(library) {
switch (library) {
case "movies":
return "video_library";
case "music":
return "library_music";
case "photos":
return "photo_library";
case "livetv":
return "live_tv";
case "tvshows":
return "tv";
case "trailers":
return "local_movies";
case "homevideos":
return "photo_library";
case "musicvideos":
return "music_video";
case "books":
return "library_books";
case "channels":
return "videocam";
case "playlists":
return "view_list";
default:
return "folder";
}
}
return {
getDeviceIcon: getDeviceIcon,
getLibraryIcon: getLibraryIcon
};
});