Ejemplo n.º 1
0
        private JsonResponse <NamingSampleResource> GetExamples(NamingConfigResource config)
        {
            var nameSpec       = config.ToModel();
            var sampleResource = new NamingSampleResource();

            //var singleEpisodeSampleResult = _filenameSampleService.GetStandardSample(nameSpec);
            //var multiEpisodeSampleResult = _filenameSampleService.GetMultiEpisodeSample(nameSpec);
            //var dailyEpisodeSampleResult = _filenameSampleService.GetDailySample(nameSpec);
            //var animeEpisodeSampleResult = _filenameSampleService.GetAnimeSample(nameSpec);
            //var animeMultiEpisodeSampleResult = _filenameSampleService.GetAnimeMultiEpisodeSample(nameSpec);

            var movieSampleResult = _filenameSampleService.GetMovieSample(nameSpec);


            //sampleResource.SingleEpisodeExample = _filenameValidationService.ValidateStandardFilename(singleEpisodeSampleResult) != null
            //        ? "Invalid format"
            //        : singleEpisodeSampleResult.FileName;

            //sampleResource.MultiEpisodeExample = _filenameValidationService.ValidateStandardFilename(multiEpisodeSampleResult) != null
            //        ? "Invalid format"
            //        : multiEpisodeSampleResult.FileName;

            //sampleResource.DailyEpisodeExample = _filenameValidationService.ValidateDailyFilename(dailyEpisodeSampleResult) != null
            //        ? "Invalid format"
            //        : dailyEpisodeSampleResult.FileName;

            //sampleResource.AnimeEpisodeExample = _filenameValidationService.ValidateAnimeFilename(animeEpisodeSampleResult) != null
            //        ? "Invalid format"
            //        : animeEpisodeSampleResult.FileName;

            //sampleResource.AnimeMultiEpisodeExample = _filenameValidationService.ValidateAnimeFilename(animeMultiEpisodeSampleResult) != null
            //        ? "Invalid format"
            //        : animeMultiEpisodeSampleResult.FileName;

            sampleResource.MovieExample = nameSpec.StandardMovieFormat.IsNullOrWhiteSpace()
                ? "Invalid Format"
                : movieSampleResult.FileName;

            //sampleResource.SeriesFolderExample = nameSpec.SeriesFolderFormat.IsNullOrWhiteSpace()
            //    ? "Invalid format"
            //    : _filenameSampleService.GetSeriesFolderSample(nameSpec);

            //sampleResource.SeasonFolderExample = nameSpec.SeasonFolderFormat.IsNullOrWhiteSpace()
            //    ? "Invalid format"
            //    : _filenameSampleService.GetSeasonFolderSample(nameSpec);

            sampleResource.MovieFolderExample = nameSpec.MovieFolderFormat.IsNullOrWhiteSpace()
                ? "Invalid format"
                : _filenameSampleService.GetMovieFolderSample(nameSpec);

            return(sampleResource.AsResponse());
        }
Ejemplo n.º 2
0
        private JsonResponse <NamingSampleResource> GetExamples(NamingConfigResource config)
        {
            var nameSpec       = config.ToModel();
            var sampleResource = new NamingSampleResource();

            var movieSampleResult = _filenameSampleService.GetMovieSample(nameSpec);

            sampleResource.MovieExample = nameSpec.StandardMovieFormat.IsNullOrWhiteSpace()
                ? "Invalid Format"
                : movieSampleResult.FileName;

            sampleResource.MovieFolderExample = nameSpec.MovieFolderFormat.IsNullOrWhiteSpace()
                ? "Invalid format"
                : _filenameSampleService.GetMovieFolderSample(nameSpec);

            return(sampleResource.AsResponse());
        }
Ejemplo n.º 3
0
        private object GetExamples(NamingConfigResource config)
        {
            if (config.Id == 0)
            {
                config = GetNamingConfig();
            }

            var nameSpec       = config.ToModel();
            var sampleResource = new NamingExampleResource();

            var movieSampleResult = _filenameSampleService.GetMovieSample(nameSpec);

            sampleResource.MovieExample = nameSpec.StandardMovieFormat.IsNullOrWhiteSpace()
                ? "Invalid Format"
                : movieSampleResult.FileName;

            sampleResource.MovieFolderExample = nameSpec.MovieFolderFormat.IsNullOrWhiteSpace()
                ? "Invalid format"
                : _filenameSampleService.GetMovieFolderSample(nameSpec);

            return(sampleResource);
        }