mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
implement series searching
This commit is contained in:
parent
db9295a65d
commit
09618fa0a9
3 changed files with 85 additions and 12 deletions
|
@ -53,6 +53,10 @@
|
|||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
display: block;
|
||||
|
||||
/* For the box shadow so that the bottom border isnt underneath the text */
|
||||
z-index: 100000;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.remotePosterImage {
|
||||
|
@ -119,7 +123,6 @@
|
|||
.searchImageContainer .remoteImageDetails {
|
||||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@media all and (min-width: 500px) {
|
||||
|
@ -172,6 +175,12 @@
|
|||
padding: 0 0 1em 0;
|
||||
}
|
||||
|
||||
.remoteImage:hover, .searchImageContainer:hover {
|
||||
-moz-box-shadow: 0 0 12px 7px #38c;
|
||||
-webkit-box-shadow: 0 0 12px 7px #38c;
|
||||
box-shadow: 0 0 12px 7px #38c;
|
||||
}
|
||||
|
||||
@media all and (min-width: 600px) {
|
||||
|
||||
.popupIdentify {
|
||||
|
@ -294,11 +303,41 @@
|
|||
}
|
||||
}
|
||||
|
||||
.popupIdentifyForm, .identificationSearchResults {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
||||
@media all and (min-height: 500px) {
|
||||
|
||||
.popupIdentifyForm, .identificationSearchResults {
|
||||
height: 350px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-height: 600px) {
|
||||
|
||||
.popupIdentifyForm, .identificationSearchResults {
|
||||
height: 450px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-height: 700px) {
|
||||
|
||||
.popupIdentifyForm, .identificationSearchResults {
|
||||
height: 550px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-height: 800px) {
|
||||
|
||||
.availableImagesList {
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.popupIdentifyForm, .identificationSearchResults {
|
||||
height: 600px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-height: 900px) {
|
||||
|
@ -306,4 +345,8 @@
|
|||
.availableImagesList {
|
||||
height: 700px;
|
||||
}
|
||||
|
||||
.popupIdentifyForm, .identificationSearchResults {
|
||||
height: 700px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -382,7 +382,7 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<div data-role="popup" data-transition="slidefade" class="popupIdentify" class="popup" data-theme="a">
|
||||
<div data-role="popup" data-transition="slidefade" class="popupIdentify popup" data-theme="a">
|
||||
|
||||
<div class="ui-bar-a" style="text-align: center; padding: 0 20px; position: relative;">
|
||||
|
||||
|
@ -396,6 +396,8 @@
|
|||
|
||||
<form class="popupIdentifyForm" style="max-width: initial;">
|
||||
|
||||
<p>Enter one or more search criteria.</p>
|
||||
|
||||
<div>
|
||||
<label for="txtLookupName">Name:</label>
|
||||
<input type="text" id="txtLookupName" data-mini="true" class="identifyField" data-lookup="Name" />
|
||||
|
|
|
@ -280,7 +280,7 @@
|
|||
$('#fldYear', page).show();
|
||||
}
|
||||
|
||||
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "AdultVideo" || item.Type == "Series" || item.Type == "Game" || item.Type == "BoxSet" || item.Type == "Person") {
|
||||
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "AdultVideo" || item.Type == "Series" || item.Type == "Game" || item.Type == "BoxSet" || item.Type == "Person" || item.Type == "Book") {
|
||||
$('#btnIdentify', page).show();
|
||||
} else {
|
||||
$('#btnIdentify', page).hide();
|
||||
|
@ -958,11 +958,17 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (currentItem.GameSystem) {
|
||||
lookupInfo.GameSystem = currentItem.GameSystem;
|
||||
}
|
||||
|
||||
lookupInfo = {
|
||||
SearchInfo: lookupInfo,
|
||||
IncludeDisabledProviders: true
|
||||
};
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ApiClient.getUrl("Items/RemoteSearch/" + currentItem.Type),
|
||||
|
@ -971,6 +977,7 @@
|
|||
|
||||
}).done(function (results) {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
showIdentificationSearchResults(page, results);
|
||||
});
|
||||
}
|
||||
|
@ -987,7 +994,6 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
|
||||
for (var i = 0, length = results.length; i < length; i++) {
|
||||
|
||||
var result = results[i];
|
||||
|
@ -1009,7 +1015,7 @@
|
|||
if (result.ImageUrl) {
|
||||
var displayUrl = getSearchImageDisplayUrl(result.ImageUrl, result.SearchProviderName);
|
||||
|
||||
html += '<a href="#" class="searchImage" style="background-image:url(\'' + displayUrl + '\');">';
|
||||
html += '<a href="#" class="searchImage" data-index="' + i + '" style="background-image:url(\'' + displayUrl + '\');">';
|
||||
} else {
|
||||
|
||||
html += '<a href="#" class="searchImage" style="background-image:url(\'css/images/items/list/remotesearch.png\');background-position: center center;">';
|
||||
|
@ -1024,12 +1030,34 @@
|
|||
html += result.ProductionYear || ' ';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div><button class="btnSelectSearchResult" type="button" data-icon="check" data-mini="true">Select</button></div>';
|
||||
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
$('.identificationSearchResultList', page).html(html).trigger('create');
|
||||
var elem = $('.identificationSearchResultList', page).html(html).trigger('create');
|
||||
|
||||
$('.searchImage', elem).on('click', function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var index = parseInt(this.getAttribute('data-index'));
|
||||
|
||||
var currentResult = results[index];
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: ApiClient.getUrl("Items/RemoteSearch/Apply/" + currentItem.Id),
|
||||
data: JSON.stringify(currentResult),
|
||||
contentType: "application/json"
|
||||
|
||||
}).done(function () {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
$('.popupIdentify', page).popup('close');
|
||||
|
||||
reload(page);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#editItemMetadataPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue