mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added next up page
This commit is contained in:
parent
2d457fa05a
commit
73f76874bd
12 changed files with 80 additions and 64 deletions
|
@ -19,7 +19,7 @@
|
|||
if (item.IndexNumber != null) {
|
||||
name = item.IndexNumber + " - " + name;
|
||||
}
|
||||
if (item.ParentIndexNumber != null) {
|
||||
if (item.ParentIndexNumber != null && item.Type != "Episode") {
|
||||
name = item.ParentIndexNumber + "." + name;
|
||||
}
|
||||
|
||||
|
@ -30,30 +30,41 @@
|
|||
$('#itemName', page).html(name);
|
||||
|
||||
if (item.AlbumArtist && item.Type == "Audio") {
|
||||
$('#albumArtist', page).html('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a>').show().trigger('create');
|
||||
$('#grandParentName', page).html('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a>').show().trigger('create');
|
||||
}
|
||||
else if (item.AlbumArtist && item.Type == "MusicAlbum") {
|
||||
$('#grandParentName', page).html('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a>').show().trigger('create');
|
||||
}
|
||||
else if (item.SeriesName && item.Type == "Episode") {
|
||||
|
||||
$('#grandParentName', page).html('<a class="detailPageParentLink" href="itemdetails.html?id=' + item.SeriesId + '">' + item.SeriesName + '</a>').show().trigger('create');
|
||||
}
|
||||
else {
|
||||
$('#albumArtist', page).hide();
|
||||
$('#grandParentName', page).hide();
|
||||
}
|
||||
|
||||
if (item.SeriesName) {
|
||||
if (item.SeriesName && item.Type == "Season") {
|
||||
|
||||
$('#seriesName', page).html('<a class="detailPageParentLink" href="itemdetails.html?id=' + item.SeriesId + '">' + item.SeriesName + '</a>').show().trigger('create');
|
||||
$('#parentName', page).html('<a class="detailPageParentLink" href="itemdetails.html?id=' + item.SeriesId + '">' + item.SeriesName + '</a>').show().trigger('create');
|
||||
}
|
||||
else if (item.ParentIndexNumber && item.Type == "Episode") {
|
||||
|
||||
$('#parentName', page).html('<a class="detailPageParentLink" href="itemdetails.html?id=' + item.ParentId + '">Season ' + item.ParentIndexNumber + '</a>').show().trigger('create');
|
||||
}
|
||||
else if (item.Album && item.Type == "Audio" && item.ParentId) {
|
||||
$('#seriesName', page).html('<a class="detailPageParentLink" href="itemdetails.html?id=' + item.ParentId + '">' + item.Album + '</a>').show().trigger('create');
|
||||
$('#parentName', page).html('<a class="detailPageParentLink" href="itemdetails.html?id=' + item.ParentId + '">' + item.Album + '</a>').show().trigger('create');
|
||||
|
||||
}
|
||||
else if (item.AlbumArtist && item.Type == "MusicAlbum") {
|
||||
$('#albumArtist', page).html('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a>').show().trigger('create');
|
||||
$('#grandParentName', page).html('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a>').show().trigger('create');
|
||||
|
||||
}
|
||||
else if (item.Album) {
|
||||
$('#seriesName', page).html(item.Album).show();
|
||||
$('#parentName', page).html(item.Album).show();
|
||||
|
||||
}
|
||||
else {
|
||||
$('#seriesName', page).hide();
|
||||
$('#parentName', page).hide();
|
||||
}
|
||||
|
||||
var context = getContext(item);
|
||||
|
@ -68,7 +79,7 @@
|
|||
$('#playButtonShadow', page).hide();
|
||||
}
|
||||
|
||||
$(".autoNumeric").autoNumeric('init');
|
||||
$(".autoNumeric").autoNumeric('init');
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// The base query options
|
||||
var query = {
|
||||
|
||||
SortBy: "Artist,Album,SortName",
|
||||
SortBy: "Album,SortName",
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "Audio",
|
||||
Recursive: true,
|
||||
|
|
|
@ -1,64 +1,63 @@
|
|||
(function ($, document) {
|
||||
|
||||
$(document).on('pagebeforeshow', "#tvRecommendedPage", function () {
|
||||
$(document).on('pagebeforeshow', "#tvRecommendedPage", function () {
|
||||
|
||||
var page = this;
|
||||
var page = this;
|
||||
|
||||
var options = {
|
||||
var options = {
|
||||
|
||||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Limit: 6,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo",
|
||||
Filters: "IsUnplayed"
|
||||
};
|
||||
SortBy: "DateCreated",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Limit: 6,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo",
|
||||
Filters: "IsUnplayed"
|
||||
};
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
showNewIndicator: false,
|
||||
shape: "backdrop",
|
||||
showTitle: true,
|
||||
showParentTitle: true
|
||||
}));
|
||||
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
showNewIndicator: false,
|
||||
shape: "backdrop",
|
||||
showTitle: true,
|
||||
showParentTitle: true
|
||||
}));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
options = {
|
||||
|
||||
options = {
|
||||
SortBy: "DatePlayed",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Filters: "IsResumable",
|
||||
Limit: 6,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated"
|
||||
};
|
||||
|
||||
SortBy: "DatePlayed",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Episode",
|
||||
Filters: "IsResumable",
|
||||
Limit: 6,
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated"
|
||||
};
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
||||
if (result.Items.length) {
|
||||
$('#resumableSection', page).show();
|
||||
} else {
|
||||
$('#resumableSection', page).hide();
|
||||
}
|
||||
|
||||
if (result.Items.length) {
|
||||
$('#resumableSection', page).show();
|
||||
} else {
|
||||
$('#resumableSection', page).hide();
|
||||
}
|
||||
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
shape: "backdrop",
|
||||
showTitle: true,
|
||||
showParentTitle: true
|
||||
}));
|
||||
|
||||
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
shape: "backdrop",
|
||||
showTitle: true,
|
||||
showParentTitle: true
|
||||
}));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
})(jQuery, document);
|
Loading…
Add table
Add a link
Reference in a new issue