mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
All Sln changes
This commit is contained in:
parent
b5855f2644
commit
796f0fc188
615 changed files with 68 additions and 747 deletions
70
Ombi.Core/SettingModels/AuthenticationSettings.cs
Normal file
70
Ombi.Core/SettingModels/AuthenticationSettings.cs
Normal file
|
@ -0,0 +1,70 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: AuthenticationSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class AuthenticationSettings : Settings
|
||||
{
|
||||
public bool UserAuthentication { get; set; }
|
||||
public bool UsePassword { get; set; }
|
||||
|
||||
[JsonProperty("PlexAuthToken")]
|
||||
[Obsolete("This should be migrated over into the Plex Settings and then removed in the next release")]
|
||||
public string OldPlexAuthToken { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A comma separated list of users.
|
||||
/// </summary>
|
||||
public string DeniedUsers { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<string> DeniedUserList
|
||||
{
|
||||
get
|
||||
{
|
||||
var users = new List<string>();
|
||||
if (string.IsNullOrEmpty(DeniedUsers))
|
||||
{
|
||||
return users;
|
||||
}
|
||||
|
||||
var splitUsers = DeniedUsers.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
foreach (var user in splitUsers)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(user))
|
||||
users.Add(user.Trim());
|
||||
}
|
||||
return users;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
37
Ombi.Core/SettingModels/CouchPotatoSettings.cs
Normal file
37
Ombi.Core/SettingModels/CouchPotatoSettings.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: CouchPotatoSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class CouchPotatoSettings : ExternalSettings
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public string ApiKey { get; set; }
|
||||
public string ProfileId { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
39
Ombi.Core/SettingModels/CustomizationSettings.cs
Normal file
39
Ombi.Core/SettingModels/CustomizationSettings.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: NewsletterSettings.cs
|
||||
// Created By: Jim MacKenzie
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public class CustomizationSettings : Settings
|
||||
{
|
||||
public string ApplicationName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The CSS name of the theme we want
|
||||
/// </summary>
|
||||
public string ThemeName { get; set; }
|
||||
}
|
||||
}
|
40
Ombi.Core/SettingModels/EmailNotificationSettings.cs
Normal file
40
Ombi.Core/SettingModels/EmailNotificationSettings.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: EmailNotificationSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class EmailNotificationSettings : NotificationSettings
|
||||
{
|
||||
public string EmailHost { get; set; }
|
||||
public string EmailPassword { get; set; }
|
||||
public int EmailPort { get; set; }
|
||||
public string EmailSender { get; set; }
|
||||
public string EmailUsername { get; set; }
|
||||
public bool Authentication { get; set; }
|
||||
public bool EnableUserEmailNotifications { get; set; }
|
||||
public string RecipientEmail { get; set; }
|
||||
}
|
||||
}
|
56
Ombi.Core/SettingModels/ExternalSettings.cs
Normal file
56
Ombi.Core/SettingModels/ExternalSettings.cs
Normal file
|
@ -0,0 +1,56 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: ExternalSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Ombi.Helpers;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public abstract class ExternalSettings : Settings
|
||||
{
|
||||
public bool Ssl { get; set; }
|
||||
public string SubDir { get; set; }
|
||||
public string Ip { get; set; }
|
||||
public int Port { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual Uri FullUri
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(SubDir))
|
||||
{
|
||||
var formattedSubDir = Ip.ReturnUriWithSubDir(Port, Ssl, SubDir);
|
||||
return formattedSubDir;
|
||||
}
|
||||
var formatted = Ip.ReturnUri(Port, Ssl);
|
||||
return formatted;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
34
Ombi.Core/SettingModels/HeadphonesSettings.cs
Normal file
34
Ombi.Core/SettingModels/HeadphonesSettings.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: CouchPotatoSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class HeadphonesSettings : ExternalSettings
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public string ApiKey { get; set; }
|
||||
}
|
||||
}
|
46
Ombi.Core/SettingModels/LandingPageSettings.cs
Normal file
46
Ombi.Core/SettingModels/LandingPageSettings.cs
Normal file
|
@ -0,0 +1,46 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: LandingPageSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public class LandingPageSettings : Settings
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public bool BeforeLogin { get; set; }
|
||||
public bool NoticeEnable { get; set; }
|
||||
public string NoticeMessage { get; set; }
|
||||
public bool EnabledNoticeTime { get; set; }
|
||||
public DateTime NoticeStart { get; set; }
|
||||
public DateTime NoticeEnd { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public bool NoticeActive => DateTime.Now < NoticeEnd && DateTime.Now > NoticeStart;
|
||||
}
|
||||
}
|
35
Ombi.Core/SettingModels/LogSettings.cs
Normal file
35
Ombi.Core/SettingModels/LogSettings.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: SickRageSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class LogSettings : Settings
|
||||
{
|
||||
public int Level { get; set; }
|
||||
}
|
||||
}
|
45
Ombi.Core/SettingModels/NewsletterSettings.cs
Normal file
45
Ombi.Core/SettingModels/NewsletterSettings.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: NewsletterSettings.cs
|
||||
// Created By: Jim MacKenzie
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Ombi.Helpers;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public class NewletterSettings : Settings
|
||||
{
|
||||
public bool SendRecentlyAddedEmail { get; set; }
|
||||
public bool SendToPlexUsers { get; set; }
|
||||
public string CustomUsers { get; set; }
|
||||
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public IEnumerable<string> CustomUsersEmailAddresses => CustomUsers.SplitEmailsByDelimiter(';');
|
||||
}
|
||||
}
|
58
Ombi.Core/SettingModels/NotificationSettings.cs
Normal file
58
Ombi.Core/SettingModels/NotificationSettings.cs
Normal file
|
@ -0,0 +1,58 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: NotificationSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Ombi.Core.Models;
|
||||
using Ombi.Core.Notification;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public class NotificationSettings : Settings
|
||||
{
|
||||
public NotificationSettings()
|
||||
{
|
||||
Message = new List<NotificationMessage>
|
||||
{
|
||||
new NotificationMessage { NotificationType = NotificationType.NewRequest },
|
||||
new NotificationMessage { NotificationType = NotificationType.Issue },
|
||||
new NotificationMessage { NotificationType = NotificationType.AdminNote },
|
||||
new NotificationMessage { NotificationType = NotificationType.RequestApproved },
|
||||
new NotificationMessage { NotificationType = NotificationType.RequestAvailable }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
public List<NotificationMessage> Message { get; set; }
|
||||
}
|
||||
|
||||
public static class NotificationCurly
|
||||
{
|
||||
public static readonly List<string> Curlys = new List<string> { "Username", "Title", "Date", "Issue", "Type" };
|
||||
}
|
||||
}
|
62
Ombi.Core/SettingModels/NotificationSettingsV2.cs
Normal file
62
Ombi.Core/SettingModels/NotificationSettingsV2.cs
Normal file
|
@ -0,0 +1,62 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: NotificationSettingsV2.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Ombi.Core.Models;
|
||||
using Ombi.Core.Notification;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public class NotificationSettingsV2 : Settings
|
||||
{
|
||||
public NotificationSettingsV2()
|
||||
{
|
||||
EmailNotification = new List<NotificationMessage>
|
||||
{
|
||||
new NotificationMessage
|
||||
{
|
||||
Body = "BODY",
|
||||
NotificationType = NotificationType.NewRequest,
|
||||
Subject = "SUB"
|
||||
},
|
||||
new NotificationMessage
|
||||
{
|
||||
NotificationType = NotificationType.Issue,
|
||||
Body = "issue",
|
||||
Subject = "issuesub"
|
||||
}
|
||||
};
|
||||
SlackNotification = new List<NotificationMessage>();
|
||||
PushoverNotification = new List<NotificationMessage>();
|
||||
PushbulletNotification = new List<NotificationMessage>();
|
||||
}
|
||||
public List<NotificationMessage> EmailNotification { get; set; }
|
||||
public List<NotificationMessage> SlackNotification { get; set; }
|
||||
public List<NotificationMessage> PushbulletNotification { get; set; }
|
||||
public List<NotificationMessage> PushoverNotification { get; set; }
|
||||
}
|
||||
}
|
77
Ombi.Core/SettingModels/PlexRequestSettings.cs
Normal file
77
Ombi.Core/SettingModels/PlexRequestSettings.cs
Normal file
|
@ -0,0 +1,77 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: PlexRequestSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class PlexRequestSettings : Settings
|
||||
{
|
||||
public PlexRequestSettings()
|
||||
{
|
||||
TvWeeklyRequestLimit = 0;
|
||||
MovieWeeklyRequestLimit = 0;
|
||||
AlbumWeeklyRequestLimit = 0;
|
||||
}
|
||||
|
||||
public int Port { get; set; }
|
||||
public string BaseUrl { get; set; }
|
||||
public bool SearchForMovies { get; set; }
|
||||
public bool SearchForTvShows { get; set; }
|
||||
public bool SearchForMusic { get; set; }
|
||||
[Obsolete("Use the user management settings")]
|
||||
public bool RequireMovieApproval { get; set; }
|
||||
[Obsolete("Use the user management settings")]
|
||||
public bool RequireTvShowApproval { get; set; }
|
||||
[Obsolete("Use the user management settings")]
|
||||
public bool RequireMusicApproval { get; set; }
|
||||
|
||||
[Obsolete("Use the user management settings")]
|
||||
public bool UsersCanViewOnlyOwnRequests { get; set; }
|
||||
[Obsolete("Use the user management settings")]
|
||||
public bool UsersCanViewOnlyOwnIssues { get; set; }
|
||||
public int MovieWeeklyRequestLimit { get; set; }
|
||||
public int TvWeeklyRequestLimit { get; set; }
|
||||
public int AlbumWeeklyRequestLimit { get; set; }
|
||||
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; }
|
||||
[Obsolete("Moved to NewsLetterSettings")]
|
||||
public bool SendRecentlyAddedEmail { get; set; }
|
||||
public string CustomDonationUrl { get; set; }
|
||||
public bool EnableCustomDonationUrl { get; set; }
|
||||
public string CustomDonationMessage { get; set; }
|
||||
/// <summary>
|
||||
/// The CSS name of the theme we want
|
||||
/// </summary>
|
||||
public string ThemeName { get; set; }
|
||||
|
||||
public string ApiKey { get; set; }
|
||||
}
|
||||
}
|
43
Ombi.Core/SettingModels/PlexSettings.cs
Normal file
43
Ombi.Core/SettingModels/PlexSettings.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: CouchPotatoSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class PlexSettings : ExternalSettings
|
||||
{
|
||||
public PlexSettings()
|
||||
{
|
||||
AdvancedSearch = true;
|
||||
}
|
||||
public bool AdvancedSearch { get; set; }
|
||||
public bool EnableTvEpisodeSearching { get; set; }
|
||||
|
||||
public string PlexAuthToken { get; set; }
|
||||
public string MachineIdentifier { get; set; }
|
||||
public string PlexDatabaseLocationOverride { get; set; }
|
||||
}
|
||||
}
|
34
Ombi.Core/SettingModels/PushBulletNotificationSettings.cs
Normal file
34
Ombi.Core/SettingModels/PushBulletNotificationSettings.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: PushBulletNotificationSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class PushbulletNotificationSettings : NotificationSettings
|
||||
{
|
||||
public string AccessToken { get; set; }
|
||||
public string DeviceIdentifier { get; set; }
|
||||
}
|
||||
}
|
34
Ombi.Core/SettingModels/PushoverNotificationSettings.cs
Normal file
34
Ombi.Core/SettingModels/PushoverNotificationSettings.cs
Normal file
|
@ -0,0 +1,34 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: PushoverNotificationSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class PushoverNotificationSettings : NotificationSettings
|
||||
{
|
||||
public string AccessToken { get; set; }
|
||||
public string UserToken { get; set; }
|
||||
}
|
||||
}
|
56
Ombi.Core/SettingModels/RequestSettings.cs
Normal file
56
Ombi.Core/SettingModels/RequestSettings.cs
Normal file
|
@ -0,0 +1,56 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: RequestSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class RequestSettings : Settings
|
||||
{
|
||||
public OrderType Order { get; set; }
|
||||
public List<FilterType> Filters { get; set; }
|
||||
}
|
||||
|
||||
public enum OrderType
|
||||
{
|
||||
NewRequests,
|
||||
OldRequests,
|
||||
NewReleases,
|
||||
OldReleases
|
||||
}
|
||||
|
||||
public enum FilterType
|
||||
{
|
||||
// ALL is not here, it's managed in the angular controller
|
||||
Approved,
|
||||
NotApproved,
|
||||
Available,
|
||||
NotAvailable,
|
||||
Released,
|
||||
NotReleased
|
||||
}
|
||||
}
|
49
Ombi.Core/SettingModels/ScheduledJobsSettings.cs
Normal file
49
Ombi.Core/SettingModels/ScheduledJobsSettings.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: ScheduledJobsSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public class ScheduledJobsSettings : Settings
|
||||
{
|
||||
public int PlexAvailabilityChecker { get; set; }
|
||||
public int SickRageCacher { get; set; }
|
||||
public int SonarrCacher { get; set; }
|
||||
public int CouchPotatoCacher { get; set; }
|
||||
public int StoreBackup { get; set; }
|
||||
public int StoreCleanup { get; set; }
|
||||
public int UserRequestLimitResetter { get; set; }
|
||||
public int PlexEpisodeCacher { get; set; }
|
||||
[Obsolete("We use the CRON job now")]
|
||||
public int RecentlyAdded { get; set; }
|
||||
public string RecentlyAddedCron { get; set; }
|
||||
public int FaultQueueHandler { get; set; }
|
||||
public int PlexContentCacher { get; set; }
|
||||
public int PlexUserChecker { get; set; }
|
||||
}
|
||||
}
|
33
Ombi.Core/SettingModels/Settings.cs
Normal file
33
Ombi.Core/SettingModels/Settings.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: Settings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public class Settings
|
||||
{
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
51
Ombi.Core/SettingModels/SickRageSettings.cs
Normal file
51
Ombi.Core/SettingModels/SickRageSettings.cs
Normal file
|
@ -0,0 +1,51 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: SickRageSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class SickRageSettings : ExternalSettings
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public string ApiKey { get; set; }
|
||||
public string QualityProfile { get; set; }
|
||||
|
||||
public Dictionary<string, string> Qualities => new Dictionary<string, string>
|
||||
{
|
||||
{ "default", "Use Deafult" },
|
||||
{ "sdtv", "SD TV" },
|
||||
{ "sddvd", "SD DVD" },
|
||||
{ "hdtv", "HD TV" },
|
||||
{ "rawhdtv", "Raw HD TV" },
|
||||
{ "hdwebdl", "HD Web DL" },
|
||||
{ "fullhdwebdl", "Full HD Web DL" },
|
||||
{ "hdbluray", "HD Bluray" },
|
||||
{ "fullhdbluray", "Full HD Bluray" }
|
||||
};
|
||||
}
|
||||
}
|
35
Ombi.Core/SettingModels/SlackNotificationSettings.cs
Normal file
35
Ombi.Core/SettingModels/SlackNotificationSettings.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class SlackNotificationSettings : NotificationSettings
|
||||
{
|
||||
public string WebhookUrl { get; set; }
|
||||
public string Channel { get; set; }
|
||||
public string Username { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string Team => SplitWebUrl(3);
|
||||
|
||||
[JsonIgnore]
|
||||
public string Service => SplitWebUrl(4);
|
||||
|
||||
[JsonIgnore]
|
||||
public string Token => SplitWebUrl(5);
|
||||
|
||||
private string SplitWebUrl(int index)
|
||||
{
|
||||
if (!WebhookUrl.StartsWith("http", StringComparison.InvariantCulture))
|
||||
{
|
||||
WebhookUrl = "https://" + WebhookUrl;
|
||||
}
|
||||
var split = WebhookUrl.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
return split.Length < index
|
||||
? string.Empty
|
||||
: split[index];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
38
Ombi.Core/SettingModels/SonarrSettings.cs
Normal file
38
Ombi.Core/SettingModels/SonarrSettings.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: SonarrSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public sealed class SonarrSettings : ExternalSettings
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public string ApiKey { get; set; }
|
||||
public string QualityProfile { get; set; }
|
||||
public bool SeasonFolders { get; set; }
|
||||
public string RootPath { get; set; }
|
||||
|
||||
}
|
||||
}
|
62
Ombi.Core/SettingModels/SystemSettings.cs
Normal file
62
Ombi.Core/SettingModels/SystemSettings.cs
Normal file
|
@ -0,0 +1,62 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: SystemSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
using Ombi.Core.Models;
|
||||
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public class SystemSettings : Settings
|
||||
{
|
||||
public Branches Branch { get; set; }
|
||||
public string Version { get; set; }
|
||||
public StatusModel Status { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<BranchDropdown> BranchDropdown { get; set; }
|
||||
}
|
||||
|
||||
public class BranchDropdown
|
||||
{
|
||||
public bool Selected { get; set; }
|
||||
public string Name { get; set; }
|
||||
public Branches Value { get; set; }
|
||||
}
|
||||
|
||||
public enum Branches
|
||||
{
|
||||
[Display(Name = "Stable")]
|
||||
Stable,
|
||||
|
||||
[Display(Name = "Early Access Preview")]
|
||||
EarlyAccessPreview,
|
||||
|
||||
[Display(Name = "Development")]
|
||||
Dev,
|
||||
}
|
||||
}
|
45
Ombi.Core/SettingModels/UserManagementSettings.cs
Normal file
45
Ombi.Core/SettingModels/UserManagementSettings.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: UserManagementSettings.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
namespace Ombi.Core.SettingModels
|
||||
{
|
||||
public class UserManagementSettings : Settings
|
||||
{
|
||||
public bool RequestMovies { get; set; }
|
||||
public bool RequestTvShows { get; set; }
|
||||
public bool RequestMusic { get; set; }
|
||||
public bool AutoApproveMovies { get; set; }
|
||||
public bool AutoApproveTvShows { get; set; }
|
||||
public bool AutoApproveMusic { get; set; }
|
||||
public bool ReportIssues { get; set; }
|
||||
public bool UsersCanViewOnlyOwnRequests { get; set; }
|
||||
public bool UsersCanViewOnlyOwnIssues { get; set; }
|
||||
|
||||
// Features
|
||||
public bool RecentlyAddedNotification { get; set; }
|
||||
public bool RecentlyAddedNewsletter { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue