Пример #1
0
        public async Task <IActionResult> GetLibrary([Required] string authKey, [Required] string plexServerUrl, string libraryKey)
        {
            if (string.IsNullOrEmpty(authKey) || string.IsNullOrEmpty(plexServerUrl) ||
                string.IsNullOrEmpty(libraryKey))
            {
                return(BadRequest());
            }

            MediaContainer library = await _plexService.GetLibrary(authKey, plexServerUrl, libraryKey);

            if (library == null)
            {
                return(NotFound());
            }

            return(Ok(library));
        }