mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
New: Link to TheTvDb has been added to AddSeries series lookup fields.
This commit is contained in:
parent
de1d095b8d
commit
1dcc323c48
@ -181,7 +181,8 @@ public JsonResult LookupSeries(string term)
|
||||
DisplayedTitle = r.FirstAired.Year > 1900 && !r.SeriesName.EndsWith("(" + r.FirstAired.Year + ")")
|
||||
?string.Format("{0} ({1})", r.SeriesName, r.FirstAired.Year)
|
||||
:r.SeriesName,
|
||||
Banner = r.Banner.BannerPath
|
||||
Banner = r.Banner.BannerPath,
|
||||
Url = String.Format("http://www.thetvdb.com/?tab=series&id={0}", r.Id)
|
||||
}).ToList();
|
||||
|
||||
return Json(tvDbResults, JsonRequestBehavior.AllowGet);
|
||||
|
@ -8,5 +8,6 @@ public class TvDbSearchResultModel
|
||||
public string Title { get; set; }
|
||||
public string Banner { get; set; }
|
||||
public string DisplayedTitle { get; set; }
|
||||
public string Url { get; set; }
|
||||
}
|
||||
}
|
@ -66,6 +66,7 @@ function bindSeriesAutoComplete(selector) {
|
||||
return $("<li></li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append("<a>" + item.DisplayedTitle + "</a>")
|
||||
.append("<div class='tvDbLink'>" + item.Url + "</div>")
|
||||
.appendTo(ul);
|
||||
};
|
||||
});
|
||||
|
@ -37,8 +37,14 @@
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
|
||||
.tvDbLink {
|
||||
color: #065EFE;
|
||||
}
|
||||
|
||||
.tvDbLink:hover {
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
@ -64,5 +70,10 @@
|
||||
$(document).ready(function () {
|
||||
$('#addSeriesAccordion').accordion("activate", false);
|
||||
});
|
||||
|
||||
$(document).on('click', '.tvDbLink', function () {
|
||||
var url = $(this).text();
|
||||
window.open(url, 'thetvdb');
|
||||
});
|
||||
</script>
|
||||
}
|
Loading…
Reference in New Issue
Block a user