mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
minify
This commit is contained in:
parent
82bcca376f
commit
8a6884abef
494 changed files with 256 additions and 120180 deletions
|
@ -1,87 +1 @@
|
|||
define([], function () {
|
||||
'use strict';
|
||||
|
||||
function getNowPlayingNames(nowPlayingItem, includeNonNameInfo) {
|
||||
|
||||
var topItem = nowPlayingItem;
|
||||
var bottomItem = null;
|
||||
var topText = nowPlayingItem.Name;
|
||||
|
||||
if (nowPlayingItem.AlbumId && nowPlayingItem.MediaType === 'Audio') {
|
||||
topItem = {
|
||||
Id: nowPlayingItem.AlbumId,
|
||||
Name: nowPlayingItem.Album,
|
||||
Type: 'MusicAlbum',
|
||||
IsFolder: true
|
||||
};
|
||||
}
|
||||
|
||||
if (nowPlayingItem.MediaType === 'Video') {
|
||||
if (nowPlayingItem.IndexNumber != null) {
|
||||
topText = nowPlayingItem.IndexNumber + " - " + topText;
|
||||
}
|
||||
if (nowPlayingItem.ParentIndexNumber != null) {
|
||||
topText = nowPlayingItem.ParentIndexNumber + "." + topText;
|
||||
}
|
||||
}
|
||||
|
||||
var bottomText = '';
|
||||
|
||||
if (nowPlayingItem.Artists && nowPlayingItem.Artists.length) {
|
||||
|
||||
if (nowPlayingItem.ArtistItems && nowPlayingItem.ArtistItems.length) {
|
||||
|
||||
bottomItem = {
|
||||
Id: nowPlayingItem.ArtistItems[0].Id,
|
||||
Name: nowPlayingItem.ArtistItems[0].Name,
|
||||
Type: 'MusicArtist',
|
||||
IsFolder: true
|
||||
};
|
||||
|
||||
bottomText = bottomItem.Name;
|
||||
} else {
|
||||
bottomText = nowPlayingItem.Artists[0];
|
||||
}
|
||||
}
|
||||
else if (nowPlayingItem.SeriesName || nowPlayingItem.Album) {
|
||||
bottomText = topText;
|
||||
topText = nowPlayingItem.SeriesName || nowPlayingItem.Album;
|
||||
|
||||
bottomItem = topItem;
|
||||
|
||||
if (nowPlayingItem.SeriesId) {
|
||||
topItem = {
|
||||
Id: nowPlayingItem.SeriesId,
|
||||
Name: nowPlayingItem.SeriesName,
|
||||
Type: 'Series',
|
||||
IsFolder: true
|
||||
};
|
||||
} else {
|
||||
topItem = null;
|
||||
}
|
||||
}
|
||||
else if (nowPlayingItem.ProductionYear && includeNonNameInfo !== false) {
|
||||
bottomText = nowPlayingItem.ProductionYear;
|
||||
}
|
||||
|
||||
var list = [];
|
||||
|
||||
list.push({
|
||||
text: topText,
|
||||
item: topItem
|
||||
});
|
||||
|
||||
if (bottomText) {
|
||||
list.push({
|
||||
text: bottomText,
|
||||
item: bottomItem
|
||||
});
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
return {
|
||||
getNowPlayingNames: getNowPlayingNames
|
||||
};
|
||||
});
|
||||
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.Artists&&nowPlayingItem.Artists.length?nowPlayingItem.ArtistItems&&nowPlayingItem.ArtistItems.length?(bottomItem={Id:nowPlayingItem.ArtistItems[0].Id,Name:nowPlayingItem.ArtistItems[0].Name,Type:"MusicArtist",IsFolder:!0},bottomText=bottomItem.Name):bottomText=nowPlayingItem.Artists[0]: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&&includeNonNameInfo!==!1&&(bottomText=nowPlayingItem.ProductionYear);var list=[];return list.push({text:topText,item:topItem}),bottomText&&list.push({text:bottomText,item:bottomItem}),list}return{getNowPlayingNames:getNowPlayingNames}});
|
Loading…
Add table
Add a link
Reference in a new issue