mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
This commit is contained in:
commit
ab2bc00795
@ -1733,7 +1733,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
||||
});
|
||||
};
|
||||
|
||||
self.getVideoBackdrops = function (userId, itemId) {
|
||||
self.getThemeVideos = function (userId, itemId) {
|
||||
|
||||
if (!userId) {
|
||||
throw new Error("null userId");
|
||||
@ -1742,7 +1742,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
|
||||
throw new Error("null itemId");
|
||||
}
|
||||
|
||||
var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/VideoBackdrops");
|
||||
var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/ThemeVideos");
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
|
@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="gamesystemPage" data-role="page" class="page libraryPage noLogoPage" data-theme="a">
|
||||
<h1 class="libraryPageHeader"><a href="index.html" class="imageLink">
|
||||
<img src="css/images/mblogoicon.png"></a>Games</h1>
|
||||
<div data-role="content">
|
||||
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="gamesrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="games.html" data-role="button">Games</a>
|
||||
<a href="gamesystems.html" data-role="button" class="ui-btn-active">Game Systems</a>
|
||||
<a href="gamegenres.html" data-role="button">Genres</a>
|
||||
<a href="gamestudios.html" data-role="button">Studios</a>
|
||||
</div>
|
||||
|
||||
<div class="detailPagePrimaryInfo">
|
||||
<div class="itemImageBlock">
|
||||
<div id="itemMedia" style="position: relative;">
|
||||
<div id="itemImage"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="itemDetailBlock">
|
||||
|
||||
<h1 id="itemName" class="detailPageName"></h1>
|
||||
<p id="itemMiscInfo" class="itemMiscInfo"></p>
|
||||
<p id="itemTagline" style="font-style: italic;"></p>
|
||||
<p id="itemOverview"></p>
|
||||
<p id="itemRatings"></p>
|
||||
<p id="itemCommunityRating"></p>
|
||||
|
||||
<p id="itemGenres"></p>
|
||||
<p id="itemStudios"></p>
|
||||
<p id="itemLinks"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -91,6 +91,24 @@
|
||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gameGenreTabs" class="itemTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="gamesrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="games.html" data-role="button">Games</a>
|
||||
<a href="gamesystems.html" data-role="button">Game Systems</a>
|
||||
<a href="gamegenres.html" data-role="button" class="ui-btn-active">Genres</a>
|
||||
<a href="gamestudios.html" data-role="button">Studios</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gameStudioTabs" class="itemTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="gamesrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="games.html" data-role="button">Games</a>
|
||||
<a href="gamesystems.html" data-role="button">Game Systems</a>
|
||||
<a href="gamegenres.html" data-role="button">Genres</a>
|
||||
<a href="gamestudios.html" data-role="button" class="ui-btn-active">Studios</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detailPageContent">
|
||||
<div class="detailPagePrimaryInfo">
|
||||
<div class="itemImageBlock">
|
||||
|
@ -12,7 +12,7 @@
|
||||
<h1 class="libraryPageHeader" style="display: none;"><a href="index.html" class="imageLink">
|
||||
<img src="css/images/mblogoicon.png"></a><span></span></h1>
|
||||
<div data-role="content">
|
||||
<div id="movieTabs" style="display: none;">
|
||||
<div id="movieTabs" class="itemTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="moviesrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="movies.html" data-role="button" class="ui-btn-active">Movies</a>
|
||||
@ -23,7 +23,7 @@
|
||||
<a href="moviestudios.html" data-role="button">Studios</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="boxsetTabs" style="display: none;">
|
||||
<div id="boxsetTabs" class="itemTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="moviesrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="movies.html" data-role="button">Movies</a>
|
||||
@ -34,7 +34,7 @@
|
||||
<a href="moviestudios.html" data-role="button">Studios</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="trailerTabs" style="display: none;">
|
||||
<div id="trailerTabs" class="itemTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="moviesrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="movies.html" data-role="button">Movies</a>
|
||||
@ -45,7 +45,7 @@
|
||||
<a href="moviestudios.html" data-role="button">Studios</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tvShowsTabs" style="display: none;">
|
||||
<div id="tvShowsTabs" class="itemTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="tvrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="tvshows.html" data-role="button" class="ui-btn-active">Shows</a>
|
||||
@ -54,7 +54,7 @@
|
||||
<a href="tvstudios.html" data-role="button">Networks</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="songTabs" style="display: none;">
|
||||
<div id="songTabs" class="itemTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="musicrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="songs.html" data-role="button" class="ui-btn-active">Songs</a>
|
||||
@ -63,7 +63,7 @@
|
||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="albumTabs" style="display: none;">
|
||||
<div id="albumTabs" class="itemTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="musicrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="songs.html" data-role="button">Songs</a>
|
||||
@ -72,7 +72,16 @@
|
||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gameTabs" style="display: none;">
|
||||
<div id="gameTabs" class="itemTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="gamesrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="games.html" data-role="button" class="ui-btn-active">Games</a>
|
||||
<a href="gamesystems.html" data-role="button">Game Systems</a>
|
||||
<a href="gamegenres.html" data-role="button">Genres</a>
|
||||
<a href="gamestudios.html" data-role="button">Studios</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gameSystemTabs" class="itemTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="gamesrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="games.html" data-role="button" class="ui-btn-active">Games</a>
|
||||
@ -171,9 +180,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div data-role="collapsible" id="videoBackdropsCollapsible" style="display: none;" data-mini="true" data-collapsed="false" data-corners="false">
|
||||
<h3>Video Backdrops</h3>
|
||||
<div id="videoBackdropsContent"></div>
|
||||
<div data-role="collapsible" id="themeVideosCollapsible" style="display: none;" data-mini="true" data-collapsed="false" data-corners="false">
|
||||
<h3>Theme Videos</h3>
|
||||
<div id="themeVideosContent"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -116,7 +116,7 @@
|
||||
enableCustomHeader(page, "Music");
|
||||
$('#standardLogo', page).hide();
|
||||
}
|
||||
else if (item.MediaType == "Game") {
|
||||
else if (item.MediaType == "Game" || item.Type == "GamePlatform") {
|
||||
enableCustomHeader(page, "Games");
|
||||
$('#standardLogo', page).hide();
|
||||
}
|
||||
@ -125,44 +125,38 @@
|
||||
$('#standardLogo', page).show();
|
||||
}
|
||||
|
||||
$('.itemTabs', page).hide();
|
||||
|
||||
if (item.Type == "MusicAlbum") {
|
||||
$('#albumTabs', page).show();
|
||||
} else {
|
||||
$('#albumTabs', page).hide();
|
||||
}
|
||||
|
||||
if (item.Type == "Audio") {
|
||||
$('#songTabs', page).show();
|
||||
} else {
|
||||
$('#songTabs', page).hide();
|
||||
}
|
||||
|
||||
if (item.Type == "Movie") {
|
||||
$('#movieTabs', page).show();
|
||||
} else {
|
||||
$('#movieTabs', page).hide();
|
||||
}
|
||||
|
||||
if (item.MediaType == "Game") {
|
||||
$('#gameTabs', page).show();
|
||||
} else {
|
||||
$('#gameTabs', page).hide();
|
||||
}
|
||||
|
||||
if (item.Type == "GamePlatform") {
|
||||
$('#gameSystemTabs', page).show();
|
||||
}
|
||||
|
||||
if (item.Type == "BoxSet") {
|
||||
$('#boxsetTabs', page).show();
|
||||
} else {
|
||||
$('#boxsetTabs', page).hide();
|
||||
}
|
||||
|
||||
if (item.Type == "Trailer") {
|
||||
$('#trailerTabs', page).show();
|
||||
} else {
|
||||
$('#trailerTabs', page).hide();
|
||||
}
|
||||
|
||||
if (item.Type == "Episode" || item.Type == "Season" || item.Type == "Series") {
|
||||
$('#tvShowsTabs', page).show();
|
||||
} else {
|
||||
$('#tvShowsTabs', page).hide();
|
||||
}
|
||||
}
|
||||
|
||||
@ -221,14 +215,14 @@
|
||||
}
|
||||
|
||||
$('#themeSongsCollapsible', page).hide();
|
||||
$('#videoBackdropsCollapsible', page).hide();
|
||||
$('#themeVideosCollapsible', page).hide();
|
||||
|
||||
ApiClient.getThemeSongs(Dashboard.getCurrentUserId(), item.Id).done(function (result) {
|
||||
renderThemeSongs(page, item, result);
|
||||
});
|
||||
|
||||
ApiClient.getVideoBackdrops(Dashboard.getCurrentUserId(), item.Id).done(function (result) {
|
||||
renderVideoBackdrops(page, item, result);
|
||||
ApiClient.getThemeVideos(Dashboard.getCurrentUserId(), item.Id).done(function (result) {
|
||||
renderThemeVideos(page, item, result);
|
||||
});
|
||||
}
|
||||
|
||||
@ -275,9 +269,13 @@
|
||||
$('#itemSongs', page).html(LibraryBrowser.getSongTableHtml(result.Items, { showArtist: true })).trigger('create');
|
||||
|
||||
} else {
|
||||
|
||||
var shape = "poster";
|
||||
|
||||
var html = LibraryBrowser.getPosterDetailViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true
|
||||
useAverageAspectRatio: true,
|
||||
shape: shape
|
||||
});
|
||||
|
||||
$('#childrenContent', page).html(html);
|
||||
@ -297,6 +295,9 @@
|
||||
else if (item.Type == "MusicAlbum") {
|
||||
$('#childrenTitle', page).html('Tracks (' + item.ChildCount + ')');
|
||||
}
|
||||
else if (item.Type == "GamePlatform") {
|
||||
$('#childrenTitle', page).html('Games (' + item.ChildCount + ')');
|
||||
}
|
||||
else {
|
||||
$('#childrenTitle', page).html('Items (' + item.ChildCount + ')');
|
||||
}
|
||||
@ -315,13 +316,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
function renderVideoBackdrops(page, item, result) {
|
||||
function renderThemeVideos(page, item, result) {
|
||||
|
||||
if (result.Items.length) {
|
||||
|
||||
$('#videoBackdropsCollapsible', page).show();
|
||||
$('#themeVideosCollapsible', page).show();
|
||||
|
||||
$('#videoBackdropsContent', page).html(getVideosHtml(result.Items)).trigger('create');
|
||||
$('#themeVideosContent', page).html(getVideosHtml(result.Items)).trigger('create');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,8 @@
|
||||
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
showNewIndicator: false
|
||||
showNewIndicator: false,
|
||||
transparent: true
|
||||
}));
|
||||
|
||||
});
|
||||
@ -40,7 +41,8 @@
|
||||
|
||||
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true
|
||||
useAverageAspectRatio: true,
|
||||
transparent: true
|
||||
}));
|
||||
|
||||
});
|
||||
|
@ -1,53 +0,0 @@
|
||||
|
||||
(function ($, document, LibraryBrowser) {
|
||||
|
||||
function reload(page) {
|
||||
|
||||
var id = getParameterByName('id');
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) {
|
||||
|
||||
var name = item.Name;
|
||||
|
||||
$('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item));
|
||||
|
||||
Dashboard.setPageTitle(name);
|
||||
|
||||
$('#itemName', page).html(name);
|
||||
|
||||
renderDetails(page, item);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
function renderDetails(page, item) {
|
||||
|
||||
LibraryBrowser.renderOverview($('#itemOverview', page), item);
|
||||
|
||||
if (item.CommunityRating) {
|
||||
$('#itemCommunityRating', page).html(LibraryBrowser.getStarRatingHtml(item)).show().attr('title', item.CommunityRating);
|
||||
} else {
|
||||
$('#itemCommunityRating', page).hide();
|
||||
}
|
||||
|
||||
$('#itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
|
||||
|
||||
LibraryBrowser.renderGenres($('#itemGenres', page), item, "games");
|
||||
LibraryBrowser.renderStudios($('#itemStudios', page), item, "games");
|
||||
renderUserDataIcons(page, item);
|
||||
LibraryBrowser.renderLinks($('#itemLinks', page), item);
|
||||
}
|
||||
|
||||
function renderUserDataIcons(page, item) {
|
||||
$('#itemRatings', page).html(LibraryBrowser.getUserDataIconsHtml(item));
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#gamesystemPage", function () {
|
||||
reload(this);
|
||||
});
|
||||
|
||||
|
||||
})(jQuery, document, LibraryBrowser);
|
@ -126,6 +126,12 @@
|
||||
if (context == "music" && item.Type == "Artist") {
|
||||
$('#artistTabs', page).show();
|
||||
}
|
||||
if (context == "games" && item.Type == "Genre") {
|
||||
$('#gameGenreTabs', page).show();
|
||||
}
|
||||
if (context == "games" && item.Type == "Studio") {
|
||||
$('#gameStudioTabs', page).show();
|
||||
}
|
||||
}
|
||||
|
||||
function renderTabs(page, item) {
|
||||
|
@ -163,6 +163,12 @@
|
||||
|
||||
html += '<p class="itemMiscInfo">' + childText + '</p>';
|
||||
}
|
||||
else if (item.Type == "GamePlatform") {
|
||||
|
||||
childText = item.ChildCount == 1 ? "1 Game" : item.ChildCount + " Games";
|
||||
|
||||
html += '<p class="itemMiscInfo">' + childText + '</p>';
|
||||
}
|
||||
else if (item.Type == "MusicAlbum") {
|
||||
|
||||
childText = item.ChildCount == 1 ? "1 Song" : item.ChildCount + " Songs";
|
||||
@ -299,6 +305,9 @@
|
||||
if (item.Type == "MusicAlbum") {
|
||||
return "itemdetails.html?id=" + id;
|
||||
}
|
||||
if (item.Type == "GamePlatform") {
|
||||
return "itemdetails.html?id=" + id;
|
||||
}
|
||||
if (item.Type == "Genre") {
|
||||
return "itembynamedetails.html?genre=" + encodeName(item.Name) + "&context=" + itemByNameContext;
|
||||
}
|
||||
@ -425,7 +434,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
html += '<a class="posterItem ' + options.shape + 'PosterItem" href="' + LibraryBrowser.getHref(item, options.context) + '">';
|
||||
|
||||
var cssClass = "posterItem";
|
||||
|
||||
if (options.transparent) {
|
||||
cssClass += " transparentPosterItem";
|
||||
}
|
||||
|
||||
cssClass += ' ' + options.shape + 'PosterItem';
|
||||
|
||||
html += '<a class="' + cssClass + '" href="' + LibraryBrowser.getHref(item, options.context) + '">';
|
||||
|
||||
var style = "";
|
||||
|
||||
@ -1093,7 +1111,7 @@
|
||||
else {
|
||||
url = "css/images/items/detail/video.png";
|
||||
useBackgroundColor = true;
|
||||
maxwidth = 150;
|
||||
maxwidth = 150;p
|
||||
}
|
||||
|
||||
if (url) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.87" targetFramework="net45" />
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.88" targetFramework="net45" />
|
||||
<package id="ServiceStack.Common" version="3.9.43" targetFramework="net45" />
|
||||
<package id="ServiceStack.Text" version="3.9.43" targetFramework="net45" />
|
||||
</packages>
|
Loading…
Reference in New Issue
Block a user