Merge pull request #567 from liveyourheart/dev

Dev
pull/570/head
Jamie 8 years ago committed by GitHub
commit 9a3eb5fba6

@ -56,6 +56,8 @@ namespace PlexRequests.Core.SettingModels
public bool CollectAnalyticData { get; set; }
public bool IgnoreNotifyForAutoApprovedRequests { get; set; }
public bool Wizard { get; set; }
public bool DisableTvRequestsByEpisode { get; set; }
public bool DisableTvRequestsBySeason { get; set; }
/// <summary>
/// The CSS name of the theme we want

@ -468,8 +468,11 @@ $(function () {
episodes: result.episodes,
tvFullyAvailable: result.tvFullyAvailable,
url: result.plexUrl,
tvPartialAvailable : result.tvPartialAvailable
tvPartialAvailable: result.tvPartialAvailable,
disableTvRequestsByEpisode: result.disableTvRequestsByEpisode,
disableTvRequestsBySeason: result.disableTvRequestsBySeason
};
return context;
}

@ -55,5 +55,7 @@ namespace PlexRequests.UI.Models
public int SiteRating { get; set; }
public List<Store.EpisodesModel> Episodes { get; set; }
public bool TvFullyAvailable { get; set; }
public bool DisableTvRequestsByEpisode { get; set; }
public bool DisableTvRequestsBySeason { get; set; }
}
}

@ -290,8 +290,10 @@ namespace PlexRequests.UI.Modules
private async Task<Response> SearchTvShow(string searchTerm)
{
Analytics.TrackEventAsync(Category.Search, Action.TvShow, searchTerm, Username, CookieHelper.GetAnalyticClientId(Cookies));
var plexSettings = await PlexService.GetSettingsAsync();
var prSettings = await PrService.GetSettingsAsync();
var providerId = string.Empty;
var apiTv = new List<TvMazeSearch>();
@ -336,7 +338,9 @@ namespace PlexRequests.UI.Modules
Runtime = t.show.runtime.ToString(),
SeriesId = t.show.id,
SeriesName = t.show.name,
Status = t.show.status
Status = t.show.status,
DisableTvRequestsByEpisode = prSettings.DisableTvRequestsByEpisode,
DisableTvRequestsBySeason = prSettings.DisableTvRequestsBySeason
};

@ -194,6 +194,36 @@
</div>
</div>
<div class="form-group">
<div class="checkbox">
@if (Model.DisableTvRequestsByEpisode)
{
<input type="checkbox" id="DisableTvRequestsByEpisode" name="DisableTvRequestsByEpisode" checked="checked">
<label for="DisableTvRequestsByEpisode">Disable TV requests by episode</label>
}
else
{
<input type="checkbox" id="DisableTvRequestsByEpisode" name="DisableTvRequestsByEpisode"><label for="DisableTvRequestsByEpisode">Disable TV requests by episode</label>
}
</div>
</div>
<div class="form-group">
<div class="checkbox">
@if (Model.DisableTvRequestsBySeason)
{
<input type="checkbox" id="DisableTvRequestsBySeason" name="DisableTvRequestsBySeason" checked="checked">
<label for="DisableTvRequestsBySeason">Disable TV requests by season</label>
}
else
{
<input type="checkbox" id="DisableTvRequestsBySeason" name="DisableTvRequestsBySeason"><label for="DisableTvRequestsBySeason">Disable TV requests by season</label>
}
</div>
</div>
<div class="form-group">
<div class="checkbox">

@ -213,10 +213,14 @@
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li><a id="{{id}}" season-select="0" class="dropdownTv " href="#">@UI.Search_AllSeasons</a></li>
{{#if_eq disableTvRequestsBySeason false}}
<li><a id="{{id}}" season-select="1" class="dropdownTv" href="#">@UI.Search_FirstSeason</a></li>
<li><a id="{{id}}" season-select="2" class="dropdownTv" href="#">@UI.Search_LatestSeason</a></li>
<li><a id="SeasonSelect" data-identifier="{{id}}" data-toggle="modal" data-target="#seasonsModal" href="#">@UI.Search_SelectSeason...</a></li>
{{/if_eq}}
{{#if_eq disableTvRequestsByEpisode false}}
<li><a id="EpisodeSelect" data-identifier="{{id}}" data-toggle="modal" data-target="#episodesModal" href="#">@UI.Search_SelectEpisode...</a></li>
{{/if_eq}}
</ul>
</div>
{{#if available}}

Loading…
Cancel
Save