New: Link to TheTvDb has been added to AddSeries series lookup fields.

pull/4/head
Mark McDowall 13 years ago
parent de1d095b8d
commit 1dcc323c48

@ -181,7 +181,8 @@ namespace NzbDrone.Web.Controllers
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 @@ namespace NzbDrone.Web.Models
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…
Cancel
Save