public ApprovalModule(IRequestService service, ISonarrApi sonarrApi, ISettingsService <SonarrSettings> sonarrSettings, ISickRageApi srApi, ISettingsService <SickRageSettings> srSettings, ISettingsService <HeadphonesSettings> hpSettings, IHeadphonesApi hpApi, ISettingsService <PlexRequestSettings> pr, ITransientFaultQueue faultQueue , ISecurityExtensions security, IMovieSender movieSender, ICacheProvider cache) : base("approval", pr, security) { Before += (ctx) => Security.AdminLoginRedirect(ctx, Permissions.Administrator, Permissions.ManageRequests); Service = service; SonarrApi = sonarrApi; SonarrSettings = sonarrSettings; SickRageApi = srApi; SickRageSettings = srSettings; HeadphonesSettings = hpSettings; HeadphoneApi = hpApi; FaultQueue = faultQueue; MovieSender = movieSender; Cache = cache; Post["/approve", true] = async(x, ct) => await Approve((int)Request.Form.requestid, (string)Request.Form.qualityId); Post["/deny", true] = async(x, ct) => await DenyRequest((int)Request.Form.requestid, (string)Request.Form.reason); Post["/approveall", true] = async(x, ct) => await ApproveAll(); Post["/approveallmovies", true] = async(x, ct) => await ApproveAllMovies(); Post["/approvealltvshows", true] = async(x, ct) => await ApproveAllTVShows(); Post["/deleteallmovies", true] = async(x, ct) => await DeleteAllMovies(); Post["/deletealltvshows", true] = async(x, ct) => await DeleteAllTVShows(); Post["/deleteallalbums", true] = async(x, ct) => await DeleteAllAlbums(); }
/// <summary> /// Initializes a new instance of the <see cref="TesterController" /> class. /// </summary> public TesterController(INotificationService service, IDiscordNotification notification, IEmailNotification emailN, IPushbulletNotification pushbullet, ISlackNotification slack, IPushoverNotification po, IMattermostNotification mm, IPlexApi plex, IEmbyApi emby, IRadarrApi radarr, ISonarrApi sonarr, ILogger <TesterController> log, IEmailProvider provider, ICouchPotatoApi cpApi, ITelegramNotification telegram, ISickRageApi srApi, INewsletterJob newsletter, IMobileNotification mobileNotification, ILidarrApi lidarrApi, IGotifyNotification gotifyNotification) { Service = service; DiscordNotification = notification; EmailNotification = emailN; PushbulletNotification = pushbullet; SlackNotification = slack; PushoverNotification = po; MattermostNotification = mm; PlexApi = plex; RadarrApi = radarr; EmbyApi = emby; SonarrApi = sonarr; Log = log; EmailProvider = provider; CouchPotatoApi = cpApi; TelegramNotification = telegram; SickRageApi = srApi; Newsletter = newsletter; MobileNotification = mobileNotification; LidarrApi = lidarrApi; GotifyNotification = gotifyNotification; }
public FaultQueueHandler(IJobRecord record, IRepository <RequestQueue> repo, ISonarrApi sonarrApi, ISickRageApi srApi, ISettingsService <SonarrSettings> sonarrSettings, ISettingsService <SickRageSettings> srSettings, ICouchPotatoApi cpApi, ISettingsService <CouchPotatoSettings> cpsettings, IRequestService requestService, ISettingsService <HeadphonesSettings> hpSettings, IHeadphonesApi headphonesApi, ISettingsService <PlexRequestSettings> prSettings, ISecurityExtensions security, IMovieSender movieSender, ICacheProvider cache) { Record = record; Repo = repo; SonarrApi = sonarrApi; SrApi = srApi; CpApi = cpApi; HpApi = headphonesApi; RequestService = requestService; SickrageSettings = srSettings; SonarrSettings = sonarrSettings; CpSettings = cpsettings; HeadphoneSettings = hpSettings; Security = security; PrSettings = prSettings.GetSettings(); MovieSender = movieSender; Cache = cache; }
public SonarrController(ISonarrApi sonarr, ISonarrV3Api sonarrv3, ISettingsService <SonarrSettings> settings) { SonarrApi = sonarr; SonarrV3Api = sonarrv3; SonarrSettings = settings; SonarrSettings.ClearCache(); }
public ApprovalModule(IRequestService service, ISettingsService <CouchPotatoSettings> cpService, ICouchPotatoApi cpApi, ISonarrApi sonarrApi, ISettingsService <SonarrSettings> sonarrSettings, ISickRageApi srApi, ISettingsService <SickRageSettings> srSettings, ISettingsService <HeadphonesSettings> hpSettings, IHeadphonesApi hpApi, ISettingsService <PlexRequestSettings> pr) : base("approval", pr) { this.RequiresAnyClaim(UserClaims.Admin, UserClaims.PowerUser); Service = service; CpService = cpService; CpApi = cpApi; SonarrApi = sonarrApi; SonarrSettings = sonarrSettings; SickRageApi = srApi; SickRageSettings = srSettings; HeadphonesSettings = hpSettings; HeadphoneApi = hpApi; Post["/approve", true] = async(x, ct) => await Approve((int)Request.Form.requestid, (string)Request.Form.qualityId); Post["/deny", true] = async(x, ct) => await DenyRequest((int)Request.Form.requestid, (string)Request.Form.reason); Post["/approveall", true] = async(x, ct) => await ApproveAll(); Post["/approveallmovies", true] = async(x, ct) => await ApproveAllMovies(); Post["/approvealltvshows", true] = async(x, ct) => await ApproveAllTVShows(); Post["/deleteallmovies", true] = async(x, ct) => await DeleteAllMovies(); Post["/deletealltvshows", true] = async(x, ct) => await DeleteAllTVShows(); Post["/deleteallalbums", true] = async(x, ct) => await DeleteAllAlbums(); }
public ApplicationTesterModule(ICouchPotatoApi cpApi, ISonarrApi sonarrApi, IPlexApi plexApi, ISickRageApi srApi, IHeadphonesApi hpApi, ISettingsService <PlexRequestSettings> pr, ISecurityExtensions security, IWatcherApi watcherApi, IRadarrApi radarrApi, IEmbyApi emby) : base("test", pr, security) { this.RequiresAuthentication(); CpApi = cpApi; SonarrApi = sonarrApi; PlexApi = plexApi; SickRageApi = srApi; HeadphonesApi = hpApi; WatcherApi = watcherApi; RadarrApi = radarrApi; Emby = emby; Post["/cp"] = _ => CouchPotatoTest(); Post["/sonarr"] = _ => SonarrTest(); Post["/radarr"] = _ => RadarrTest(); Post["/plex"] = _ => PlexTest(); Post["/sickrage"] = _ => SickRageTest(); Post["/headphones"] = _ => HeadphonesTest(); Post["/plexdb"] = _ => TestPlexDb(); Post["/watcher"] = _ => WatcherTest(); Post["/emby"] = _ => EmbyTest(); }
public SonarrSync(ISettingsService <SonarrSettings> s, ISonarrApi api, ILogger <SonarrSync> l, IExternalContext ctx) { _settings = s; _api = api; _log = l; _ctx = ctx; }
/// <summary> /// Initializes a new instance of the <see cref="TesterController" /> class. /// </summary> public TesterController(INotificationService service, IDiscordNotification notification, IEmailNotification emailN, IPushbulletNotification pushbullet, ISlackNotification slack, IPushoverNotification po, IMattermostNotification mm, IPlexApi plex, IEmbyApiFactory emby, IRadarrApi radarr, ISonarrApi sonarr, ILogger <TesterController> log, IEmailProvider provider, ICouchPotatoApi cpApi, ITelegramNotification telegram, ISickRageApi srApi, INewsletterJob newsletter, ILegacyMobileNotification mobileNotification, ILidarrApi lidarrApi, IGotifyNotification gotifyNotification, IWhatsAppApi whatsAppApi, OmbiUserManager um, IWebhookNotification webhookNotification, IJellyfinApi jellyfinApi) { Service = service; DiscordNotification = notification; EmailNotification = emailN; PushbulletNotification = pushbullet; SlackNotification = slack; PushoverNotification = po; MattermostNotification = mm; PlexApi = plex; RadarrApi = radarr; EmbyApi = emby; SonarrApi = sonarr; Log = log; EmailProvider = provider; CouchPotatoApi = cpApi; TelegramNotification = telegram; SickRageApi = srApi; Newsletter = newsletter; MobileNotification = mobileNotification; LidarrApi = lidarrApi; GotifyNotification = gotifyNotification; WhatsAppApi = whatsAppApi; UserManager = um; WebhookNotification = webhookNotification; _jellyfinApi = jellyfinApi; }
public SonarrCacher(ISettingsService <SonarrSettings> sonarrSettings, ISonarrApi sonarrApi, ICacheProvider cache, IJobRecord rec) { SonarrSettings = sonarrSettings; SonarrApi = sonarrApi; Job = rec; Cache = cache; }
public IntegrationModule(ISettingsService <PlexRequestSettings> settingsService, ISettingsService <WatcherSettings> watcher, ISettingsService <CouchPotatoSettings> cp, ISecurityExtensions security, IAnalytics a, ISettingsService <RadarrSettings> radarrSettings, ICacheProvider cache, IRadarrApi radarrApi, ISonarrApi sonarrApi) : base("admin", settingsService, security) { WatcherSettings = watcher; Analytics = a; CpSettings = cp; Cache = cache; RadarrApi = radarrApi; RadarrSettings = radarrSettings; SonarrApi = sonarrApi; Before += (ctx) => Security.AdminLoginRedirect(Permissions.Administrator, ctx); Post["/sonarrrootfolders"] = _ => GetSonarrRootFolders(); Get["/watcher", true] = async(x, ct) => await Watcher(); Post["/watcher", true] = async(x, ct) => await SaveWatcher(); Get["/radarr", true] = async(x, ct) => await Radarr(); Post["/radarr", true] = async(x, ct) => await SaveRadarr(); Post["/radarrprofiles"] = _ => GetRadarrQualityProfiles(); }
public SearchModule(ICacheProvider cache, ISettingsService <CouchPotatoSettings> cpSettings, ISettingsService <PlexRequestSettings> prSettings, IAvailabilityChecker checker, IRequestService request, ISonarrApi sonarrApi, ISettingsService <SonarrSettings> sonarrSettings, ISettingsService <SickRageSettings> sickRageService, ICouchPotatoApi cpApi, ISickRageApi srApi, INotificationService notify, IMusicBrainzApi mbApi, IHeadphonesApi hpApi, ISettingsService <HeadphonesSettings> hpService, ICouchPotatoCacher cpCacher, ISonarrCacher sonarrCacher, ISickRageCacher sickRageCacher, IPlexApi plexApi, ISettingsService <PlexSettings> plexService, ISettingsService <AuthenticationSettings> auth, IRepository <UsersToNotify> u, ISettingsService <EmailNotificationSettings> email) : base("search", prSettings) { Auth = auth; PlexService = plexService; PlexApi = plexApi; CpService = cpSettings; PrService = prSettings; MovieApi = new TheMovieDbApi(); Cache = cache; Checker = checker; CpCacher = cpCacher; SonarrCacher = sonarrCacher; SickRageCacher = sickRageCacher; RequestService = request; SonarrApi = sonarrApi; SonarrService = sonarrSettings; CouchPotatoApi = cpApi; SickRageService = sickRageService; SickrageApi = srApi; NotificationService = notify; MusicBrainzApi = mbApi; HeadphonesApi = hpApi; HeadphonesService = hpService; UsersToNotifyRepo = u; EmailNotificationSettings = email; Get["/", true] = async(x, ct) => await RequestLoad(); Get["movie/{searchTerm}", true] = async(x, ct) => await SearchMovie((string)x.searchTerm); Get["tv/{searchTerm}", true] = async(x, ct) => await SearchTvShow((string)x.searchTerm); Get["music/{searchTerm}", true] = async(x, ct) => await SearchMusic((string)x.searchTerm); Get["music/coverArt/{id}"] = p => GetMusicBrainzCoverArt((string)p.id); Get["movie/upcoming", true] = async(x, ct) => await UpcomingMovies(); Get["movie/playing", true] = async(x, ct) => await CurrentlyPlayingMovies(); Post["request/movie", true] = async(x, ct) => await RequestMovie((int)Request.Form.movieId); Post["request/tv", true] = async(x, ct) => await RequestTvShow((int)Request.Form.tvId, (string)Request.Form.seasons); Post["request/album", true] = async(x, ct) => await RequestAlbum((string)Request.Form.albumId); Post["/notifyuser", true] = async(x, ct) => await NotifyUser((bool)Request.Form.notify); Get["/notifyuser", true] = async(x, ct) => await GetUserNotificationSettings(); Get["/seasons"] = x => GetSeasons(); }
public SonarrSync(ISettingsService <SonarrSettings> s, ISonarrApi api, ILogger <SonarrSync> l, IOmbiContext ctx) { _settings = s; _api = api; _log = l; _ctx = ctx; _settings.ClearCache(); }
public SonarrSync(ISettingsService <SonarrSettings> s, ISonarrApi api, ILogger <SonarrSync> l, ExternalContext ctx, IMovieDbApi movieDbApi) { _settings = s; _api = api; _log = l; _ctx = ctx; _movieDbApi = movieDbApi; _settings.ClearCache(); }
public RequestsModule( IRequestService service, ISettingsService <PlexRequestSettings> prSettings, ISettingsService <PlexSettings> plex, INotificationService notify, ISettingsService <SonarrSettings> sonarrSettings, ISettingsService <SickRageSettings> sickRageSettings, ISettingsService <CouchPotatoSettings> cpSettings, ICouchPotatoApi cpApi, ISonarrApi sonarrApi, ISickRageApi sickRageApi, ICacheProvider cache, IAnalytics an, INotificationEngine engine, ISecurityExtensions security, ISettingsService <CustomizationSettings> customSettings) : base("requests", prSettings, security) { Service = service; PrSettings = prSettings; PlexSettings = plex; NotificationService = notify; SonarrSettings = sonarrSettings; SickRageSettings = sickRageSettings; CpSettings = cpSettings; SonarrApi = sonarrApi; SickRageApi = sickRageApi; CpApi = cpApi; Cache = cache; Analytics = an; NotificationEngine = engine; CustomizationSettings = customSettings; Get["/", true] = async(x, ct) => await LoadRequests(); Get["/movies", true] = async(x, ct) => await GetMovies(); Get["/tvshows", true] = async(c, ct) => await GetTvShows(); Get["/albums", true] = async(x, ct) => await GetAlbumRequests(); Post["/delete", true] = async(x, ct) => await DeleteRequest((int)Request.Form.id); Post["/reportissue", true] = async(x, ct) => await ReportIssue((int)Request.Form.requestId, (IssueState)(int)Request.Form.issue, null); Post["/reportissuecomment", true] = async(x, ct) => await ReportIssue((int)Request.Form.requestId, IssueState.Other, (string)Request.Form.commentArea); Post["/clearissues", true] = async(x, ct) => await ClearIssue((int)Request.Form.Id); Post["/changeavailability", true] = async(x, ct) => await ChangeRequestAvailability((int)Request.Form.Id, (bool)Request.Form.Available); Post["/changeRootFolder", true] = async(x, ct) => await ChangeRootFolder((int)Request.Form.requestId, (int)Request.Form.rootFolderId); Get["/UpdateFilters", true] = async(x, ct) => await GetFilterAndSortSettings(); }
public ReleaseProfileUpdater( ILogger logger, ISonarrGuideService guide, ISonarrApi api, ISonarrCompatibility compatibility) { _log = logger; _guide = guide; _api = api; _compatibility = compatibility; }
public ReleaseProfileUpdater( ILogger logger, IReleaseProfileGuideParser parser, ISonarrApi api, ISonarrCompatibility compatibility) { Log = logger; _parser = parser; _api = api; _compatibility = compatibility; }
public TvSender(ISonarrApi sonarrApi, ILogger <TvSender> log, ISettingsService <SonarrSettings> sonarrSettings, ISettingsService <DogNzbSettings> dog, IDogNzbApi dogApi, ISettingsService <SickRageSettings> srSettings, ISickRageApi srApi) { SonarrApi = sonarrApi; Logger = log; SonarrSettings = sonarrSettings; DogNzbSettings = dog; DogNzbApi = dogApi; SickRageSettings = srSettings; SickRageApi = srApi; }
public RequestsBetaModule( IRequestService service, ISettingsService <PlexRequestSettings> prSettings, ISettingsService <RequestSettings> requestSettings, ISettingsService <PlexSettings> plex, INotificationService notify, ISettingsService <SonarrSettings> sonarrSettings, ISettingsService <SickRageSettings> sickRageSettings, ISettingsService <CouchPotatoSettings> cpSettings, ICouchPotatoApi cpApi, ISonarrApi sonarrApi, ISickRageApi sickRageApi, ICacheProvider cache, IAnalytics an) : base("requestsbeta", prSettings) { Service = service; PrSettings = prSettings; PlexSettings = plex; NotificationService = notify; SonarrSettings = sonarrSettings; SickRageSettings = sickRageSettings; CpSettings = cpSettings; SonarrApi = sonarrApi; SickRageApi = sickRageApi; CpApi = cpApi; Cache = cache; Analytics = an; Get["/"] = x => LoadRequests(); Get["/plexrequestsettings", true] = async(x, ct) => await GetPlexRequestSettings(); Get["/requestsettings", true] = async(x, ct) => await GetRequestSettings(); Get["/movies", true] = async(x, ct) => await GetMovies(); Get["/movies/{searchTerm}", true] = async(x, ct) => await GetMovies((string)x.searchTerm); // Everything below is not being used in the beta page Get["/tvshows", true] = async(c, ct) => await GetTvShows(); Get["/albums", true] = async(x, ct) => await GetAlbumRequests(); Post["/delete", true] = async(x, ct) => await DeleteRequest((int)Request.Form.id); Post["/reportissue", true] = async(x, ct) => await ReportIssue((int)Request.Form.requestId, (IssueState)(int)Request.Form.issue, null); Post["/reportissuecomment", true] = async(x, ct) => await ReportIssue((int)Request.Form.requestId, IssueState.Other, (string)Request.Form.commentArea); Post["/clearissues", true] = async(x, ct) => await ClearIssue((int)Request.Form.Id); Post["/changeavailability", true] = async(x, ct) => await ChangeRequestAvailability((int)Request.Form.Id, (bool)Request.Form.Available); }
public TvSender(ISonarrApi sonarrApi, ILogger <TvSender> log, ISettingsService <SonarrSettings> sonarrSettings, ISettingsService <DogNzbSettings> dog, IDogNzbApi dogApi, ISettingsService <SickRageSettings> srSettings, ISickRageApi srApi, IRepository <UserQualityProfiles> userProfiles) { SonarrApi = sonarrApi; Logger = log; SonarrSettings = sonarrSettings; DogNzbSettings = dog; DogNzbApi = dogApi; SickRageSettings = srSettings; SickRageApi = srApi; UserQualityProfiles = userProfiles; }
public TvSender(ISonarrApi sonarrApi, ISonarrV3Api sonarrV3Api, ILogger <TvSender> log, ISettingsService <SonarrSettings> sonarrSettings, ISettingsService <DogNzbSettings> dog, IDogNzbApi dogApi, ISettingsService <SickRageSettings> srSettings, ISickRageApi srApi, IRepository <UserQualityProfiles> userProfiles, IRepository <RequestQueue> requestQueue, INotificationHelper notify) { SonarrApi = sonarrApi; SonarrV3Api = sonarrV3Api; Logger = log; SonarrSettings = sonarrSettings; DogNzbSettings = dog; DogNzbApi = dogApi; SickRageSettings = srSettings; SickRageApi = srApi; UserQualityProfiles = userProfiles; _requestQueueRepository = requestQueue; _notificationHelper = notify; }
public ApplicationTesterModule(ICouchPotatoApi cpApi, ISonarrApi sonarrApi, IPlexApi plexApi, ISickRageApi srApi, IHeadphonesApi hpApi, ISettingsService <PlexRequestSettings> pr) : base("test", pr) { this.RequiresAuthentication(); CpApi = cpApi; SonarrApi = sonarrApi; PlexApi = plexApi; SickRageApi = srApi; HeadphonesApi = hpApi; Post["/cp"] = _ => CouchPotatoTest(); Post["/sonarr"] = _ => SonarrTest(); Post["/plex"] = _ => PlexTest(); Post["/sickrage"] = _ => SickRageTest(); Post["/headphones"] = _ => HeadphonesTest(); }
public SearchModule(ICacheProvider cache, ISettingsService <CouchPotatoSettings> cpSettings, ISettingsService <PlexRequestSettings> prSettings, IAvailabilityChecker checker, IRequestService request, ISonarrApi sonarrApi, ISettingsService <SonarrSettings> sonarrSettings, ISettingsService <SickRageSettings> sickRageService, ICouchPotatoApi cpApi, ISickRageApi srApi, INotificationService notify, IMusicBrainzApi mbApi, IHeadphonesApi hpApi, ISettingsService <HeadphonesSettings> hpService, ICouchPotatoCacher cpCacher, ISonarrCacher sonarrCacher, ISickRageCacher sickRageCacher, IPlexApi plexApi, ISettingsService <PlexSettings> plexService, ISettingsService <AuthenticationSettings> auth) : base("search") { Auth = auth; PlexService = plexService; PlexApi = plexApi; CpService = cpSettings; PrService = prSettings; MovieApi = new TheMovieDbApi(); TvApi = new TheTvDbApi(); Cache = cache; Checker = checker; CpCacher = cpCacher; SonarrCacher = sonarrCacher; SickRageCacher = sickRageCacher; RequestService = request; SonarrApi = sonarrApi; SonarrService = sonarrSettings; CouchPotatoApi = cpApi; SickRageService = sickRageService; SickrageApi = srApi; NotificationService = notify; MusicBrainzApi = mbApi; HeadphonesApi = hpApi; HeadphonesService = hpService; Get["/"] = parameters => RequestLoad(); Get["movie/{searchTerm}"] = parameters => SearchMovie((string)parameters.searchTerm); Get["tv/{searchTerm}"] = parameters => SearchTvShow((string)parameters.searchTerm); Get["music/{searchTerm}"] = parameters => SearchMusic((string)parameters.searchTerm); Get["music/coverArt/{id}"] = p => GetMusicBrainzCoverArt((string)p.id); Get["movie/upcoming"] = parameters => UpcomingMovies(); Get["movie/playing"] = parameters => CurrentlyPlayingMovies(); Post["request/movie"] = parameters => RequestMovie((int)Request.Form.movieId); Post["request/tv"] = parameters => RequestTvShow((int)Request.Form.tvId, (string)Request.Form.seasons); Post["request/album"] = parameters => RequestAlbum((string)Request.Form.albumId); }
public RequestsModule( IRequestService service, ISettingsService <PlexRequestSettings> prSettings, ISettingsService <PlexSettings> plex, INotificationService notify, ISettingsService <SonarrSettings> sonarrSettings, ISettingsService <SickRageSettings> sickRageSettings, ISettingsService <CouchPotatoSettings> cpSettings, ICouchPotatoApi cpApi, ISonarrApi sonarrApi, ISickRageApi sickRageApi, ICacheProvider cache) : base("requests", prSettings) { Service = service; PrSettings = prSettings; PlexSettings = plex; NotificationService = notify; SonarrSettings = sonarrSettings; SickRageSettings = sickRageSettings; CpSettings = cpSettings; SonarrApi = sonarrApi; SickRageApi = sickRageApi; CpApi = cpApi; Cache = cache; Get["/"] = _ => LoadRequests(); Get["/movies", true] = async(x, ct) => await GetMovies(); Get["/tvshows", true] = async(c, ct) => await GetTvShows(); Get["/albums", true] = async(x, ct) => await GetAlbumRequests(); Post["/delete", true] = async(x, ct) => await DeleteRequest((int)Request.Form.id); Post["/reportissue", true] = async(x, ct) => await ReportIssue((int)Request.Form.requestId, (IssueState)(int)Request.Form.issue, null); Post["/reportissuecomment", true] = async(x, ct) => await ReportIssue((int)Request.Form.requestId, IssueState.Other, (string)Request.Form.commentArea); Post["/clearissues", true] = async(x, ct) => await ClearIssue((int)Request.Form.Id); Post["/changeavailability", true] = async(x, ct) => await ChangeRequestAvailability((int)Request.Form.Id, (bool)Request.Form.Available); Post["/addnote", true] = async(x, ct) => await AddNote((int)Request.Form.requestId, (string)Request.Form.noteArea); }
public ApprovalModule(IRequestService service, ISettingsService <CouchPotatoSettings> cpService, ICouchPotatoApi cpApi, ISonarrApi sonarrApi, ISettingsService <SonarrSettings> sonarrSettings, ISickRageApi srApi, ISettingsService <SickRageSettings> srSettings, ISettingsService <HeadphonesSettings> hpSettings, IHeadphonesApi hpApi, ISettingsService <PlexRequestSettings> pr) : base("approval", pr) { this.RequiresClaims(UserClaims.Admin); Service = service; CpService = cpService; CpApi = cpApi; SonarrApi = sonarrApi; SonarrSettings = sonarrSettings; SickRageApi = srApi; SickRageSettings = srSettings; HeadphonesSettings = hpSettings; HeadphoneApi = hpApi; Post["/approve"] = parameters => Approve((int)Request.Form.requestid, (string)Request.Form.qualityId); Post["/approveall"] = x => ApproveAll(); Post["/approveallmovies"] = x => ApproveAllMovies(); Post["/approvealltvshows"] = x => ApproveAllTVShows(); }
public TvSenderOld(ISonarrApi sonarrApi, ISickRageApi srApi) { SonarrApi = sonarrApi; SickrageApi = srApi; }
public TvSender(ISonarrApi sonarrApi, ISickRageApi srApi, ICacheProvider cache) { SonarrApi = sonarrApi; SickrageApi = srApi; Cache = cache; }
public SonarrCacher(ISettingsService <SonarrSettings> sonarrSettings, ISonarrApi sonarrApi, ICacheProvider cache) { SonarrSettings = sonarrSettings; SonarrApi = sonarrApi; Cache = cache; }
public SonarrController(ISonarrApi sonarr, ISettingsService <SonarrSettings> settings) { SonarrApi = sonarr; SonarrSettings = settings; }
public AdminModule(ISettingsService <PlexRequestSettings> prService, ISettingsService <CouchPotatoSettings> cpService, ISettingsService <AuthenticationSettings> auth, ISettingsService <PlexSettings> plex, ISettingsService <SonarrSettings> sonarr, ISettingsService <SickRageSettings> sickrage, ISonarrApi sonarrApi, ISettingsService <EmailNotificationSettings> email, IPlexApi plexApi, ISettingsService <PushbulletNotificationSettings> pbSettings, PushbulletApi pbApi, ICouchPotatoApi cpApi, ISettingsService <PushoverNotificationSettings> pushoverSettings, IPushoverApi pushoverApi, IRepository <LogEntity> logsRepo, INotificationService notify, ISettingsService <HeadphonesSettings> headphones, ISettingsService <LogSettings> logs, ICacheProvider cache, ISettingsService <SlackNotificationSettings> slackSettings, ISlackApi slackApi) : base("admin", prService) { PrService = prService; CpService = cpService; AuthService = auth; PlexService = plex; SonarrService = sonarr; SonarrApi = sonarrApi; EmailService = email; PlexApi = plexApi; PushbulletService = pbSettings; PushbulletApi = pbApi; CpApi = cpApi; SickRageService = sickrage; LogsRepo = logsRepo; PushoverService = pushoverSettings; PushoverApi = pushoverApi; NotificationService = notify; HeadphonesService = headphones; LogService = logs; Cache = cache; SlackSettings = slackSettings; SlackApi = slackApi; this.RequiresClaims(UserClaims.Admin); Get["/"] = _ => Admin(); Get["/authentication"] = _ => Authentication(); Post["/authentication"] = _ => SaveAuthentication(); Post["/"] = _ => SaveAdmin(); Post["/requestauth"] = _ => RequestAuthToken(); Get["/getusers"] = _ => GetUsers(); Get["/couchpotato"] = _ => CouchPotato(); Post["/couchpotato"] = _ => SaveCouchPotato(); Get["/plex"] = _ => Plex(); Post["/plex"] = _ => SavePlex(); Get["/sonarr"] = _ => Sonarr(); Post["/sonarr"] = _ => SaveSonarr(); Get["/sickrage"] = _ => Sickrage(); Post["/sickrage"] = _ => SaveSickrage(); Post["/sonarrprofiles"] = _ => GetSonarrQualityProfiles(); Post["/cpprofiles"] = _ => GetCpProfiles(); Get["/emailnotification"] = _ => EmailNotifications(); Post["/emailnotification"] = _ => SaveEmailNotifications(); Post["/testemailnotification"] = _ => TestEmailNotifications(); Get["/status"] = _ => Status(); Get["/pushbulletnotification"] = _ => PushbulletNotifications(); Post["/pushbulletnotification"] = _ => SavePushbulletNotifications(); Post["/testpushbulletnotification"] = _ => TestPushbulletNotifications(); Get["/pushovernotification"] = _ => PushoverNotifications(); Post["/pushovernotification"] = _ => SavePushoverNotifications(); Post["/testpushovernotification"] = _ => TestPushoverNotifications(); Get["/logs"] = _ => Logs(); Get["/loglevel"] = _ => GetLogLevels(); Post["/loglevel"] = _ => UpdateLogLevels(Request.Form.level); Get["/loadlogs"] = _ => LoadLogs(); Get["/headphones"] = _ => Headphones(); Post["/headphones"] = _ => SaveHeadphones(); Post["/createapikey"] = x => CreateApiKey(); Post["/autoupdate"] = x => AutoUpdate(); Post["/testslacknotification"] = _ => TestSlackNotification(); Get["/slacknotification"] = _ => SlackNotifications(); Post["/slacknotification"] = _ => SaveSlackNotifications(); }
public AdminModule(ISettingsService <PlexRequestSettings> prService, ISettingsService <CouchPotatoSettings> cpService, ISettingsService <AuthenticationSettings> auth, ISettingsService <PlexSettings> plex, ISettingsService <SonarrSettings> sonarr, ISettingsService <SickRageSettings> sickrage, ISonarrApi sonarrApi, ISettingsService <EmailNotificationSettings> email, IPlexApi plexApi, ISettingsService <PushbulletNotificationSettings> pbSettings, PushbulletApi pbApi, ICouchPotatoApi cpApi, ISettingsService <PushoverNotificationSettings> pushoverSettings, ISettingsService <NewletterSettings> newsletter, IPushoverApi pushoverApi, IRepository <LogEntity> logsRepo, INotificationService notify, ISettingsService <HeadphonesSettings> headphones, ISettingsService <LogSettings> logs, ICacheProvider cache, ISettingsService <SlackNotificationSettings> slackSettings, ISlackApi slackApi, ISettingsService <LandingPageSettings> lp, ISettingsService <ScheduledJobsSettings> scheduler, IJobRecord rec, IAnalytics analytics, ISettingsService <NotificationSettingsV2> notifyService, IRecentlyAdded recentlyAdded, ISettingsService <WatcherSettings> watcherSettings , ISecurityExtensions security) : base("admin", prService, security) { PrService = prService; CpService = cpService; AuthService = auth; PlexService = plex; SonarrService = sonarr; SonarrApi = sonarrApi; EmailService = email; PlexApi = plexApi; PushbulletService = pbSettings; PushbulletApi = pbApi; CpApi = cpApi; SickRageService = sickrage; LogsRepo = logsRepo; PushoverService = pushoverSettings; PushoverApi = pushoverApi; NotificationService = notify; HeadphonesService = headphones; NewsLetterService = newsletter; LogService = logs; Cache = cache; SlackSettings = slackSettings; SlackApi = slackApi; LandingSettings = lp; ScheduledJobSettings = scheduler; JobRecorder = rec; Analytics = analytics; NotifySettings = notifyService; RecentlyAdded = recentlyAdded; WatcherSettings = watcherSettings; Before += (ctx) => Security.AdminLoginRedirect(Permissions.Administrator, ctx); Get["/"] = _ => Admin(); Get["/authentication", true] = async(x, ct) => await Authentication(); Post["/authentication", true] = async(x, ct) => await SaveAuthentication(); Post["/", true] = async(x, ct) => await SaveAdmin(); Post["/requestauth"] = _ => RequestAuthToken(); Get["/getusers"] = _ => GetUsers(); Get["/couchpotato"] = _ => CouchPotato(); Post["/couchpotato"] = _ => SaveCouchPotato(); Get["/plex"] = _ => Plex(); Post["/plex", true] = async(x, ct) => await SavePlex(); Get["/sonarr"] = _ => Sonarr(); Post["/sonarr"] = _ => SaveSonarr(); Get["/sickrage"] = _ => Sickrage(); Post["/sickrage"] = _ => SaveSickrage(); Post["/sonarrprofiles"] = _ => GetSonarrQualityProfiles(); Post["/cpprofiles", true] = async(x, ct) => await GetCpProfiles(); Post["/cpapikey"] = x => GetCpApiKey(); Get["/emailnotification"] = _ => EmailNotifications(); Post["/emailnotification"] = _ => SaveEmailNotifications(); Post["/testemailnotification", true] = async(x, ct) => await TestEmailNotifications(); Get["/pushbulletnotification"] = _ => PushbulletNotifications(); Post["/pushbulletnotification"] = _ => SavePushbulletNotifications(); Post["/testpushbulletnotification", true] = async(x, ct) => await TestPushbulletNotifications(); Get["/pushovernotification"] = _ => PushoverNotifications(); Post["/pushovernotification"] = _ => SavePushoverNotifications(); Post["/testpushovernotification", true] = async(x, ct) => await TestPushoverNotifications(); Get["/logs"] = _ => Logs(); Get["/loglevel"] = _ => GetLogLevels(); Post["/loglevel"] = _ => UpdateLogLevels(Request.Form.level); Get["/loadlogs"] = _ => LoadLogs(); Get["/headphones"] = _ => Headphones(); Post["/headphones"] = _ => SaveHeadphones(); Get["/newsletter"] = _ => Newsletter(); Post["/newsletter"] = _ => SaveNewsletter(); Post["/createapikey"] = x => CreateApiKey(); Post["/testslacknotification", true] = async(x, ct) => await TestSlackNotification(); Get["/slacknotification"] = _ => SlackNotifications(); Post["/slacknotification"] = _ => SaveSlackNotifications(); Get["/landingpage", true] = async(x, ct) => await LandingPage(); Post["/landingpage", true] = async(x, ct) => await SaveLandingPage(); Get["/scheduledjobs", true] = async(x, ct) => await GetScheduledJobs(); Post["/scheduledjobs", true] = async(x, ct) => await SaveScheduledJobs(); Post["/clearlogs", true] = async(x, ct) => await ClearLogs(); Get["/notificationsettings", true] = async(x, ct) => await NotificationSettings(); Post["/notificationsettings"] = x => SaveNotificationSettings(); Post["/recentlyAddedTest"] = x => RecentlyAddedTest(); }