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

First separation commit.

Added LICENSE, README.md, CONTRIBUTORS.md
This commit is contained in:
Erwin de Haan 2019-01-09 12:36:54 +01:00
parent 09513af31b
commit 4678528d00
657 changed files with 422 additions and 0 deletions

View file

@ -1,40 +0,0 @@
define([], function() {
"use strict";
function getNowPlayingNames(nowPlayingItem, includeNonNameInfo) {
var topItem = nowPlayingItem,
bottomItem = null,
topText = nowPlayingItem.Name;
nowPlayingItem.AlbumId && "Audio" === nowPlayingItem.MediaType && (topItem = {
Id: nowPlayingItem.AlbumId,
Name: nowPlayingItem.Album,
Type: "MusicAlbum",
IsFolder: !0
}), "Video" === nowPlayingItem.MediaType && (null != nowPlayingItem.IndexNumber && (topText = nowPlayingItem.IndexNumber + " - " + topText), null != nowPlayingItem.ParentIndexNumber && (topText = nowPlayingItem.ParentIndexNumber + "." + topText));
var bottomText = "";
nowPlayingItem.ArtistItems && nowPlayingItem.ArtistItems.length ? (bottomItem = {
Id: nowPlayingItem.ArtistItems[0].Id,
Name: nowPlayingItem.ArtistItems[0].Name,
Type: "MusicArtist",
IsFolder: !0
}, bottomText = nowPlayingItem.ArtistItems.map(function(a) {
return a.Name
}).join(", ")) : nowPlayingItem.Artists && nowPlayingItem.Artists.length ? bottomText = nowPlayingItem.Artists.join(", ") : nowPlayingItem.SeriesName || nowPlayingItem.Album ? (bottomText = topText, topText = nowPlayingItem.SeriesName || nowPlayingItem.Album, bottomItem = topItem, topItem = nowPlayingItem.SeriesId ? {
Id: nowPlayingItem.SeriesId,
Name: nowPlayingItem.SeriesName,
Type: "Series",
IsFolder: !0
} : null) : nowPlayingItem.ProductionYear && !1 !== includeNonNameInfo && (bottomText = nowPlayingItem.ProductionYear);
var list = [];
return list.push({
text: topText,
item: topItem
}), bottomText && list.push({
text: bottomText,
item: bottomItem
}), list
}
return {
getNowPlayingNames: getNowPlayingNames
}
});