mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 08:16:05 -07:00
approve tv shows or movies
separate checkboxes in the settings screen separating out the approval by tv or movie.
This commit is contained in:
parent
faf21fc0ec
commit
673f3416e0
5 changed files with 26 additions and 8 deletions
|
@ -32,7 +32,8 @@ namespace PlexRequests.Core.SettingModels
|
||||||
|
|
||||||
public bool SearchForMovies { get; set; }
|
public bool SearchForMovies { get; set; }
|
||||||
public bool SearchForTvShows { get; set; }
|
public bool SearchForTvShows { get; set; }
|
||||||
public bool RequireApproval { get; set; }
|
public bool RequireMovieApproval { get; set; }
|
||||||
|
public bool RequireTvShowApproval { get; set; }
|
||||||
public int WeeklyRequestLimit { get; set; }
|
public int WeeklyRequestLimit { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,8 @@ namespace PlexRequests.Core
|
||||||
{
|
{
|
||||||
var defaultSettings = new PlexRequestSettings
|
var defaultSettings = new PlexRequestSettings
|
||||||
{
|
{
|
||||||
RequireApproval = true,
|
RequireTvShowApproval = true,
|
||||||
|
RequireMovieApproval = true,
|
||||||
SearchForMovies = true,
|
SearchForMovies = true,
|
||||||
SearchForTvShows = true,
|
SearchForTvShows = true,
|
||||||
WeeklyRequestLimit = 0
|
WeeklyRequestLimit = 0
|
||||||
|
|
|
@ -218,7 +218,7 @@ namespace PlexRequests.UI.Modules
|
||||||
|
|
||||||
var settings = PrService.GetSettings();
|
var settings = PrService.GetSettings();
|
||||||
Log.Trace(settings.DumpJson());
|
Log.Trace(settings.DumpJson());
|
||||||
if (!settings.RequireApproval)
|
if (!settings.RequireMovieApproval)
|
||||||
{
|
{
|
||||||
var cpSettings = CpService.GetSettings();
|
var cpSettings = CpService.GetSettings();
|
||||||
|
|
||||||
|
@ -324,7 +324,7 @@ namespace PlexRequests.UI.Modules
|
||||||
model.SeasonList = seasonsList.ToArray();
|
model.SeasonList = seasonsList.ToArray();
|
||||||
|
|
||||||
var settings = PrService.GetSettings();
|
var settings = PrService.GetSettings();
|
||||||
if (!settings.RequireApproval)
|
if (!settings.RequireTvShowApproval)
|
||||||
{
|
{
|
||||||
var sonarrSettings = SonarrService.GetSettings();
|
var sonarrSettings = SonarrService.GetSettings();
|
||||||
var sender = new TvSender(SonarrApi, SickrageApi);
|
var sender = new TvSender(SonarrApi, SickrageApi);
|
||||||
|
|
|
@ -37,6 +37,7 @@ using PlexRequests.Core.SettingModels;
|
||||||
using PlexRequests.Helpers;
|
using PlexRequests.Helpers;
|
||||||
using PlexRequests.Store;
|
using PlexRequests.Store;
|
||||||
using PlexRequests.Store.Repository;
|
using PlexRequests.Store.Repository;
|
||||||
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace PlexRequests.UI
|
namespace PlexRequests.UI
|
||||||
{
|
{
|
||||||
|
@ -68,7 +69,7 @@ namespace PlexRequests.UI
|
||||||
if (port == -1)
|
if (port == -1)
|
||||||
port = GetStartupPort();
|
port = GetStartupPort();
|
||||||
|
|
||||||
var options = new StartOptions($"http://+:{port}")
|
var options = new StartOptions(Debugger.IsAttached ? $"http://localhost:{port}" : $"http://+:{port}")
|
||||||
{
|
{
|
||||||
ServerFactory = "Microsoft.Owin.Host.HttpListener"
|
ServerFactory = "Microsoft.Owin.Host.HttpListener"
|
||||||
};
|
};
|
||||||
|
|
|
@ -55,13 +55,28 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
@if (Model.RequireApproval)
|
@if (Model.RequireMovieApproval)
|
||||||
{
|
{
|
||||||
<input type="checkbox" id="RequireApproval" name="RequireApproval" checked="checked"><text>Require approval of requests</text>
|
<input type="checkbox" id="RequireMovieApproval" name="RequireMovieApproval" checked="checked"><text>Require approval of Movie requests</text>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<input type="checkbox" id="RequireApproval" name="RequireApproval"><text>Require approval of requests</text>
|
<input type="checkbox" id="RequireMovieApproval" name="RequireMovieApproval"><text>Require approval of Movie requests</text>
|
||||||
|
}
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
@if (Model.RequireTvShowApproval)
|
||||||
|
{
|
||||||
|
<input type="checkbox" id="RequireTvShowApproval" name="RequireTvShowApproval" checked="checked"><text>Require approval of TV show requests</text>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<input type="checkbox" id="RequireTvShowApproval" name="RequireTvShowApproval"><text>Require approval of TV show requests</text>
|
||||||
}
|
}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue