mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add requirejs
This commit is contained in:
parent
03ca18cf4f
commit
4e71751d0f
20 changed files with 379 additions and 520 deletions
|
@ -137,6 +137,10 @@
|
|||
|
||||
};
|
||||
|
||||
self.getPlayers = function() {
|
||||
return players;
|
||||
};
|
||||
|
||||
self.getTargets = function () {
|
||||
|
||||
var deferred = $.Deferred();
|
||||
|
@ -383,6 +387,37 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
// TOOD: This doesn't really belong here
|
||||
self.getNowPlayingNameHtml = function (nowPlayingItem) {
|
||||
|
||||
var topText = nowPlayingItem.Name;
|
||||
|
||||
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) {
|
||||
bottomText = topText;
|
||||
topText = nowPlayingItem.Artists[0];
|
||||
}
|
||||
else if (nowPlayingItem.SeriesName || nowPlayingItem.Album) {
|
||||
bottomText = topText;
|
||||
topText = nowPlayingItem.SeriesName || nowPlayingItem.Album;
|
||||
}
|
||||
else if (nowPlayingItem.ProductionYear) {
|
||||
bottomText = nowPlayingItem.ProductionYear;
|
||||
}
|
||||
|
||||
return bottomText ? topText + '<br/>' + bottomText : topText;
|
||||
};
|
||||
}
|
||||
|
||||
window.MediaController = new mediaController();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue