mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 00:06:05 -07:00
Merge branch 'master' into dev
This commit is contained in:
commit
1793c6f592
120 changed files with 5943 additions and 5918 deletions
|
@ -257,13 +257,17 @@ namespace PlexRequests.Services.Jobs
|
||||||
if (newletterSettings.SendToPlexUsers)
|
if (newletterSettings.SendToPlexUsers)
|
||||||
{
|
{
|
||||||
var users = Api.GetUsers(plexSettings.PlexAuthToken);
|
var users = Api.GetUsers(plexSettings.PlexAuthToken);
|
||||||
|
if (users != null)
|
||||||
|
{
|
||||||
foreach (var user in users.User)
|
foreach (var user in users.User)
|
||||||
{
|
{
|
||||||
message.Bcc.Add(new MailboxAddress(user.Username, user.Email));
|
message.Bcc.Add(new MailboxAddress(user.Username, user.Email));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (newletterSettings.CustomUsersEmailAddresses.Any())
|
if (newletterSettings.CustomUsersEmailAddresses != null
|
||||||
|
&& newletterSettings.CustomUsersEmailAddresses.Any())
|
||||||
{
|
{
|
||||||
foreach (var user in newletterSettings.CustomUsersEmailAddresses)
|
foreach (var user in newletterSettings.CustomUsersEmailAddresses)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#region Copyright
|
#region Copyright
|
||||||
|
|
||||||
// /************************************************************************
|
// /************************************************************************
|
||||||
// Copyright (c) 2016 Jamie Rees
|
// Copyright (c) 2016 Jamie Rees
|
||||||
// File: Scheduler.cs
|
// File: Scheduler.cs
|
||||||
|
@ -23,18 +24,17 @@
|
||||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
// ************************************************************************/
|
// ************************************************************************/
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using NLog;
|
using NLog;
|
||||||
|
|
||||||
using PlexRequests.Core;
|
using PlexRequests.Core;
|
||||||
using PlexRequests.Core.SettingModels;
|
using PlexRequests.Core.SettingModels;
|
||||||
using PlexRequests.Services.Jobs;
|
using PlexRequests.Services.Jobs;
|
||||||
using PlexRequests.UI.Helpers;
|
using PlexRequests.UI.Helpers;
|
||||||
|
|
||||||
using Quartz;
|
using Quartz;
|
||||||
using Quartz.Impl;
|
using Quartz.Impl;
|
||||||
|
|
||||||
|
@ -69,12 +69,9 @@ namespace PlexRequests.UI.Jobs
|
||||||
JobBuilder.Create<StoreBackup>().WithIdentity("StoreBackup", "Database").Build(),
|
JobBuilder.Create<StoreBackup>().WithIdentity("StoreBackup", "Database").Build(),
|
||||||
JobBuilder.Create<StoreCleanup>().WithIdentity("StoreCleanup", "Database").Build(),
|
JobBuilder.Create<StoreCleanup>().WithIdentity("StoreCleanup", "Database").Build(),
|
||||||
JobBuilder.Create<UserRequestLimitResetter>().WithIdentity("UserRequestLimiter", "Request").Build(),
|
JobBuilder.Create<UserRequestLimitResetter>().WithIdentity("UserRequestLimiter", "Request").Build(),
|
||||||
|
JobBuilder.Create<RecentlyAdded>().WithIdentity("RecentlyAddedModel", "Email").Build()
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(s.RecentlyAddedCron))
|
|
||||||
{
|
|
||||||
jobList.Add(JobBuilder.Create<RecentlyAdded>().WithIdentity("RecentlyAddedModel", "Email").Build());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
jobs.AddRange(jobList);
|
jobs.AddRange(jobList);
|
||||||
|
@ -115,6 +112,47 @@ namespace PlexRequests.UI.Jobs
|
||||||
var settingsService = Service.Resolve<ISettingsService<ScheduledJobsSettings>>();
|
var settingsService = Service.Resolve<ISettingsService<ScheduledJobsSettings>>();
|
||||||
var s = settingsService.GetSettings();
|
var s = settingsService.GetSettings();
|
||||||
|
|
||||||
|
if (s.CouchPotatoCacher == 0)
|
||||||
|
{
|
||||||
|
s.CouchPotatoCacher = 60;
|
||||||
|
}
|
||||||
|
if (s.PlexAvailabilityChecker == 0)
|
||||||
|
{
|
||||||
|
s.PlexAvailabilityChecker = 60;
|
||||||
|
}
|
||||||
|
if (s.PlexEpisodeCacher == 0)
|
||||||
|
{
|
||||||
|
s.PlexEpisodeCacher = 11;
|
||||||
|
}
|
||||||
|
if (string.IsNullOrEmpty(s.RecentlyAddedCron))
|
||||||
|
{
|
||||||
|
var cron =
|
||||||
|
(Quartz.Impl.Triggers.CronTriggerImpl)
|
||||||
|
CronScheduleBuilder.WeeklyOnDayAndHourAndMinute(DayOfWeek.Friday, 7, 0).Build();
|
||||||
|
s.RecentlyAddedCron = cron.CronExpressionString; // Weekly CRON at 7 am on Mondays
|
||||||
|
}
|
||||||
|
if (s.SickRageCacher == 0)
|
||||||
|
{
|
||||||
|
s.SickRageCacher = 60;
|
||||||
|
}
|
||||||
|
if (s.SonarrCacher == 0)
|
||||||
|
{
|
||||||
|
s.SonarrCacher = 60;
|
||||||
|
}
|
||||||
|
if (s.StoreBackup == 0)
|
||||||
|
{
|
||||||
|
s.StoreBackup = 24;
|
||||||
|
}
|
||||||
|
if (s.StoreCleanup == 0)
|
||||||
|
{
|
||||||
|
s.StoreCleanup = 24;
|
||||||
|
}
|
||||||
|
if (s.UserRequestLimitResetter == 0)
|
||||||
|
{
|
||||||
|
s.UserRequestLimitResetter = 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var triggers = new List<ITrigger>();
|
var triggers = new List<ITrigger>();
|
||||||
|
|
||||||
var plexAvailabilityChecker =
|
var plexAvailabilityChecker =
|
||||||
|
@ -175,9 +213,6 @@ namespace PlexRequests.UI.Jobs
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
||||||
var cronJob = string.IsNullOrEmpty(s.RecentlyAddedCron);
|
|
||||||
if (!cronJob)
|
|
||||||
{
|
|
||||||
var rencentlyAdded =
|
var rencentlyAdded =
|
||||||
TriggerBuilder.Create()
|
TriggerBuilder.Create()
|
||||||
.WithIdentity("RecentlyAddedModel", "Email")
|
.WithIdentity("RecentlyAddedModel", "Email")
|
||||||
|
@ -187,10 +222,6 @@ namespace PlexRequests.UI.Jobs
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
triggers.Add(rencentlyAdded);
|
triggers.Add(rencentlyAdded);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
triggers.Add(plexAvailabilityChecker);
|
triggers.Add(plexAvailabilityChecker);
|
||||||
triggers.Add(srCacher);
|
triggers.Add(srCacher);
|
||||||
triggers.Add(sonarrCacher);
|
triggers.Add(sonarrCacher);
|
||||||
|
|
|
@ -153,8 +153,15 @@ namespace PlexRequests.UI.Modules
|
||||||
{
|
{
|
||||||
return Response.AsJson(valid.SendJsonError());
|
return Response.AsJson(valid.SendJsonError());
|
||||||
}
|
}
|
||||||
|
var currentSettings = await PlexRequestSettings.GetSettingsAsync();
|
||||||
|
currentSettings.SearchForMovies = form.SearchForMovies;
|
||||||
|
currentSettings.SearchForTvShows = form.SearchForTvShows;
|
||||||
|
currentSettings.SearchForMusic = form.SearchForMusic;
|
||||||
|
currentSettings.RequireMovieApproval = form.RequireMovieApproval;
|
||||||
|
currentSettings.RequireTvShowApproval = form.RequireTvShowApproval;
|
||||||
|
currentSettings.RequireMusicApproval = form.RequireMusicApproval;
|
||||||
|
|
||||||
var result = await PlexRequestSettings.SaveSettingsAsync(form);
|
var result = await PlexRequestSettings.SaveSettingsAsync(currentSettings);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
return Response.AsJson(new { Result = true });
|
return Response.AsJson(new { Result = true });
|
||||||
|
@ -190,8 +197,9 @@ namespace PlexRequests.UI.Modules
|
||||||
settings.Wizard = true;
|
settings.Wizard = true;
|
||||||
await PlexRequestSettings.SaveSettingsAsync(settings);
|
await PlexRequestSettings.SaveSettingsAsync(settings);
|
||||||
|
|
||||||
|
var baseUrl = string.IsNullOrEmpty(settings.BaseUrl) ? string.Empty : $"/{settings.BaseUrl}";
|
||||||
|
|
||||||
return this.LoginAndRedirect((Guid)userId, fallbackRedirectUrl: "/search");
|
return this.LoginAndRedirect((Guid)userId, fallbackRedirectUrl: $"{baseUrl}/search");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -42,9 +42,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="StoreCleanup" class="control-label">Email Addresses to Send to (For users that are not in your Plex Friends)</label>
|
|
||||||
<div>
|
<br>
|
||||||
<input type="text" class="form-control form-control-custom " placeholder="email@address.com;second@address.com" id="StoreCleanup" name="StoreCleanup" value="@Model.CustomUsers">
|
<br>
|
||||||
|
<label for="CustomUsers" class="control-label">Email Addresses to Send to (For users that are not in your Plex Friends)</label>
|
||||||
|
<small>You can add multiple email address by using the ; delimiter</small>
|
||||||
|
<div>
|
||||||
|
<input type="text" class="form-control form-control-custom " placeholder="first@address.com;second@address.com" id="CustomUsers" name="CustomUsers" value="@Model.CustomUsers">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -37,14 +37,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Updater", "Ple
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Helpers.Tests", "PlexRequests.Helpers.Tests\PlexRequests.Helpers.Tests.csproj", "{0E6395D3-B074-49E8-898D-0EB99E507E0E}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Helpers.Tests", "PlexRequests.Helpers.Tests\PlexRequests.Helpers.Tests.csproj", "{0E6395D3-B074-49E8-898D-0EB99E507E0E}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Automation", "PlexRequests.Automation\PlexRequests.Automation.csproj", "{40DC5C6C-2860-44D0-9F91-DEB84C22D103}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Automation", "Automation", "{F9F1B821-AF59-447A-993B-2B328F7274D4}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Automation.Pages", "PlexRequests.Automation.Pages\PlexRequests.Automation.Pages.csproj", "{F8D4A7A7-F0FB-4D04-81DB-637C953E0707}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequestes.Automation.Helpers", "PlexRequestes.Automation.Helpers\PlexRequestes.Automation.Helpers.csproj", "{DC8BACEF-C284-4A8F-A9AA-7F49EFABA288}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Core.Migration", "PlexRequests.Core.Migration\PlexRequests.Core.Migration.csproj", "{8406EE57-D533-47C0-9302-C6B5F8C31E55}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Core.Migration", "PlexRequests.Core.Migration\PlexRequests.Core.Migration.csproj", "{8406EE57-D533-47C0-9302-C6B5F8C31E55}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
|
@ -101,15 +93,6 @@ Global
|
||||||
{0E6395D3-B074-49E8-898D-0EB99E507E0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{0E6395D3-B074-49E8-898D-0EB99E507E0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{0E6395D3-B074-49E8-898D-0EB99E507E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{0E6395D3-B074-49E8-898D-0EB99E507E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{0E6395D3-B074-49E8-898D-0EB99E507E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{0E6395D3-B074-49E8-898D-0EB99E507E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{40DC5C6C-2860-44D0-9F91-DEB84C22D103}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{40DC5C6C-2860-44D0-9F91-DEB84C22D103}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{40DC5C6C-2860-44D0-9F91-DEB84C22D103}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{F8D4A7A7-F0FB-4D04-81DB-637C953E0707}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{F8D4A7A7-F0FB-4D04-81DB-637C953E0707}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{F8D4A7A7-F0FB-4D04-81DB-637C953E0707}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{DC8BACEF-C284-4A8F-A9AA-7F49EFABA288}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{DC8BACEF-C284-4A8F-A9AA-7F49EFABA288}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{DC8BACEF-C284-4A8F-A9AA-7F49EFABA288}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{8406EE57-D533-47C0-9302-C6B5F8C31E55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{8406EE57-D533-47C0-9302-C6B5F8C31E55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{8406EE57-D533-47C0-9302-C6B5F8C31E55}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8406EE57-D533-47C0-9302-C6B5F8C31E55}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8406EE57-D533-47C0-9302-C6B5F8C31E55}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{8406EE57-D533-47C0-9302-C6B5F8C31E55}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
@ -118,11 +101,6 @@ Global
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(NestedProjects) = preSolution
|
|
||||||
{40DC5C6C-2860-44D0-9F91-DEB84C22D103} = {F9F1B821-AF59-447A-993B-2B328F7274D4}
|
|
||||||
{F8D4A7A7-F0FB-4D04-81DB-637C953E0707} = {F9F1B821-AF59-447A-993B-2B328F7274D4}
|
|
||||||
{DC8BACEF-C284-4A8F-A9AA-7F49EFABA288} = {F9F1B821-AF59-447A-993B-2B328F7274D4}
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
RESX_PrefixTranslations = False
|
RESX_PrefixTranslations = False
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
|
|
@ -3,9 +3,9 @@ configuration: Release
|
||||||
assembly_info:
|
assembly_info:
|
||||||
patch: true
|
patch: true
|
||||||
file: '**\AssemblyInfo.*'
|
file: '**\AssemblyInfo.*'
|
||||||
assembly_version: '1.9.6'
|
assembly_version: '1.9.7'
|
||||||
assembly_file_version: '{version}'
|
assembly_file_version: '{version}'
|
||||||
assembly_informational_version: '1.9.6'
|
assembly_informational_version: '1.9.7'
|
||||||
before_build:
|
before_build:
|
||||||
- cmd: appveyor-retry nuget restore
|
- cmd: appveyor-retry nuget restore
|
||||||
build:
|
build:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue