mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add specialized get seasons method
This commit is contained in:
parent
f5b62182b5
commit
878bad724a
20 changed files with 103 additions and 72 deletions
11
ApiClient.js
11
ApiClient.js
|
@ -575,6 +575,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
});
|
||||
};
|
||||
|
||||
self.getSeasons = function (itemId, options) {
|
||||
|
||||
var url = self.getUrl("Shows/" + itemId + "/Seasons", options);
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
self.getSimilarMovies = function (itemId, options) {
|
||||
|
||||
var url = self.getUrl("Movies/" + itemId + "/Similar", options);
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3 KiB |
|
@ -27,7 +27,6 @@
|
|||
.viewMenuBar {
|
||||
background: #444;
|
||||
background-image: linear-gradient(#444,#2d2d2d);
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
|
@ -35,6 +34,7 @@
|
|||
z-index: 1000;
|
||||
top: 0;
|
||||
border-bottom: 1px solid #111;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.viewSummary {
|
||||
|
@ -47,6 +47,7 @@
|
|||
padding: 7px .5em 6px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
.viewMenuLink:hover {
|
||||
|
@ -348,7 +349,6 @@ a.itemTag:hover {
|
|||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
font-size: 13px;
|
||||
background-color: rgba(0,0,0,0.7);
|
||||
}
|
||||
|
||||
|
@ -421,7 +421,7 @@ a.itemTag:hover {
|
|||
color: #000!important;
|
||||
}
|
||||
|
||||
.itemName {
|
||||
.inlineItemName {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
|
@ -782,8 +782,6 @@ a.itemTag:hover {
|
|||
|
||||
.userDataIcons .itemProgressText {
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
|
@ -794,7 +792,6 @@ a.itemTag:hover {
|
|||
}
|
||||
|
||||
.itemProgressText {
|
||||
font-size: 12px;
|
||||
color: #ddd;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
|
|
@ -72,6 +72,11 @@
|
|||
height: 180px;
|
||||
}
|
||||
|
||||
/* Fixes button running outside of list */
|
||||
.btnRemoveFromEditorList .ui-btn-inner {
|
||||
padding-right: 0!important;
|
||||
}
|
||||
|
||||
@media all and (min-width: 500px) {
|
||||
|
||||
.availableImagesList {
|
||||
|
@ -132,6 +137,14 @@
|
|||
margin: .5em 0;
|
||||
}
|
||||
|
||||
.editorTile .tileContent{
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.editorTile .ui-field-contain{
|
||||
margin: 0 0 .5em;
|
||||
}
|
||||
|
||||
@media all and (min-width: 700px) {
|
||||
|
||||
.availableImagesList {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
.txtSearch {
|
||||
vertical-align: middle;
|
||||
font: 13px arial,sans-serif;
|
||||
font-size: 14px;
|
||||
margin: 0 .15em 0 0;
|
||||
width: 80px;
|
||||
padding: 0;
|
||||
|
@ -96,7 +96,7 @@
|
|||
}
|
||||
|
||||
.searchHintSecondaryText {
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
margin-top: 3px;
|
||||
white-space: nowrap;
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
@font-face {
|
||||
font-family: "Open Sans";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local("Open Sans Bold"), local("OpenSans-Bold"), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/k3k702ZOKiLJc3WVjuplzJ1r3JsPcQLi8jytr04NNhU.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Open Sans";
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: local("Open Sans Light"), local("OpenSans-Light"), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTZ1r3JsPcQLi8jytr04NNhU.woff) format('woff');
|
||||
src: local('Open Sans Light'), local('OpenSans-Light'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTXhCUOGz7vYGh680lGh-uXM.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Open Sans";
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
src: local("Open Sans Extrabold"), local("OpenSans-Extrabold"), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/EInbV5DfGHOiMmvb1Xr-hp1r3JsPcQLi8jytr04NNhU.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Open Sans";
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local("Open Sans"), local("OpenSans"), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/K88pR3goAWT7BTt32Z01mz8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
|
||||
src: local('Open Sans'), local('OpenSans'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
src: local('Open Sans Extrabold'), local('OpenSans-Extrabold'), url(http://themes.googleusercontent.com/static/fonts/opensans/v6/EInbV5DfGHOiMmvb1Xr-hnhCUOGz7vYGh680lGh-uXM.woff) format('woff');
|
||||
}
|
||||
|
||||
* {
|
||||
|
@ -68,9 +68,12 @@ h2 {
|
|||
font-size: 20pt;
|
||||
}
|
||||
|
||||
.libraryPage:not(.metadataEditorPage) h1 a {
|
||||
font-weight: 200!important;
|
||||
h1 a {
|
||||
font-weight: 300!important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.libraryPage:not(.metadataEditorPage) h1 a {
|
||||
color: #fff!important;
|
||||
}
|
||||
|
||||
|
@ -1004,7 +1007,7 @@ input[type="range"]::-ms-fill-upper {
|
|||
}
|
||||
|
||||
.mediaFlyoutOptionSecondaryText {
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
margin-top: 3px;
|
||||
white-space: nowrap;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
</div>
|
||||
<div style="display: inline-block; vertical-align: bottom;">
|
||||
<div class="fldRefresh" style="display: none;">
|
||||
<button id="btnRefresh" type="button" data-icon="refresh" data-mini="true" data-inline="true">Refresh</button>
|
||||
<button id="btnRefresh" type="button" data-icon="refresh" data-mini="true" data-inline="true">Full Metadata Refresh</button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: inline-block; vertical-align: bottom;">
|
||||
|
@ -152,7 +152,7 @@
|
|||
<option value='Saturday'>Saturday</option>
|
||||
<option value='Sunday'>Sunday</option>
|
||||
</select>
|
||||
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" onclick="EditItemMetadataPage.addElementToEditableListview(this,EditItemMetadataPage.sortDaysOfTheWeek)">Add</a>
|
||||
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this,EditItemMetadataPage.sortDaysOfTheWeek)">Add</a>
|
||||
</div>
|
||||
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listAirDays"></ul>
|
||||
</div>
|
||||
|
@ -291,7 +291,7 @@
|
|||
<div data-role="editableListviewContainer">
|
||||
<div data-role="fieldcontain">
|
||||
<input type="text" data-mini="true" />
|
||||
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" onclick="EditItemMetadataPage.addElementToEditableListview(this)">Add</a>
|
||||
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this)">Add</a>
|
||||
</div>
|
||||
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listGenres"></ul>
|
||||
</div>
|
||||
|
@ -301,7 +301,7 @@
|
|||
<div data-role="editableListviewContainer">
|
||||
<div data-role="fieldcontain">
|
||||
<input type="text" data-mini="true" />
|
||||
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" onclick="EditItemMetadataPage.addElementToEditableListview(this)">Add</a>
|
||||
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this)">Add</a>
|
||||
</div>
|
||||
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listStudios"></ul>
|
||||
</div>
|
||||
|
@ -311,7 +311,7 @@
|
|||
<div data-role="editableListviewContainer">
|
||||
<div data-role="fieldcontain">
|
||||
<input type="text" data-mini="true" />
|
||||
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" onclick="EditItemMetadataPage.addElementToEditableListview(this)">Add</a>
|
||||
<a data-role="button" data-theme="b" data-inline="true" data-mini="true" data-icon="plus" data-iconpos="notext" onclick="EditItemMetadataPage.addElementToEditableListview(this)">Add</a>
|
||||
</div>
|
||||
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listTags"></ul>
|
||||
</div>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<a href="#" data-role="button" id="btnEditImages">Images</a>
|
||||
</div>
|
||||
<div id="divAddPerson" style="display: none;">
|
||||
<button type="button" data-icon="plus" data-inline="true" onclick="EditItemPeoplePage.addPerson();">Add Person</button>
|
||||
<button type="button" data-icon="plus" data-inline="true" data-mini="true" onclick="EditItemPeoplePage.addPerson();">Add Person</button>
|
||||
</div>
|
||||
<div class="itemsContainer" id="peopleContainer" style="text-align: left;"></div>
|
||||
</div>
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
<div id="itemImage" class="itemImageContainer"></div>
|
||||
</td>
|
||||
<td style="vertical-align: top; padding: 0;">
|
||||
<p><span class="itemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p>
|
||||
<p><span class="itemName inlineItemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p>
|
||||
<p>
|
||||
<span class="itemCommunityRating"></span>
|
||||
<span class="userDataIcons" style="margin-left: 2em;"></span>
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
</div>
|
||||
</td>
|
||||
<td style="vertical-align: top; padding: 0; position: relative;">
|
||||
<p><span class="itemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p>
|
||||
<p><span class="itemName inlineItemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p>
|
||||
<p>
|
||||
<span class="itemCommunityRating"></span>
|
||||
<span class="userDataIcons" style="margin-left: 2em;"></span>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<div id="divVirtualFolders"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p>Read <a href="https://github.com/MediaBrowser/MediaBrowser/wiki/Library-Structure" target="_blank">media library wiki.</a></p>
|
||||
<p>Refer to <a href="https://github.com/MediaBrowser/MediaBrowser/wiki/Library-Structure" target="_blank">media library wiki.</a></p>
|
||||
<p>Configure <b>images</b> and <b>sort orders</b> by <a href="itemlist.html">browsing and editing.</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div id="itemImage" class="itemImageContainer"></div>
|
||||
</td>
|
||||
<td style="vertical-align: top; padding: 0;">
|
||||
<p><span class="itemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p>
|
||||
<p><span class="itemName inlineItemName"></span><span class="itemMiscInfo" style="display: inline;"></span></p>
|
||||
<p class="itemChannelNumber"></p>
|
||||
<p style="margin: 2em 0;">
|
||||
<span class="userDataIcons"></span>
|
||||
|
|
|
@ -509,22 +509,33 @@
|
|||
|
||||
var promise;
|
||||
|
||||
if (item.Type == "Season" && item.IndexNumber != null) {
|
||||
if (item.Type == "Series") {
|
||||
|
||||
promise = ApiClient.getEpisodes(item.SeriesId, {
|
||||
promise = ApiClient.getSeasons(item.Id, {
|
||||
|
||||
season: item.IndexNumber,
|
||||
userId: Dashboard.getCurrentUserId()
|
||||
});
|
||||
}
|
||||
else if (item.Type == "Season" && item.IndexNumber != null) {
|
||||
|
||||
else if (item.Type == "Series" || item.Type == "Season") {
|
||||
if (item.IndexNumber == null) {
|
||||
|
||||
// If there's no known season number, just use generic folder browsing
|
||||
if (!user.Configuration.DisplayMissingEpisodes) {
|
||||
query.IsMissing = false;
|
||||
}
|
||||
if (!user.Configuration.DisplayUnairedEpisodes) {
|
||||
query.IsVirtualUnaired = false;
|
||||
}
|
||||
} else {
|
||||
|
||||
// Use dedicated episodes endpoint
|
||||
promise = ApiClient.getEpisodes(item.SeriesId, {
|
||||
|
||||
season: item.IndexNumber,
|
||||
userId: Dashboard.getCurrentUserId()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
promise = promise || ApiClient.getItems(Dashboard.getCurrentUserId(), query);
|
||||
|
@ -607,7 +618,7 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
var reviews = result.ItemReviews;
|
||||
var reviews = result.Items;
|
||||
|
||||
for (var i = 0, length = reviews.length; i < length; i++) {
|
||||
|
||||
|
|
|
@ -151,18 +151,12 @@
|
|||
|
||||
if (node == '-1') {
|
||||
|
||||
callback({ attr: { id: 'root', rel: 'folder', itemtype: 'root' }, data: 'Root', state: 'open' });
|
||||
loadChildrenOfRootNode(callback);
|
||||
return;
|
||||
}
|
||||
|
||||
var id = node.attr("id");
|
||||
|
||||
if (id == 'root') {
|
||||
|
||||
loadChildrenOfRootNode(callback);
|
||||
return;
|
||||
}
|
||||
|
||||
if (id == 'livetv') {
|
||||
|
||||
loadLiveTvServices(openItems, callback);
|
||||
|
@ -989,7 +983,7 @@
|
|||
}
|
||||
var html = '';
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
html += '<li><a class="data">' + items[i] + '</a><a href="#" onclick="EditItemMetadataPage.removeElementFromListview(this)"></a></li>';
|
||||
html += '<li data-mini="true"><a class="data">' + items[i] + '</a><a href="#" onclick="EditItemMetadataPage.removeElementFromListview(this)" class="btnRemoveFromEditorList"></a></li>';
|
||||
}
|
||||
list.html(html).listview('refresh');
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
}
|
||||
|
||||
function constructPerson(item, person) {
|
||||
var html = '<div class="tileItem posterTileItem">';
|
||||
var html = '<div class="tileItem posterTileItem editorTile">';
|
||||
var imgUrl;
|
||||
var name = person.Name || "";
|
||||
var role = person.Role || "";
|
||||
|
@ -94,7 +94,7 @@
|
|||
|
||||
if (item.LocationType !== "Offline") {
|
||||
html += '<span class="read">';
|
||||
html += '<button type="button" class="edit" data-mini="true" data-inline="true" onclick="EditItemPeoplePage.displayEdit(this)">Edit</button>';
|
||||
html += '<button type="button" class="edit" data-mini="true" data-inline="true" data-icon="pencil" onclick="EditItemPeoplePage.displayEdit(this)">Edit</button>';
|
||||
html += '</span>';
|
||||
}
|
||||
|
||||
|
|
|
@ -1504,7 +1504,7 @@
|
|||
itemId = item.Name;
|
||||
}
|
||||
|
||||
if ((item.MediaType || item.IsFolder) && item.Type != "Channel") {
|
||||
if ((item.MediaType || item.IsFolder) && item.Type != "Channel" && item.Type != "MusicArtist") {
|
||||
if (userData.Played) {
|
||||
html += '<img data-type="' + type + '" data-itemid="' + itemId + '" class="imgUserItemRating imgPlayed" src="css/images/userdata/playedon.png" alt="Played" title="Played" onclick="LibraryBrowser.markPlayed(this);return false;" />';
|
||||
} else {
|
||||
|
|
|
@ -644,6 +644,8 @@ var Dashboard = {
|
|||
}
|
||||
}
|
||||
|
||||
html += '<a href="edititemmetadata.html" style="margin-top: .5em;">Metadata Manager</a>';
|
||||
|
||||
// collapsible
|
||||
html += '</div>';
|
||||
|
||||
|
@ -1122,7 +1124,7 @@ var Dashboard = {
|
|||
return parts.join(':');
|
||||
},
|
||||
|
||||
ratePackage: function(link) {
|
||||
ratePackage: function (link) {
|
||||
var id = link.getAttribute('data-id');
|
||||
var name = link.getAttribute('data-name');
|
||||
var rating = link.getAttribute('data-rating');
|
||||
|
@ -1132,18 +1134,18 @@ var Dashboard = {
|
|||
header: "Rate and review " + name,
|
||||
id: id,
|
||||
rating: rating,
|
||||
callback: function(review) {
|
||||
callback: function (review) {
|
||||
console.log(review);
|
||||
dialog.close();
|
||||
|
||||
ApiClient.createPackageReview(review).done(function() {
|
||||
ApiClient.createPackageReview(review).done(function () {
|
||||
Dashboard.alert("Thank you for your review");
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getStoreRatingHtml: function(rating, id, name, noLinks) {
|
||||
getStoreRatingHtml: function (rating, id, name, noLinks) {
|
||||
|
||||
var html = "<div style='margin-left: 5px; margin-right: 5px; display: inline-block'>";
|
||||
if (!rating) rating = 0;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</p>
|
||||
<div id="divVirtualFolders"></div>
|
||||
</div>
|
||||
<p>Read <a href="https://github.com/MediaBrowser/MediaBrowser/wiki/Library-Structure" target="_blank">media library wiki.</a></p>
|
||||
<p>Refer to <a href="https://github.com/MediaBrowser/MediaBrowser/wiki/Library-Structure" target="_blank">media library wiki.</a></p>
|
||||
|
||||
<div data-role="popup" id="popupEnterText" class="ui-corner-all popup">
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.200" targetFramework="net45" />
|
||||
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.201" targetFramework="net45" />
|
||||
<package id="ServiceStack.Common" version="3.9.62" targetFramework="net45" />
|
||||
<package id="ServiceStack.Text" version="3.9.62" targetFramework="net45" />
|
||||
</packages>
|
Loading…
Add table
Add a link
Reference in a new issue