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 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(); }
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 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 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 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 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 HeadphonesSender(IHeadphonesApi api, HeadphonesSettings settings, IRequestService request) { Api = api; Settings = settings; RequestService = request; }