mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-05 17:05:03 -05:00
Fix color in displayShow when manually searching.
Changed function getManualSearchStatus to include overview. Changed all attr to prop
This commit is contained in:
parent
25bbe78646
commit
794b30eca0
@ -45,9 +45,9 @@ function updateImages(data) {
|
||||
if (el) {
|
||||
if (ep.searchstatus == 'searching') {
|
||||
//el=$('td#' + ep.season + 'x' + ep.episode + '.search img');
|
||||
img.attr('title','Searching');
|
||||
img.attr('alt','earching');
|
||||
img.attr('src',sbRoot+'/images/' + loadingImage);
|
||||
img.prop('title','Searching');
|
||||
img.prop('alt','Searching');
|
||||
img.prop('src',sbRoot+'/images/' + loadingImage);
|
||||
disableLink(el);
|
||||
// Update Status and Quality
|
||||
var rSearchTerm = /(\w+)\s\((.+?)\)/;
|
||||
@ -56,23 +56,24 @@ function updateImages(data) {
|
||||
}
|
||||
else if (ep.searchstatus == 'queued') {
|
||||
//el=$('td#' + ep.season + 'x' + ep.episode + '.search img');
|
||||
img.attr('title','Queued');
|
||||
img.attr('alt','queued');
|
||||
img.attr('src',sbRoot+'/images/' + queuedImage );
|
||||
img.prop('title','Queued');
|
||||
img.prop('alt','queued');
|
||||
img.prop('src',sbRoot+'/images/' + queuedImage );
|
||||
disableLink(el);
|
||||
HtmlContent = ep.searchstatus;
|
||||
}
|
||||
else if (ep.searchstatus == 'finished') {
|
||||
//el=$('td#' + ep.season + 'x' + ep.episode + '.search img');
|
||||
img.attr('title','Searching');
|
||||
img.attr('alt','searching');
|
||||
img.parent().attr('class','epRetry');
|
||||
img.attr('src',sbRoot+'/images/' + searchImage);
|
||||
img.prop('title','Searching');
|
||||
img.prop('alt','searching');
|
||||
img.parent().prop('class','epRetry');
|
||||
img.prop('src',sbRoot+'/images/' + searchImage);
|
||||
enableLink(el);
|
||||
|
||||
// Update Status and Quality
|
||||
var rSearchTerm = /(\w+)\s\((.+?)\)/;
|
||||
HtmlContent = ep.status.replace(rSearchTerm,"$1"+' <span class="quality '+ep.quality+'">'+"$2"+'</span>');
|
||||
parent.closest('tr').prop("class", ep.overview + " season-" + ep.season + " seasonstyle")
|
||||
|
||||
}
|
||||
// update the status column if it exists
|
||||
@ -91,13 +92,13 @@ $(document).ready(function () {
|
||||
|
||||
function enableLink(el) {
|
||||
el.on('click.disabled', false);
|
||||
el.attr('enableClick', '1');
|
||||
el.prop('enableClick', '1');
|
||||
el.fadeTo("fast", 1)
|
||||
}
|
||||
|
||||
function disableLink(el) {
|
||||
el.off('click.disabled');
|
||||
el.attr('enableClick', '0');
|
||||
el.prop('enableClick', '0');
|
||||
el.fadeTo("fast", .5)
|
||||
}
|
||||
|
||||
@ -121,11 +122,11 @@ function disableLink(el) {
|
||||
event.preventDefault();
|
||||
|
||||
// Check if we have disabled the click
|
||||
if ( $(this).attr('enableClick') == '0' ) {
|
||||
if ( $(this).prop('enableClick') == '0' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $(this).attr('class') == "epRetry" ) {
|
||||
if ( $(this).prop('class') == "epRetry" ) {
|
||||
if ( !confirm("Mark download as bad and retry?") )
|
||||
return false;
|
||||
};
|
||||
@ -137,12 +138,12 @@ function disableLink(el) {
|
||||
|
||||
// Create var for img under anchor and set options for the loading gif
|
||||
img=$(this).children('img');
|
||||
img.attr('title','loading');
|
||||
img.attr('alt','');
|
||||
img.attr('src',sbRoot+'/images/' + options.loadingImage);
|
||||
img.prop('title','loading');
|
||||
img.prop('alt','');
|
||||
img.prop('src',sbRoot+'/images/' + options.loadingImage);
|
||||
|
||||
|
||||
$.getJSON($(this).attr('href'), function(data){
|
||||
$.getJSON($(this).prop('href'), function(data){
|
||||
|
||||
// if they failed then just put the red X
|
||||
if (data.result == 'failure') {
|
||||
@ -161,15 +162,15 @@ function disableLink(el) {
|
||||
HtmlContent = data.result.replace(rSearchTerm,"$1"+' <span class="quality '+data.quality+'">'+"$2"+'</span>');
|
||||
// update the status column if it exists
|
||||
parent.siblings('.col-status').html(HtmlContent)
|
||||
// Only if the queing was succesfull, disable the onClick event of the loading image
|
||||
// Only if the queuing was successful, disable the onClick event of the loading image
|
||||
disableLink(link);
|
||||
}
|
||||
|
||||
// put the corresponding image as the result of queuing of the manual search
|
||||
img.attr('title',img_result);
|
||||
img.attr('alt',img_result);
|
||||
img.attr('height', options.size);
|
||||
img.attr('src',sbRoot+"/images/"+img_name);
|
||||
img.prop('title',img_result);
|
||||
img.prop('alt',img_result);
|
||||
img.prop('height', options.size);
|
||||
img.prop('src',sbRoot+"/images/"+img_name);
|
||||
});
|
||||
//
|
||||
|
||||
|
@ -1809,6 +1809,7 @@ class Home(WebRoot):
|
||||
def getManualSearchStatus(self, show=None, season=None):
|
||||
def getEpisodes(searchThread, searchstatus):
|
||||
results = []
|
||||
showObj = sickbeard.helpers.findCertainShow(sickbeard.showList, int(show))
|
||||
|
||||
if isinstance(searchThread, sickbeard.search_queue.ManualSearchQueueItem):
|
||||
results.append({'episode': searchThread.segment.episode,
|
||||
@ -1816,7 +1817,8 @@ class Home(WebRoot):
|
||||
'season': searchThread.segment.season,
|
||||
'searchstatus': searchstatus,
|
||||
'status': statusStrings[searchThread.segment.status],
|
||||
'quality': self.getQualityClass(searchThread.segment)})
|
||||
'quality': self.getQualityClass(searchThread.segment),
|
||||
'overview': Overview.overviewStrings[showObj.getOverview(int(searchThread.segment.status or -1))]})
|
||||
else:
|
||||
for epObj in searchThread.segment:
|
||||
results.append({'episode': epObj.episode,
|
||||
@ -1824,7 +1826,8 @@ class Home(WebRoot):
|
||||
'season': epObj.season,
|
||||
'searchstatus': searchstatus,
|
||||
'status': statusStrings[epObj.status],
|
||||
'quality': self.getQualityClass(epObj)})
|
||||
'quality': self.getQualityClass(epObj),
|
||||
'overview': Overview.overviewStrings[showObj.getOverview(int(epObj.status or -1))]})
|
||||
|
||||
return results
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user