mirror of https://github.com/lidarr/Lidarr
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 @@ namespace NzbDrone.Web.Controllers
|
||||||
DisplayedTitle = r.FirstAired.Year > 1900 && !r.SeriesName.EndsWith("(" + r.FirstAired.Year + ")")
|
DisplayedTitle = r.FirstAired.Year > 1900 && !r.SeriesName.EndsWith("(" + r.FirstAired.Year + ")")
|
||||||
?string.Format("{0} ({1})", r.SeriesName, r.FirstAired.Year)
|
?string.Format("{0} ({1})", r.SeriesName, r.FirstAired.Year)
|
||||||
:r.SeriesName,
|
:r.SeriesName,
|
||||||
Banner = r.Banner.BannerPath
|
Banner = r.Banner.BannerPath,
|
||||||
|
Url = String.Format("http://www.thetvdb.com/?tab=series&id={0}", r.Id)
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
return Json(tvDbResults, JsonRequestBehavior.AllowGet);
|
return Json(tvDbResults, JsonRequestBehavior.AllowGet);
|
||||||
|
|
|
@ -8,5 +8,6 @@ namespace NzbDrone.Web.Models
|
||||||
public string Title { get; set; }
|
public string Title { get; set; }
|
||||||
public string Banner { get; set; }
|
public string Banner { get; set; }
|
||||||
public string DisplayedTitle { get; set; }
|
public string DisplayedTitle { get; set; }
|
||||||
|
public string Url { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -66,6 +66,7 @@ function bindSeriesAutoComplete(selector) {
|
||||||
return $("<li></li>")
|
return $("<li></li>")
|
||||||
.data("item.autocomplete", item)
|
.data("item.autocomplete", item)
|
||||||
.append("<a>" + item.DisplayedTitle + "</a>")
|
.append("<a>" + item.DisplayedTitle + "</a>")
|
||||||
|
.append("<div class='tvDbLink'>" + item.Url + "</div>")
|
||||||
.appendTo(ul);
|
.appendTo(ul);
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,8 +37,14 @@
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tvDbLink {
|
||||||
|
color: #065EFE;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tvDbLink:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,5 +70,10 @@
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#addSeriesAccordion').accordion("activate", false);
|
$('#addSeriesAccordion').accordion("activate", false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on('click', '.tvDbLink', function () {
|
||||||
|
var url = $(this).text();
|
||||||
|
window.open(url, 'thetvdb');
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
Loading…
Reference in New Issue