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-repeat: no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
||||||
|
/* For the box shadow so that the bottom border isnt underneath the text */
|
||||||
|
z-index: 100000;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.remotePosterImage {
|
.remotePosterImage {
|
||||||
|
@ -119,7 +123,6 @@
|
||||||
.searchImageContainer .remoteImageDetails {
|
.searchImageContainer .remoteImageDetails {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 500px) {
|
@media all and (min-width: 500px) {
|
||||||
|
@ -172,6 +175,12 @@
|
||||||
padding: 0 0 1em 0;
|
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) {
|
@media all and (min-width: 600px) {
|
||||||
|
|
||||||
.popupIdentify {
|
.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) {
|
@media all and (min-height: 800px) {
|
||||||
|
|
||||||
.availableImagesList {
|
.availableImagesList {
|
||||||
height: 600px;
|
height: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.popupIdentifyForm, .identificationSearchResults {
|
||||||
|
height: 600px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-height: 900px) {
|
@media all and (min-height: 900px) {
|
||||||
|
@ -306,4 +345,8 @@
|
||||||
.availableImagesList {
|
.availableImagesList {
|
||||||
height: 700px;
|
height: 700px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.popupIdentifyForm, .identificationSearchResults {
|
||||||
|
height: 700px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -382,7 +382,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</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;">
|
<div class="ui-bar-a" style="text-align: center; padding: 0 20px; position: relative;">
|
||||||
|
|
||||||
|
@ -395,6 +395,8 @@
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
|
|
||||||
<form class="popupIdentifyForm" style="max-width: initial;">
|
<form class="popupIdentifyForm" style="max-width: initial;">
|
||||||
|
|
||||||
|
<p>Enter one or more search criteria.</p>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="txtLookupName">Name:</label>
|
<label for="txtLookupName">Name:</label>
|
||||||
|
|
|
@ -280,7 +280,7 @@
|
||||||
$('#fldYear', page).show();
|
$('#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();
|
$('#btnIdentify', page).show();
|
||||||
} else {
|
} else {
|
||||||
$('#btnIdentify', page).hide();
|
$('#btnIdentify', page).hide();
|
||||||
|
@ -894,7 +894,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#txtLookupName', page).val(item.Name);
|
$('#txtLookupName', page).val(item.Name);
|
||||||
|
|
||||||
if (item.Type == "Person" || item.Type == "BoxSet") {
|
if (item.Type == "Person" || item.Type == "BoxSet") {
|
||||||
|
|
||||||
$('.fldLookupYear', page).hide();
|
$('.fldLookupYear', page).hide();
|
||||||
|
@ -957,12 +957,18 @@
|
||||||
Dashboard.alert('Please enter a name or an external Id.');
|
Dashboard.alert('Please enter a name or an external Id.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (currentItem.GameSystem) {
|
||||||
|
lookupInfo.GameSystem = currentItem.GameSystem;
|
||||||
|
}
|
||||||
|
|
||||||
lookupInfo = {
|
lookupInfo = {
|
||||||
SearchInfo: lookupInfo,
|
SearchInfo: lookupInfo,
|
||||||
IncludeDisabledProviders: true
|
IncludeDisabledProviders: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: ApiClient.getUrl("Items/RemoteSearch/" + currentItem.Type),
|
url: ApiClient.getUrl("Items/RemoteSearch/" + currentItem.Type),
|
||||||
|
@ -971,6 +977,7 @@
|
||||||
|
|
||||||
}).done(function (results) {
|
}).done(function (results) {
|
||||||
|
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
showIdentificationSearchResults(page, results);
|
showIdentificationSearchResults(page, results);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -987,7 +994,6 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
|
|
||||||
for (var i = 0, length = results.length; i < length; i++) {
|
for (var i = 0, length = results.length; i < length; i++) {
|
||||||
|
|
||||||
var result = results[i];
|
var result = results[i];
|
||||||
|
@ -1009,9 +1015,9 @@
|
||||||
if (result.ImageUrl) {
|
if (result.ImageUrl) {
|
||||||
var displayUrl = getSearchImageDisplayUrl(result.ImageUrl, result.SearchProviderName);
|
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 {
|
} else {
|
||||||
|
|
||||||
html += '<a href="#" class="searchImage" style="background-image:url(\'css/images/items/list/remotesearch.png\');background-position: center center;">';
|
html += '<a href="#" class="searchImage" style="background-image:url(\'css/images/items/list/remotesearch.png\');background-position: center center;">';
|
||||||
}
|
}
|
||||||
html += '</a>';
|
html += '</a>';
|
||||||
|
@ -1024,12 +1030,34 @@
|
||||||
html += result.ProductionYear || ' ';
|
html += result.ProductionYear || ' ';
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div><button class="btnSelectSearchResult" type="button" data-icon="check" data-mini="true">Select</button></div>';
|
|
||||||
|
|
||||||
html += '</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 () {
|
$(document).on('pageinit', "#editItemMetadataPage", function () {
|
||||||
|
@ -1082,8 +1110,8 @@
|
||||||
showIdentificationForm(page);
|
showIdentificationForm(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.btnSearchAgain', page).on('click', function() {
|
$('.btnSearchAgain', page).on('click', function () {
|
||||||
|
|
||||||
$('.popupIdentifyForm', page).show();
|
$('.popupIdentifyForm', page).show();
|
||||||
$('.identificationSearchResults', page).hide();
|
$('.identificationSearchResults', page).hide();
|
||||||
$('.btnSearchAgain', page).hide();
|
$('.btnSearchAgain', page).hide();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue