예제 #1
0
        public IActionResult GetSubtitles([FromBody] SubtitleParameters parameters)
        {
            var item = repository.Find(parameters.Path);

            if (item == null)
            {
                return(StatusCode(404, null));
            }

            var srtItem = mediaLibraryService.GetSubtitles(item, parameters.Lang);

            if (srtItem == null)
            {
                return(StatusCode(204, null));
            }
            return(StatusCode(200, srtItem));
        }