1
0
Fork 0
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:
Luke Pulverenti 2013-11-28 13:27:29 -05:00
parent f5b62182b5
commit 878bad724a
20 changed files with 103 additions and 72 deletions

View file

@ -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) { self.getSimilarMovies = function (itemId, options) {
var url = self.getUrl("Movies/" + itemId + "/Similar", 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

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Before After
Before After

View file

@ -27,7 +27,6 @@
.viewMenuBar { .viewMenuBar {
background: #444; background: #444;
background-image: linear-gradient(#444,#2d2d2d); background-image: linear-gradient(#444,#2d2d2d);
font-size: 13px;
font-weight: bold; font-weight: bold;
position: fixed; position: fixed;
right: 0; right: 0;
@ -35,6 +34,7 @@
z-index: 1000; z-index: 1000;
top: 0; top: 0;
border-bottom: 1px solid #111; border-bottom: 1px solid #111;
font-size: 13px;
} }
.viewSummary { .viewSummary {
@ -47,6 +47,7 @@
padding: 7px .5em 6px; padding: 7px .5em 6px;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
font-family: Arial;
} }
.viewMenuLink:hover { .viewMenuLink:hover {
@ -348,7 +349,6 @@ a.itemTag:hover {
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
font-size: 13px;
background-color: rgba(0,0,0,0.7); background-color: rgba(0,0,0,0.7);
} }
@ -421,7 +421,7 @@ a.itemTag:hover {
color: #000!important; color: #000!important;
} }
.itemName { .inlineItemName {
font-size: 22px; font-size: 22px;
} }
@ -782,8 +782,6 @@ a.itemTag:hover {
.userDataIcons .itemProgressText { .userDataIcons .itemProgressText {
vertical-align: top; vertical-align: top;
position: relative;
top: 3px;
margin-right: 1.5em; margin-right: 1.5em;
} }
@ -794,7 +792,6 @@ a.itemTag:hover {
} }
.itemProgressText { .itemProgressText {
font-size: 12px;
color: #ddd; color: #ddd;
vertical-align: middle; vertical-align: middle;
} }

View file

@ -72,6 +72,11 @@
height: 180px; height: 180px;
} }
/* Fixes button running outside of list */
.btnRemoveFromEditorList .ui-btn-inner {
padding-right: 0!important;
}
@media all and (min-width: 500px) { @media all and (min-width: 500px) {
.availableImagesList { .availableImagesList {
@ -132,6 +137,14 @@
margin: .5em 0; margin: .5em 0;
} }
.editorTile .tileContent{
color: #000;
}
.editorTile .ui-field-contain{
margin: 0 0 .5em;
}
@media all and (min-width: 700px) { @media all and (min-width: 700px) {
.availableImagesList { .availableImagesList {

View file

@ -6,7 +6,7 @@
.txtSearch { .txtSearch {
vertical-align: middle; vertical-align: middle;
font: 13px arial,sans-serif; font-size: 14px;
margin: 0 .15em 0 0; margin: 0 .15em 0 0;
width: 80px; width: 80px;
padding: 0; padding: 0;
@ -96,7 +96,7 @@
} }
.searchHintSecondaryText { .searchHintSecondaryText {
font-size: 11px; font-size: 12px;
color: #999; color: #999;
margin-top: 3px; margin-top: 3px;
white-space: nowrap; white-space: nowrap;

View file

@ -1,29 +1,29 @@
@font-face { @font-face {
font-family: "Open Sans"; 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-style: normal; font-style: normal;
font-weight: 300; 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-face {
font-family: "Open Sans"; 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-style: normal; font-style: normal;
font-weight: 400; 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; font-size: 20pt;
} }
.libraryPage:not(.metadataEditorPage) h1 a { h1 a {
font-weight: 200!important; font-weight: 300!important;
text-decoration: none; text-decoration: none;
}
.libraryPage:not(.metadataEditorPage) h1 a {
color: #fff!important; color: #fff!important;
} }
@ -1004,7 +1007,7 @@ input[type="range"]::-ms-fill-upper {
} }
.mediaFlyoutOptionSecondaryText { .mediaFlyoutOptionSecondaryText {
font-size: 11px; font-size: 12px;
color: #999; color: #999;
margin-top: 3px; margin-top: 3px;
white-space: nowrap; white-space: nowrap;

View file

@ -37,7 +37,7 @@
</div> </div>
<div style="display: inline-block; vertical-align: bottom;"> <div style="display: inline-block; vertical-align: bottom;">
<div class="fldRefresh" style="display: none;"> <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> </div>
<div style="display: inline-block; vertical-align: bottom;"> <div style="display: inline-block; vertical-align: bottom;">
@ -152,7 +152,7 @@
<option value='Saturday'>Saturday</option> <option value='Saturday'>Saturday</option>
<option value='Sunday'>Sunday</option> <option value='Sunday'>Sunday</option>
</select> </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> </div>
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listAirDays"></ul> <ul data-role="listview" data-inset="true" data-split-icon="delete" id="listAirDays"></ul>
</div> </div>
@ -291,7 +291,7 @@
<div data-role="editableListviewContainer"> <div data-role="editableListviewContainer">
<div data-role="fieldcontain"> <div data-role="fieldcontain">
<input type="text" data-mini="true" /> <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> </div>
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listGenres"></ul> <ul data-role="listview" data-inset="true" data-split-icon="delete" id="listGenres"></ul>
</div> </div>
@ -301,7 +301,7 @@
<div data-role="editableListviewContainer"> <div data-role="editableListviewContainer">
<div data-role="fieldcontain"> <div data-role="fieldcontain">
<input type="text" data-mini="true" /> <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> </div>
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listStudios"></ul> <ul data-role="listview" data-inset="true" data-split-icon="delete" id="listStudios"></ul>
</div> </div>
@ -311,7 +311,7 @@
<div data-role="editableListviewContainer"> <div data-role="editableListviewContainer">
<div data-role="fieldcontain"> <div data-role="fieldcontain">
<input type="text" data-mini="true" /> <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> </div>
<ul data-role="listview" data-inset="true" data-split-icon="delete" id="listTags"></ul> <ul data-role="listview" data-inset="true" data-split-icon="delete" id="listTags"></ul>
</div> </div>

View file

@ -21,7 +21,7 @@
<a href="#" data-role="button" id="btnEditImages">Images</a> <a href="#" data-role="button" id="btnEditImages">Images</a>
</div> </div>
<div id="divAddPerson" style="display: none;"> <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>
<div class="itemsContainer" id="peopleContainer" style="text-align: left;"></div> <div class="itemsContainer" id="peopleContainer" style="text-align: left;"></div>
</div> </div>

View file

@ -123,7 +123,7 @@
<div id="itemImage" class="itemImageContainer"></div> <div id="itemImage" class="itemImageContainer"></div>
</td> </td>
<td style="vertical-align: top; padding: 0;"> <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> <p>
<span class="itemCommunityRating"></span> <span class="itemCommunityRating"></span>
<span class="userDataIcons" style="margin-left: 2em;"></span> <span class="userDataIcons" style="margin-left: 2em;"></span>

View file

@ -114,7 +114,7 @@
</div> </div>
</td> </td>
<td style="vertical-align: top; padding: 0; position: relative;"> <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> <p>
<span class="itemCommunityRating"></span> <span class="itemCommunityRating"></span>
<span class="userDataIcons" style="margin-left: 2em;"></span> <span class="userDataIcons" style="margin-left: 2em;"></span>

View file

@ -32,7 +32,7 @@
<div id="divVirtualFolders"></div> <div id="divVirtualFolders"></div>
</div> </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> <p>Configure <b>images</b> and <b>sort orders</b> by <a href="itemlist.html">browsing and editing.</a></p>
</div> </div>
</div> </div>

View file

@ -19,7 +19,7 @@
<div id="itemImage" class="itemImageContainer"></div> <div id="itemImage" class="itemImageContainer"></div>
</td> </td>
<td style="vertical-align: top; padding: 0;"> <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 class="itemChannelNumber"></p>
<p style="margin: 2em 0;"> <p style="margin: 2em 0;">
<span class="userDataIcons"></span> <span class="userDataIcons"></span>

View file

@ -509,21 +509,32 @@
var promise; 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() userId: Dashboard.getCurrentUserId()
}); });
} }
else if (item.Type == "Season" && item.IndexNumber != null) {
else if (item.Type == "Series" || item.Type == "Season") { if (item.IndexNumber == null) {
if (!user.Configuration.DisplayMissingEpisodes) {
query.IsMissing = false; // If there's no known season number, just use generic folder browsing
} if (!user.Configuration.DisplayMissingEpisodes) {
if (!user.Configuration.DisplayUnairedEpisodes) { query.IsMissing = false;
query.IsVirtualUnaired = false; }
if (!user.Configuration.DisplayUnairedEpisodes) {
query.IsVirtualUnaired = false;
}
} else {
// Use dedicated episodes endpoint
promise = ApiClient.getEpisodes(item.SeriesId, {
season: item.IndexNumber,
userId: Dashboard.getCurrentUserId()
});
} }
} }
@ -607,7 +618,7 @@
var html = ''; var html = '';
var reviews = result.ItemReviews; var reviews = result.Items;
for (var i = 0, length = reviews.length; i < length; i++) { for (var i = 0, length = reviews.length; i < length; i++) {

View file

@ -151,18 +151,12 @@
if (node == '-1') { if (node == '-1') {
callback({ attr: { id: 'root', rel: 'folder', itemtype: 'root' }, data: 'Root', state: 'open' }); loadChildrenOfRootNode(callback);
return; return;
} }
var id = node.attr("id"); var id = node.attr("id");
if (id == 'root') {
loadChildrenOfRootNode(callback);
return;
}
if (id == 'livetv') { if (id == 'livetv') {
loadLiveTvServices(openItems, callback); loadLiveTvServices(openItems, callback);
@ -989,7 +983,7 @@
} }
var html = ''; var html = '';
for (var i = 0; i < items.length; i++) { 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'); list.html(html).listview('refresh');
} }

View file

@ -47,7 +47,7 @@
} }
function constructPerson(item, person) { function constructPerson(item, person) {
var html = '<div class="tileItem posterTileItem">'; var html = '<div class="tileItem posterTileItem editorTile">';
var imgUrl; var imgUrl;
var name = person.Name || ""; var name = person.Name || "";
var role = person.Role || ""; var role = person.Role || "";
@ -94,7 +94,7 @@
if (item.LocationType !== "Offline") { if (item.LocationType !== "Offline") {
html += '<span class="read">'; 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>'; html += '</span>';
} }

View file

@ -1504,7 +1504,7 @@
itemId = item.Name; 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) { 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;" />'; 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 { } else {

View file

@ -644,6 +644,8 @@ var Dashboard = {
} }
} }
html += '<a href="edititemmetadata.html" style="margin-top: .5em;">Metadata Manager</a>';
// collapsible // collapsible
html += '</div>'; html += '</div>';
@ -1122,7 +1124,7 @@ var Dashboard = {
return parts.join(':'); return parts.join(':');
}, },
ratePackage: function(link) { ratePackage: function (link) {
var id = link.getAttribute('data-id'); var id = link.getAttribute('data-id');
var name = link.getAttribute('data-name'); var name = link.getAttribute('data-name');
var rating = link.getAttribute('data-rating'); var rating = link.getAttribute('data-rating');
@ -1132,18 +1134,18 @@ var Dashboard = {
header: "Rate and review " + name, header: "Rate and review " + name,
id: id, id: id,
rating: rating, rating: rating,
callback: function(review) { callback: function (review) {
console.log(review); console.log(review);
dialog.close(); dialog.close();
ApiClient.createPackageReview(review).done(function() { ApiClient.createPackageReview(review).done(function () {
Dashboard.alert("Thank you for your review"); 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'>"; var html = "<div style='margin-left: 5px; margin-right: 5px; display: inline-block'>";
if (!rating) rating = 0; if (!rating) rating = 0;

View file

@ -23,7 +23,7 @@
</p> </p>
<div id="divVirtualFolders"></div> <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>
<div data-role="popup" id="popupEnterText" class="ui-corner-all popup"> <div data-role="popup" id="popupEnterText" class="ui-corner-all popup">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <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.Common" version="3.9.62" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.62" targetFramework="net45" /> <package id="ServiceStack.Text" version="3.9.62" targetFramework="net45" />
</packages> </packages>