mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Added the demo to the new apis... I hate that fruit company, lets see if we can get approved now
This commit is contained in:
parent
238a673c56
commit
6e51f7f864
6 changed files with 491 additions and 3 deletions
|
@ -48,6 +48,8 @@ namespace Ombi.Core.Engine
|
|||
protected readonly ISettingsService<OmbiSettings> OmbiSettings;
|
||||
protected readonly IRepository<RequestSubscription> _subscriptionRepository;
|
||||
|
||||
private bool _demo = DemoSingleton.Instance.Demo;
|
||||
|
||||
protected async Task<Dictionary<int, MovieRequests>> GetMovieRequests()
|
||||
{
|
||||
var now = DateTime.Now.Ticks;
|
||||
|
@ -193,6 +195,23 @@ namespace Ombi.Core.Engine
|
|||
return ombiSettings ?? (ombiSettings = await OmbiSettings.GetSettingsAsync());
|
||||
}
|
||||
|
||||
protected bool DemoCheck(string title)
|
||||
{
|
||||
if (!title.HasValue())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (_demo)
|
||||
{
|
||||
if (ExcludedDemo.ExcludedContent.Any(x => title.Contains(x, System.Globalization.CompareOptions.OrdinalIgnoreCase)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public class HideResult
|
||||
{
|
||||
public bool Hide { get; set; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue