mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
The move!
This commit is contained in:
parent
1daf480b1b
commit
25526cc4d9
1147 changed files with 85 additions and 8524 deletions
61
Old/Ombi.Services/Interfaces/IAvailabilityChecker.cs
Normal file
61
Old/Ombi.Services/Interfaces/IAvailabilityChecker.cs
Normal file
|
@ -0,0 +1,61 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: IAvailabilityChecker.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.Threading.Tasks;
|
||||
using Ombi.Store.Models;
|
||||
using Ombi.Store.Models.Plex;
|
||||
|
||||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface IAvailabilityChecker
|
||||
{
|
||||
void Start();
|
||||
void CheckAndUpdateAll();
|
||||
IEnumerable<PlexContent> GetPlexMovies(IEnumerable<PlexContent> content);
|
||||
bool IsMovieAvailable(IEnumerable<PlexContent> plexMovies, string title, string year, string providerId = null);
|
||||
IEnumerable<PlexContent> GetPlexTvShows(IEnumerable<PlexContent> content);
|
||||
bool IsTvShowAvailable(IEnumerable<PlexContent> plexShows, string title, string year, string providerId = null, int[] seasons = null);
|
||||
IEnumerable<PlexContent> GetPlexAlbums(IEnumerable<PlexContent> content);
|
||||
bool IsAlbumAvailable(IEnumerable<PlexContent> plexAlbums, string title, string year, string artist);
|
||||
bool IsEpisodeAvailable(string theTvDbId, int season, int episode);
|
||||
PlexContent GetAlbum(IEnumerable<PlexContent> plexAlbums, string title, string year, string artist);
|
||||
PlexContent GetMovie(IEnumerable<PlexContent> plexMovies, string title, string year, string providerId = null);
|
||||
PlexContent GetTvShow(IEnumerable<PlexContent> plexShows, string title, string year, string providerId = null, int[] seasons = null);
|
||||
/// <summary>
|
||||
/// Gets the episode's stored in the cache.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<PlexEpisodes>> GetEpisodes();
|
||||
/// <summary>
|
||||
/// Gets the episode's stored in the cache and then filters on the TheTvDBId.
|
||||
/// </summary>
|
||||
/// <param name="theTvDbId">The tv database identifier.</param>
|
||||
/// <returns></returns>
|
||||
Task<IEnumerable<PlexEpisodes>> GetEpisodes(int theTvDbId);
|
||||
}
|
||||
}
|
8
Old/Ombi.Services/Interfaces/ICouchPotatoCacher.cs
Normal file
8
Old/Ombi.Services/Interfaces/ICouchPotatoCacher.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface ICouchPotatoCacher
|
||||
{
|
||||
void Queued();
|
||||
int[] QueuedIds();
|
||||
}
|
||||
}
|
6
Old/Ombi.Services/Interfaces/IEmbyNotificationEngine.cs
Normal file
6
Old/Ombi.Services/Interfaces/IEmbyNotificationEngine.cs
Normal file
|
@ -0,0 +1,6 @@
|
|||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface IEmbyNotificationEngine : INotificationEngine
|
||||
{
|
||||
}
|
||||
}
|
36
Old/Ombi.Services/Interfaces/IIntervals.cs
Normal file
36
Old/Ombi.Services/Interfaces/IIntervals.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: IIntervals.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.Services.Interfaces
|
||||
{
|
||||
public interface IIntervals
|
||||
{
|
||||
TimeSpan Notification { get; } // notification interval for high load
|
||||
}
|
||||
}
|
41
Old/Ombi.Services/Interfaces/IJobRecord.cs
Normal file
41
Old/Ombi.Services/Interfaces/IJobRecord.cs
Normal file
|
@ -0,0 +1,41 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: IJobRecord.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.Threading.Tasks;
|
||||
using Ombi.Store.Models;
|
||||
|
||||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface IJobRecord
|
||||
{
|
||||
void Record(string jobName);
|
||||
Task<IEnumerable<ScheduledJobs>> GetJobsAsync();
|
||||
IEnumerable<ScheduledJobs> GetJobs();
|
||||
void SetRunning(bool running, string jobName);
|
||||
}
|
||||
}
|
12
Old/Ombi.Services/Interfaces/IMassEmail.cs
Normal file
12
Old/Ombi.Services/Interfaces/IMassEmail.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
using Quartz;
|
||||
|
||||
namespace Ombi.Services.Jobs
|
||||
{
|
||||
public interface IMassEmail
|
||||
{
|
||||
void Execute(IJobExecutionContext context);
|
||||
void MassEmailAdminTest(string html, string subject);
|
||||
void SendMassEmail(string html, string subject);
|
||||
|
||||
}
|
||||
}
|
47
Old/Ombi.Services/Interfaces/INotification.cs
Normal file
47
Old/Ombi.Services/Interfaces/INotification.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: INotification.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.Threading.Tasks;
|
||||
using Ombi.Core.SettingModels;
|
||||
using Ombi.Services.Notification;
|
||||
|
||||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface INotification
|
||||
{
|
||||
string NotificationName { get; }
|
||||
|
||||
Task NotifyAsync(NotificationModel model);
|
||||
/// <summary>
|
||||
/// Sends a notification to the user, this is usually for testing the settings.
|
||||
/// </summary>
|
||||
/// <param name="model">The model.</param>
|
||||
/// <param name="settings">The settings.</param>
|
||||
/// <returns></returns>
|
||||
Task NotifyAsync(NotificationModel model, Settings settings);
|
||||
}
|
||||
}
|
40
Old/Ombi.Services/Interfaces/INotificationEngine.cs
Normal file
40
Old/Ombi.Services/Interfaces/INotificationEngine.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: INotificationEngine.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.Threading.Tasks;
|
||||
using Ombi.Core.Models;
|
||||
using Ombi.Store;
|
||||
|
||||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface INotificationEngine
|
||||
{
|
||||
Task NotifyUsers(IEnumerable<RequestedModel> modelChanged, NotificationType type);
|
||||
Task NotifyUsers(RequestedModel modelChanged, NotificationType type);
|
||||
}
|
||||
}
|
54
Old/Ombi.Services/Interfaces/INotificationService.cs
Normal file
54
Old/Ombi.Services/Interfaces/INotificationService.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: INotificationService.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.Threading.Tasks;
|
||||
using Ombi.Core.SettingModels;
|
||||
using Ombi.Services.Notification;
|
||||
|
||||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface INotificationService
|
||||
{
|
||||
/// <summary>
|
||||
/// Sends a notification to the user. This one is used in normal notification scenarios
|
||||
/// </summary>
|
||||
/// <param name="model">The model.</param>
|
||||
/// <returns></returns>
|
||||
Task Publish(NotificationModel model);
|
||||
Task PublishTest(NotificationModel model, Settings settings, INotification type);
|
||||
/// <summary>
|
||||
/// Sends a notification to the user, this is usually for testing the settings.
|
||||
/// </summary>
|
||||
/// <param name="model">The model.</param>
|
||||
/// <param name="settings">The settings.</param>
|
||||
/// <returns></returns>
|
||||
Task Publish(NotificationModel model, Settings settings);
|
||||
void Subscribe(INotification notification);
|
||||
void UnSubscribe(INotification notification);
|
||||
|
||||
}
|
||||
}
|
10
Old/Ombi.Services/Interfaces/IPlexContentCacher.cs
Normal file
10
Old/Ombi.Services/Interfaces/IPlexContentCacher.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using Quartz;
|
||||
|
||||
namespace Ombi.Services.Jobs
|
||||
{
|
||||
public interface IPlexContentCacher
|
||||
{
|
||||
void CacheContent();
|
||||
void Execute(IJobExecutionContext context);
|
||||
}
|
||||
}
|
6
Old/Ombi.Services/Interfaces/IPlexNotificationEngine.cs
Normal file
6
Old/Ombi.Services/Interfaces/IPlexNotificationEngine.cs
Normal file
|
@ -0,0 +1,6 @@
|
|||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface IPlexNotificationEngine : INotificationEngine
|
||||
{
|
||||
}
|
||||
}
|
11
Old/Ombi.Services/Interfaces/IRadarrCacher.cs
Normal file
11
Old/Ombi.Services/Interfaces/IRadarrCacher.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
using Ombi.Services.Models;
|
||||
|
||||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface IRadarrCacher
|
||||
{
|
||||
void Queued();
|
||||
int[] QueuedIds();
|
||||
}
|
||||
}
|
11
Old/Ombi.Services/Interfaces/IRecentlyAdded.cs
Normal file
11
Old/Ombi.Services/Interfaces/IRecentlyAdded.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using Quartz;
|
||||
|
||||
namespace Ombi.Services.Jobs
|
||||
{
|
||||
public interface IRecentlyAdded
|
||||
{
|
||||
void Execute(IJobExecutionContext context);
|
||||
void RecentlyAddedAdminTest();
|
||||
void StartNewsLetter();
|
||||
}
|
||||
}
|
8
Old/Ombi.Services/Interfaces/ISickRageCacher.cs
Normal file
8
Old/Ombi.Services/Interfaces/ISickRageCacher.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface ISickRageCacher
|
||||
{
|
||||
void Queued();
|
||||
int[] QueuedIds();
|
||||
}
|
||||
}
|
11
Old/Ombi.Services/Interfaces/ISonarrCacher.cs
Normal file
11
Old/Ombi.Services/Interfaces/ISonarrCacher.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
using Ombi.Services.Models;
|
||||
|
||||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface ISonarrCacher
|
||||
{
|
||||
void Queued();
|
||||
IEnumerable<SonarrCachedResult> QueuedIds();
|
||||
}
|
||||
}
|
10
Old/Ombi.Services/Interfaces/IStoreBackup.cs
Normal file
10
Old/Ombi.Services/Interfaces/IStoreBackup.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using Quartz;
|
||||
|
||||
namespace Ombi.Services.Jobs
|
||||
{
|
||||
public interface IStoreBackup
|
||||
{
|
||||
void Start();
|
||||
void Execute(IJobExecutionContext context);
|
||||
}
|
||||
}
|
10
Old/Ombi.Services/Interfaces/IStoreCleanup.cs
Normal file
10
Old/Ombi.Services/Interfaces/IStoreCleanup.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using Quartz;
|
||||
|
||||
namespace Ombi.Services.Jobs
|
||||
{
|
||||
public interface IStoreCleanup
|
||||
{
|
||||
void Execute(IJobExecutionContext context);
|
||||
void Start();
|
||||
}
|
||||
}
|
16
Old/Ombi.Services/Interfaces/IUserRequestLimitResetter.cs
Normal file
16
Old/Ombi.Services/Interfaces/IUserRequestLimitResetter.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
using Ombi.Core.SettingModels;
|
||||
using Ombi.Store.Models;
|
||||
using Quartz;
|
||||
|
||||
namespace Ombi.Services.Jobs
|
||||
{
|
||||
public interface IUserRequestLimitResetter
|
||||
{
|
||||
void AlbumLimit(PlexRequestSettings s, IEnumerable<RequestLimit> allUsers);
|
||||
void Execute(IJobExecutionContext context);
|
||||
void MovieLimit(PlexRequestSettings s, IEnumerable<RequestLimit> allUsers);
|
||||
void Start();
|
||||
void TvLimit(PlexRequestSettings s, IEnumerable<RequestLimit> allUsers);
|
||||
}
|
||||
}
|
8
Old/Ombi.Services/Interfaces/IWatcherCacher.cs
Normal file
8
Old/Ombi.Services/Interfaces/IWatcherCacher.cs
Normal file
|
@ -0,0 +1,8 @@
|
|||
namespace Ombi.Services.Interfaces
|
||||
{
|
||||
public interface IWatcherCacher
|
||||
{
|
||||
void Queued();
|
||||
string[] QueuedIds();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue