Example #1
0
        public async Task <RequestEngineResult> UpdateAdvancedOptions(MediaAdvancedOptions options)
        {
            var request = await TvRepository.Find(options.RequestId);

            if (request == null)
            {
                return(new RequestEngineResult
                {
                    Result = false,
                    ErrorCode = ErrorCode.RequestDoesNotExist,
                    ErrorMessage = "Request does not exist"
                });
            }

            request.QualityOverride = options.QualityOverride;
            request.RootFolder      = options.RootPathOverride;
            if (options.LanguageProfile > 0)
            {
                request.LanguageProfile = options.LanguageProfile;
            }

            await TvRepository.Update(request);

            return(new RequestEngineResult
            {
                Result = true
            });
        }
Example #2
0
        public async Task <RequestEngineResult> UpdateAdvancedOptions(MediaAdvancedOptions options)
        {
            var request = await MovieRepository.Find(options.RequestId);

            if (request == null)
            {
                return(new RequestEngineResult
                {
                    Result = false,
                    ErrorMessage = "Request does not exist"
                });
            }

            request.QualityOverride  = options.QualityOverride;
            request.RootPathOverride = options.RootPathOverride;

            await MovieRepository.Update(request);

            return(new RequestEngineResult
            {
                Result = true
            });
        }
Example #3
0
 public async Task <RequestEngineResult> UpdateTvAdvancedOptions([FromBody] MediaAdvancedOptions options)
 {
     return(await _tvRequestEngine.UpdateAdvancedOptions(options));
 }