Merge pull request #1185 from tidusjar/dev

Dev
This commit is contained in:
Jamie 2017-02-24 21:47:40 +00:00 committed by GitHub
commit 4472ebdb97
54 changed files with 1970 additions and 495 deletions

View file

@ -95,7 +95,10 @@ $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
//if ($tvl.mixItUp('isLoaded')) $tvl.mixItUp('destroy');
//$tvl.mixItUp(mixItUpConfig(activeState)); // init or reinit
}
if (target === "#MoviesTab") {
if (target === "#MoviesTab" || target === "#ActorsTab") {
if (target === "#ActorsTab") {
actorLoad();
}
$('#approveMovies,#deleteMovies').show();
if ($tvl.mixItUp('isLoaded')) {
activeState = $tvl.mixItUp('getState');
@ -733,6 +736,37 @@ function initLoad() {
}
function actorLoad() {
var $ml = $('#actorMovieList');
if ($ml.mixItUp('isLoaded')) {
activeState = $ml.mixItUp('getState');
$ml.mixItUp('destroy');
}
$ml.html("");
var $newOnly = $('#searchNewOnly').val();
var url = createBaseUrl(base, '/requests/actor' + (!!$newOnly ? '/new' : ''));
$.ajax(url).success(function (results) {
if (results.length > 0) {
results.forEach(function (result) {
var context = buildRequestContext(result, "movie");
var html = searchTemplate(context);
$ml.append(html);
});
$('.customTooltip').tooltipster({
contentCloning: true
});
}
else {
$ml.html(noResultsHtml.format("movie"));
}
$ml.mixItUp(mixItUpConfig());
});
};
function movieLoad() {
var $ml = $('#movieList');
if ($ml.mixItUp('isLoaded')) {

View file

@ -63,6 +63,26 @@ $(function () {
});
// Type in actor search
$("#actorSearchContent").on("input", function () {
triggerActorSearch();
});
// if they toggle the checkbox, we want to refresh our search
$("#actorsSearchNew").click(function () {
triggerActorSearch();
});
function triggerActorSearch()
{
if (searchTimer) {
clearTimeout(searchTimer);
}
searchTimer = setTimeout(function () {
moviesFromActor();
}.bind(this), 800);
}
$('#moviesComingSoon').on('click', function (e) {
e.preventDefault();
moviesComingSoon();
@ -300,7 +320,7 @@ $(function () {
function movieSearch() {
var query = $("#movieSearchContent").val();
var url = createBaseUrl(base, '/search/movie/');
query ? getMovies(url + query) : resetMovies();
query ? getMovies(url + query) : resetMovies("#movieList");
}
function moviesComingSoon() {
@ -313,6 +333,13 @@ $(function () {
getMovies(url);
}
function moviesFromActor() {
var query = $("#actorSearchContent").val();
var $newOnly = $('#actorsSearchNew')[0].checked;
var url = createBaseUrl(base, '/search/actor/' + (!!$newOnly ? 'new/' : ''));
query ? getMovies(url + query, "#actorMovieList", "#actorSearchButton") : resetMovies("#actorMovieList");
}
function popularShows() {
var url = createBaseUrl(base, '/search/tv/popular');
getTvShows(url, true);
@ -330,30 +357,31 @@ $(function () {
getTvShows(url, true);
}
function getMovies(url) {
resetMovies();
$('#movieSearchButton').attr("class", "fa fa-spinner fa-spin");
function getMovies(url, target, button) {
target = target || "#movieList";
button = button || "#movieSearchButton";
resetMovies(target);
$(button).attr("class", "fa fa-spinner fa-spin");
$.ajax(url).success(function (results) {
if (results.length > 0) {
results.forEach(function (result) {
var context = buildMovieContext(result);
var html = searchTemplate(context);
$("#movieList").append(html);
$(target).append(html);
checkNetflix(context.title, context.id);
});
}
else {
$("#movieList").html(noResultsHtml);
$(target).html(noResultsHtml);
}
$('#movieSearchButton').attr("class", "fa fa-search");
$(button).attr("class", "fa fa-search");
});
};
function resetMovies() {
$("#movieList").html("");
function resetMovies(target) {
$(target).html("");
}
function tvSearch() {

View file

@ -178,7 +178,7 @@ namespace Ombi.UI.Modules.Admin
Post["/", true] = async (x, ct) => await SaveAdmin();
Post["/requestauth"] = _ => RequestAuthToken();
Post["/requestauth", true] = async (x, ct) => await RequestAuthToken();
Get["/getusers"] = _ => GetUsers();
@ -319,7 +319,7 @@ namespace Ombi.UI.Modules.Admin
: new JsonResponseModel { Result = false, Message = "We could not save to the database, please try again" });
}
private Response RequestAuthToken()
private async Task<Response> RequestAuthToken()
{
var user = this.Bind<PlexAuth>();
@ -335,11 +335,11 @@ namespace Ombi.UI.Modules.Admin
return Response.AsJson(new { Result = false, Message = "Incorrect username or password!" });
}
var oldSettings = PlexService.GetSettings();
var oldSettings = await PlexService.GetSettingsAsync();
if (oldSettings != null)
{
oldSettings.PlexAuthToken = model.user.authentication_token;
PlexService.SaveSettings(oldSettings);
await PlexService.SaveSettingsAsync(oldSettings);
}
else
{
@ -347,10 +347,14 @@ namespace Ombi.UI.Modules.Admin
{
PlexAuthToken = model.user.authentication_token
};
PlexService.SaveSettings(newModel);
await PlexService.SaveSettingsAsync(newModel);
}
return Response.AsJson(new { Result = true, AuthToken = model.user.authentication_token });
var server = PlexApi.GetServer(model.user.authentication_token);
var machine =
server.Server.FirstOrDefault(x => x.AccessToken == model.user.authentication_token)?.MachineIdentifier;
return Response.AsJson(new { Result = true, AuthToken = model.user.authentication_token, Identifier = machine });
}

View file

@ -94,6 +94,8 @@ namespace Ombi.UI.Modules.Admin
private async Task<Response> ScheduleRun(string key)
{
await Task.Yield();
if (key.Equals(JobNames.PlexCacher, StringComparison.CurrentCultureIgnoreCase))
{
PlexContentCacher.CacheContent();

View file

@ -47,6 +47,8 @@ namespace Ombi.UI.Modules
public async Task<Response> Netflix(string title)
{
await Task.Yield();
var result = NetflixApi.CheckNetflix(title);
if (!string.IsNullOrEmpty(result.Message))

View file

@ -121,6 +121,8 @@ namespace Ombi.UI.Modules
Get["SearchIndex", "/", true] = async (x, ct) => await RequestLoad();
Get["actor/{searchTerm}", true] = async (x, ct) => await SearchPerson((string)x.searchTerm);
Get["actor/new/{searchTerm}", true] = async (x, ct) => await SearchPerson((string)x.searchTerm, true);
Get["movie/{searchTerm}", true] = async (x, ct) => await SearchMovie((string)x.searchTerm);
Get["tv/{searchTerm}", true] = async (x, ct) => await SearchTvShow((string)x.searchTerm);
Get["music/{searchTerm}", true] = async (x, ct) => await SearchAlbum((string)x.searchTerm);
@ -182,9 +184,18 @@ namespace Ombi.UI.Modules
private ISettingsService<CustomizationSettings> CustomizationSettings { get; }
private static Logger Log = LogManager.GetCurrentClassLogger();
private long _plexMovieCacheTime = 0;
private IEnumerable<PlexContent> _plexMovies = null;
private long _embyMovieCacheTime = 0;
private IEnumerable<EmbyContent> _embyMovies = null;
private long _dbMovieCacheTime = 0;
private Dictionary<int, RequestedModel> _dbMovies = null;
private async Task<Negotiator> RequestLoad()
{
var settings = await PrService.GetSettingsAsync();
var custom = await CustomizationSettings.GetSettingsAsync();
var emby = await EmbySettings.GetSettingsAsync();
@ -222,6 +233,53 @@ namespace Ombi.UI.Modules
return await ProcessMovies(MovieSearchType.Search, searchTerm);
}
private async Task<Response> SearchPerson(string searchTerm)
{
var movies = TransformMovieListToMovieResultList(await MovieApi.SearchPerson(searchTerm));
return await TransformMovieResultsToResponse(movies);
}
private async Task<Response> SearchPerson(string searchTerm, bool filterExisting)
{
var movies = TransformMovieListToMovieResultList(await MovieApi.SearchPerson(searchTerm, AlreadyAvailable));
return await TransformMovieResultsToResponse(movies);
}
private async Task<bool> AlreadyAvailable(int id, string title, string year)
{
var plexSettings = await PlexService.GetSettingsAsync();
var embySettings = await EmbySettings.GetSettingsAsync();
return IsMovieInCache(id, String.Empty) ||
(plexSettings.Enable && PlexChecker.IsMovieAvailable(PlexMovies(), title, year)) ||
(embySettings.Enable && EmbyChecker.IsMovieAvailable(EmbyMovies(), title, year, String.Empty));
}
private IEnumerable<PlexContent> PlexMovies()
{ long now = DateTime.Now.Ticks;
if(_plexMovies == null || (now - _plexMovieCacheTime) > 10000)
{
var content = PlexContentRepository.GetAll();
_plexMovies = PlexChecker.GetPlexMovies(content);
_plexMovieCacheTime = now;
}
return _plexMovies;
}
private IEnumerable<EmbyContent> EmbyMovies()
{
long now = DateTime.Now.Ticks;
if (_embyMovies == null || (now - _embyMovieCacheTime) > 10000)
{
var content = EmbyContentRepository.GetAll();
_embyMovies = EmbyChecker.GetEmbyMovies(content);
_embyMovieCacheTime = now;
}
return _embyMovies;
}
private Response GetTvPoster(int theTvDbId)
{
var result = TvApi.ShowLookupByTheTvDbId(theTvDbId);
@ -233,15 +291,10 @@ namespace Ombi.UI.Modules
}
return banner;
}
private async Task<Response> ProcessMovies(MovieSearchType searchType, string searchTerm)
{
List<MovieResult> apiMovies;
switch (searchType)
{
case MovieSearchType.Search:
var movies = await MovieApi.SearchMovie(searchTerm).ConfigureAwait(false);
apiMovies = movies.Select(x =>
private List<MovieResult> TransformSearchMovieListToMovieResultList(List<TMDbLib.Objects.Search.SearchMovie> searchMovies)
{
return searchMovies.Select(x =>
new MovieResult
{
Adult = x.Adult,
@ -260,6 +313,39 @@ namespace Ombi.UI.Modules
VoteCount = x.VoteCount
})
.ToList();
}
private List<MovieResult> TransformMovieListToMovieResultList(List<TMDbLib.Objects.Movies.Movie> movies)
{
return movies.Select(x =>
new MovieResult
{
Adult = x.Adult,
BackdropPath = x.BackdropPath,
GenreIds = x.Genres.Select(y => y.Id).ToList(),
Id = x.Id,
OriginalLanguage = x.OriginalLanguage,
OriginalTitle = x.OriginalTitle,
Overview = x.Overview,
Popularity = x.Popularity,
PosterPath = x.PosterPath,
ReleaseDate = x.ReleaseDate,
Title = x.Title,
Video = x.Video,
VoteAverage = x.VoteAverage,
VoteCount = x.VoteCount
})
.ToList();
}
private async Task<Response> ProcessMovies(MovieSearchType searchType, string searchTerm)
{
List<MovieResult> apiMovies;
switch (searchType)
{
case MovieSearchType.Search:
var movies = await MovieApi.SearchMovie(searchTerm).ConfigureAwait(false);
apiMovies = TransformSearchMovieListToMovieResultList(movies);
break;
case MovieSearchType.CurrentlyPlaying:
apiMovies = await MovieApi.GetCurrentPlayingMovies();
@ -272,20 +358,31 @@ namespace Ombi.UI.Modules
break;
}
var allResults = await RequestService.GetAllAsync();
allResults = allResults.Where(x => x.Type == RequestType.Movie);
return await TransformMovieResultsToResponse(apiMovies);
}
var distinctResults = allResults.DistinctBy(x => x.ProviderId);
var dbMovies = distinctResults.ToDictionary(x => x.ProviderId);
private async Task<Dictionary<int, RequestedModel>> RequestedMovies()
{
long now = DateTime.Now.Ticks;
if (_dbMovies == null || (now - _dbMovieCacheTime) > 10000)
{
var allResults = await RequestService.GetAllAsync();
allResults = allResults.Where(x => x.Type == RequestType.Movie);
var distinctResults = allResults.DistinctBy(x => x.ProviderId);
_dbMovies = distinctResults.ToDictionary(x => x.ProviderId);
_dbMovieCacheTime = now;
}
return _dbMovies;
}
var cpCached = CpCacher.QueuedIds();
var watcherCached = WatcherCacher.QueuedIds();
var radarrCached = RadarrCacher.QueuedIds();
private async Task<Response> TransformMovieResultsToResponse(List<MovieResult> movies)
{
await Task.Yield();
var viewMovies = new List<SearchMovieViewModel>();
var counter = 0;
foreach (var movie in apiMovies)
Dictionary<int, RequestedModel> dbMovies = await RequestedMovies();
foreach (var movie in movies)
{
var viewMovie = new SearchMovieViewModel
{
@ -362,20 +459,11 @@ namespace Ombi.UI.Modules
viewMovie.Approved = dbm.Approved;
viewMovie.Available = dbm.Available;
}
if (cpCached.Contains(movie.Id) && canSee) // compare to the couchpotato db
else if (canSee)
{
viewMovie.Approved = true;
viewMovie.Requested = true;
}
if (watcherCached.Contains(viewMovie.ImdbId) && canSee) // compare to the watcher db
{
viewMovie.Approved = true;
viewMovie.Requested = true;
}
if (radarrCached.Contains(movie.Id) && canSee)
{
viewMovie.Approved = true;
viewMovie.Requested = true;
bool exists = IsMovieInCache(movie, viewMovie.ImdbId);
viewMovie.Approved = exists;
viewMovie.Requested = exists;
}
viewMovies.Add(viewMovie);
}
@ -383,6 +471,19 @@ namespace Ombi.UI.Modules
return Response.AsJson(viewMovies);
}
private bool IsMovieInCache(MovieResult movie, string imdbId)
{ int id = movie.Id;
return IsMovieInCache(id, imdbId);
}
private bool IsMovieInCache(int id, string imdbId)
{ var cpCached = CpCacher.QueuedIds();
var watcherCached = WatcherCacher.QueuedIds();
var radarrCached = RadarrCacher.QueuedIds();
return cpCached.Contains(id) || watcherCached.Contains(imdbId) || radarrCached.Contains(id);
}
private bool CanUserSeeThisRequest(int movieId, bool usersCanViewOnlyOwnRequests,
Dictionary<int, RequestedModel> moviesInDb)
{

View file

@ -67,6 +67,7 @@ namespace Ombi.UI.NinjectModules
Bind<IEmbyEpisodeCacher>().To<EmbyEpisodeCacher>();
Bind<IEmbyUserChecker>().To<EmbyUserChecker>();
Bind<IEmbyAddedNewsletter>().To<EmbyAddedNewsletter>();
Bind<IPlexNewsletter>().To<PlexRecentlyAddedNewsletter>();
Bind<IAnalytics>().To<Analytics>();

View file

@ -1,76 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@ -89,13 +109,13 @@
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="UserLogin_Title" xml:space="preserve">
<value>Login</value>
@ -191,6 +211,9 @@
<data name="Search_Albums" xml:space="preserve">
<value>Albums</value>
</data>
<data name="Search_NewOnly" xml:space="preserve">
<value>Don't include titles that are already requested/available</value>
</data>
<data name="Search_Paragraph" xml:space="preserve">
<value>Want to watch something that is not currently on {0}?! No problem! Just search for it below and request it!</value>
</data>
@ -473,4 +496,7 @@
<data name="UserLogin_AdminUsePassword" xml:space="preserve">
<value>If you are an administrator, please use the other login page</value>
</data>
<data name="Search_Actors" xml:space="preserve">
<value>Actors</value>
</data>
</root>

View file

@ -717,6 +717,15 @@ namespace Ombi.UI.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Actors.
/// </summary>
public static string Search_Actors {
get {
return ResourceManager.GetString("Search_Actors", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Albums.
/// </summary>
@ -879,6 +888,15 @@ namespace Ombi.UI.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Don&apos;t include titles that are already requested/available.
/// </summary>
public static string Search_NewOnly {
get {
return ResourceManager.GetString("Search_NewOnly", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Not Requested yet.
/// </summary>

View file

@ -222,6 +222,7 @@
if (response.result === true) {
generateNotify("Success!", "success");
$('#authToken').val(response.authToken);
$('#MachineIdentifier').val(response.identifier);
} else {
generateNotify(response.message, "warning");
}

View file

@ -60,6 +60,7 @@
@Html.Checkbox(Model.SearchForMovies,"SearchForMovies","Search for Movies")
@Html.Checkbox(Model.SearchForActors,"SearchForActors","Search for Movies by Actor")
<div class="form-group">
<div class="checkbox">

View file

@ -27,6 +27,13 @@
<a id="movieTabButton" href="#MoviesTab" aria-controls="home" role="tab" data-toggle="tab"><i class="fa fa-film"></i> @UI.Search_Movies</a>
</li>
@if (Model.Settings.SearchForActors)
{
<li role="presentation">
<a id="actorTabButton" href="#ActorsTab" aria-controls="profile" role="tab" data-toggle="tab"><i class="fa fa-users"></i> @UI.Search_Actors</a>
</li>
}
}
@if (Model.Settings.SearchForTvShows)
{
@ -72,8 +79,28 @@
<div id="movieList">
</div>
</div>
}
@if (Model.Settings.SearchForActors)
{
<!-- Actors tab -->
<div role="tabpanel" class="tab-pane" id="ActorsTab">
<div class="input-group">
<input id="actorSearchContent" type="text" class="form-control form-control-custom form-control-search form-control-withbuttons">
<div class="input-group-addon">
<i id="actorSearchButton" class="fa fa-search"></i>
</div>
</div>
<div class="checkbox">
<input type="checkbox" id="actorsSearchNew" name="actorsSearchNew"><label for="actorsSearchNew">@UI.Search_NewOnly</label>
</div>
<br />
<br />
<!-- Movie content -->
<div id="actorMovieList">
</div>
</div>
}
}
@if (Model.Settings.SearchForTvShows)
{
@ -123,7 +150,7 @@
}
<script id="search-templateNew" type="text/x-handlebars-template">
<script id="search-templateNew" type="text/x-handlebars-template">
<div class="row">
<div id="{{id}}imgDiv" class="col-sm-2">
@ -287,7 +314,7 @@
</script>
<!-- Movie and TV Results template -->
<script id="search-template" type="text/x-handlebars-template">
<script id="search-template" type="text/x-handlebars-template">
<div class="row">
<div id="{{id}}imgDiv" class="col-sm-2">
@ -313,7 +340,7 @@
<h4>
<a href="http://www.imdb.com/title/{{imdb}}/" target="_blank">
{{title}} ({{year}})
</a>{{#if status}}<span class="label label-primary" style="font-size:60%" target="_blank">{{status}}</span>{{/if}}
</h4>
{{/if_eq}}
@ -340,7 +367,7 @@
<span id="{{id}}netflixTab"></span>
{{#if homepage}}
<a href="{{homepage}}" target="_blank"><span class="label label-info">HomePage</span></a>
{{/if}}