示例#1
0
 /// <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;
 }
示例#2
0
        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();
        }
示例#3
0
        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();
        }
示例#4
0
 /// <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;
 }
示例#5
0
        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;
        }
示例#6
0
 public SickRageSync(ISettingsService <SickRageSettings> s, ISickRageApi api, ILogger <SickRageSync> l, IExternalContext ctx)
 {
     _settings = s;
     _api      = api;
     _log      = l;
     _ctx      = ctx;
 }
        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 SickRageCacher(ISettingsService <SickRageSettings> srSettings, ISickRageApi srApi, ICacheProvider cache, IJobRecord rec)
 {
     SrSettings = srSettings;
     SrApi      = srApi;
     Cache      = cache;
     Job        = rec;
 }
示例#9
0
        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();
        }
示例#10
0
 public SickRageSync(ISettingsService <SickRageSettings> s, ISickRageApi api, ILogger <SickRageSync> l, IOmbiContext ctx)
 {
     _settings = s;
     _api      = api;
     _log      = l;
     _ctx      = ctx;
     _settings.ClearCache();
 }
示例#11
0
        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();
        }
示例#12
0
        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);
        }
示例#13
0
 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;
 }
示例#14
0
文件: TvSender.cs 项目: jwor80/Ombi
 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;
 }
示例#15
0
文件: TvSender.cs 项目: itzfk0/ombi
 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;
 }
示例#16
0
        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();
        }
示例#17
0
        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);
        }
示例#18
0
        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();
        }
示例#20
0
 public TvSenderOld(ISonarrApi sonarrApi, ISickRageApi srApi)
 {
     SonarrApi   = sonarrApi;
     SickrageApi = srApi;
 }
示例#21
0
 public TvSender(ISonarrApi sonarrApi, ISickRageApi srApi, ICacheProvider cache)
 {
     SonarrApi   = sonarrApi;
     SickrageApi = srApi;
     Cache       = cache;
 }
示例#22
0
 public SickRageCacher(ISettingsService <SickRageSettings> srSettings, ISickRageApi srApi, ICacheProvider cache)
 {
     SrSettings = srSettings;
     SrApi      = srApi;
     Cache      = cache;
 }