Пример #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
            });
        }