Example #1
0
        public NamingConfigModule(INamingConfigService namingConfigService,
                                  IFilenameSampleService filenameSampleService,
                                  IFilenameValidationService filenameValidationService,
                                  IBuildFileNames filenameBuilder)
            : base("config/naming")
        {
            _namingConfigService       = namingConfigService;
            _filenameSampleService     = filenameSampleService;
            _filenameValidationService = filenameValidationService;
            _filenameBuilder           = filenameBuilder;
            GetResourceSingle          = GetNamingConfig;
            GetResourceById            = GetNamingConfig;
            UpdateResource             = UpdateNamingConfig;

            Get["/samples"] = x => GetExamples(this.Bind <NamingConfigResource>());

            SharedValidator.RuleFor(c => c.MultiEpisodeStyle).InclusiveBetween(0, 5);

            /*SharedValidator.RuleFor(c => c.StandardEpisodeFormat).ValidEpisodeFormat();
             * SharedValidator.RuleFor(c => c.DailyEpisodeFormat).ValidDailyEpisodeFormat();
             * SharedValidator.RuleFor(c => c.AnimeEpisodeFormat).ValidAnimeEpisodeFormat();
             * SharedValidator.RuleFor(c => c.SeriesFolderFormat).ValidSeriesFolderFormat();
             * SharedValidator.RuleFor(c => c.SeasonFolderFormat).ValidSeasonFolderFormat();*/
            SharedValidator.RuleFor(c => c.StandardMovieFormat).ValidMovieFormat();
            SharedValidator.RuleFor(c => c.MovieFolderFormat).ValidMovieFolderFormat();
        }
Example #2
0
 public SeriesLookupModule(ISearchForNewSeries searchProxy, IBuildFileNames fileNameBuilder)
     : base("/series/lookup")
 {
     _searchProxy     = searchProxy;
     _fileNameBuilder = fileNameBuilder;
     Get("/", x => Search());
 }
Example #3
0
 public SeriesLookupModule(ISearchForNewSeries searchProxy, IBuildFileNames fileNameBuilder, IMapCoversToLocal coverMapper)
     : base("/series/lookup")
 {
     _searchProxy     = searchProxy;
     _fileNameBuilder = fileNameBuilder;
     _coverMapper     = coverMapper;
     Get("/", x => Search());
 }
Example #4
0
        public FilenameSampleService(IBuildFileNames buildFileNames)
        {
            _buildFileNames = buildFileNames;
            _standardSeries = new Series
            {
                SeriesType = SeriesTypes.Standard,
                Title      = "Series Title"
            };

            _dailySeries = new Series
            {
                SeriesType = SeriesTypes.Daily,
                Title      = "Series Title"
            };

            _episode1 = new Episode
            {
                SeasonNumber  = 1,
                EpisodeNumber = 1,
                Title         = "Episode Title (1)",
                AirDate       = "2013-10-30"
            };

            _episode2 = new Episode
            {
                SeasonNumber  = 1,
                EpisodeNumber = 2,
                Title         = "Episode Title (2)"
            };

            _singleEpisode = new List <Episode> {
                _episode1
            };
            _multiEpisodes = new List <Episode> {
                _episode1, _episode2
            };

            _singleEpisodeFile = new EpisodeFile
            {
                Quality      = new QualityModel(Quality.HDTV720p),
                Path         = @"C:\Test\Series.Title.S01E01.720p.HDTV.x264-EVOLVE.mkv",
                ReleaseGroup = "RlsGrp"
            };

            _multiEpisodeFile = new EpisodeFile
            {
                Quality      = new QualityModel(Quality.HDTV720p),
                Path         = @"C:\Test\Series.Title.S01E01-E02.720p.HDTV.x264-EVOLVE.mkv",
                ReleaseGroup = "RlsGrp"
            };

            _dailyEpisodeFile = new EpisodeFile
            {
                Quality      = new QualityModel(Quality.HDTV720p),
                Path         = @"C:\Test\Series.Title.2013.10.30.HDTV.x264-EVOLVE.mkv",
                ReleaseGroup = "RlsGrp"
            };
        }
Example #5
0
        public FileNameSampleService(IBuildFileNames buildFileNames)
        {
            _buildFileNames = buildFileNames;

            var mediaInfo = new MediaInfoModel()
            {
                VideoFormat                  = "AVC",
                VideoBitDepth                = 10,
                VideoMultiViewCount          = 2,
                VideoColourPrimaries         = "BT.2020",
                VideoTransferCharacteristics = "HLG",
                AudioFormat                  = "DTS",
                AudioChannelsContainer       = 6,
                AudioChannelPositions        = "3/2/0.1",
                AudioLanguages               = "German",
                Subtitles = "English/German"
            };

            _movieFile = new MovieFile
            {
                Quality      = new QualityModel(Quality.Bluray1080p, new Revision(2)),
                RelativePath = "The.Movie.Title.2010.1080p.BluRay.DTS.x264-EVOLVE.mkv",
                SceneName    = "The.Movie.Title.2010.1080p.BluRay.DTS.x264-EVOLVE",
                ReleaseGroup = "EVOLVE",
                MediaInfo    = mediaInfo,
                Edition      = "Ultimate extended edition",
            };

            _movie = new Movie
            {
                Title         = "The Movie: Title",
                OriginalTitle = "The Original Movie Title",
                Collection    = new MovieCollection {
                    Name = "The Movie Collection", TmdbId = 123654
                },
                Certification = "R",
                Year          = 2010,
                ImdbId        = "tt0066921",
                TmdbId        = 345691,
                MovieFile     = _movieFile,
                MovieFileId   = 1,
            };

            _customFormats = new List <CustomFormat>
            {
                new CustomFormat
                {
                    Name = "Surround Sound",
                    IncludeCustomFormatWhenRenaming = true
                },
                new CustomFormat
                {
                    Name = "x264",
                    IncludeCustomFormatWhenRenaming = true
                }
            };
        }
 public EpisodeTitleSpecification(IConfigService configService,
                                  IBuildFileNames buildFileNames,
                                  IEpisodeService episodeService,
                                  Logger logger)
 {
     _configService  = configService;
     _buildFileNames = buildFileNames;
     _episodeService = episodeService;
     _logger         = logger;
 }
        public FilenameSampleService(IBuildFileNames buildFileNames)
        {
            _buildFileNames = buildFileNames;
            _standardSeries = new Series
                              {
                                  SeriesType = SeriesTypes.Standard,
                                  Title = "Series Title"
                              };

            _dailySeries = new Series
            {
                SeriesType = SeriesTypes.Daily,
                Title = "Series Title"
            };

            _episode1 = new Episode
            {
                SeasonNumber = 1,
                EpisodeNumber = 1,
                Title = "Episode Title (1)",
                AirDate = "2013-10-30"
            };

            _episode2 = new Episode
            {
                SeasonNumber = 1,
                EpisodeNumber = 2,
                Title = "Episode Title (2)"
            };

            _singleEpisode = new List<Episode> { _episode1 };
            _multiEpisodes = new List<Episode> { _episode1, _episode2 };

            _singleEpisodeFile = new EpisodeFile
            {
                Quality = new QualityModel(Quality.HDTV720p),
                Path = @"C:\Test\Series.Title.S01E01.720p.HDTV.x264-EVOLVE.mkv",
                ReleaseGroup = "RlsGrp"
            };

            _multiEpisodeFile = new EpisodeFile
            {
                Quality = new QualityModel(Quality.HDTV720p),
                Path = @"C:\Test\Series.Title.S01E01-E02.720p.HDTV.x264-EVOLVE.mkv",
                ReleaseGroup = "RlsGrp"
            };

            _dailyEpisodeFile = new EpisodeFile
            {
                Quality = new QualityModel(Quality.HDTV720p),
                Path = @"C:\Test\Series.Title.2013.10.30.HDTV.x264-EVOLVE.mkv",
                ReleaseGroup = "RlsGrp"
            };
        }
 public MovieLookupController(ISearchForNewMovie searchProxy,
                              IProvideMovieInfo movieInfo,
                              IBuildFileNames fileNameBuilder,
                              IMapCoversToLocal coverMapper,
                              IConfigService configService)
 {
     _movieInfo       = movieInfo;
     _searchProxy     = searchProxy;
     _fileNameBuilder = fileNameBuilder;
     _coverMapper     = coverMapper;
     _configService   = configService;
 }
 public MoveEpisodeFiles(IEpisodeService episodeService,
                         IBuildFileNames buildFileNames,
                         IEventAggregator eventAggregator,
                         IDiskProvider diskProvider,
                         Logger logger)
 {
     _episodeService = episodeService;
     _buildFileNames = buildFileNames;
     _eventAggregator = eventAggregator;
     _diskProvider = diskProvider;
     _logger = logger;
 }
Example #10
0
 public MoveMovieService(IMovieService movieService,
                         IBuildFileNames filenameBuilder,
                         IDiskTransferService diskTransferService,
                         IEventAggregator eventAggregator,
                         Logger logger)
 {
     _movieService        = movieService;
     _filenameBuilder     = filenameBuilder;
     _diskTransferService = diskTransferService;
     _eventAggregator     = eventAggregator;
     _logger = logger;
 }
Example #11
0
 public AddMovieService(IMovieService movieService,
                        IProvideMovieInfo movieInfo,
                        IBuildFileNames fileNameBuilder,
                        IAddMovieValidator addMovieValidator,
                        Logger logger)
 {
     _movieService      = movieService;
     _movieInfo         = movieInfo;
     _fileNameBuilder   = fileNameBuilder;
     _addMovieValidator = addMovieValidator;
     _logger            = logger;
 }
Example #12
0
 public SeriesService(ISeriesRepository seriesRepository,
                      IEventAggregator eventAggregator,
                      IEpisodeService episodeService,
                      IBuildFileNames fileNameBuilder,
                      Logger logger)
 {
     _seriesRepository = seriesRepository;
     _eventAggregator  = eventAggregator;
     _episodeService   = episodeService;
     _fileNameBuilder  = fileNameBuilder;
     _logger           = logger;
 }
Example #13
0
 public MoveSeriesService(ISeriesService seriesService,
                          IBuildFileNames filenameBuilder,
                          IDiskProvider diskProvider,
                          IEventAggregator eventAggregator,
                          Logger logger)
 {
     _seriesService   = seriesService;
     _filenameBuilder = filenameBuilder;
     _diskProvider    = diskProvider;
     _eventAggregator = eventAggregator;
     _logger          = logger;
 }
 public EpisodeFileMovingService(IEpisodeService episodeService,
                         IBuildFileNames buildFileNames,
                         IDiskProvider diskProvider,
                         IConfigService configService,
                         Logger logger)
 {
     _episodeService = episodeService;
     _buildFileNames = buildFileNames;
     _diskProvider = diskProvider;
     _configService = configService;
     _logger = logger;
 }
Example #15
0
 public MoveEpisodeFiles(IEpisodeService episodeService,
                         IBuildFileNames buildFileNames,
                         IEventAggregator eventAggregator,
                         IDiskProvider diskProvider,
                         Logger logger)
 {
     _episodeService  = episodeService;
     _buildFileNames  = buildFileNames;
     _eventAggregator = eventAggregator;
     _diskProvider    = diskProvider;
     _logger          = logger;
 }
Example #16
0
 public AddSeriesService(ISeriesService seriesService,
                         IProvideSeriesInfo seriesInfo,
                         IBuildFileNames fileNameBuilder,
                         IAddSeriesValidator addSeriesValidator,
                         Logger logger)
 {
     _seriesService      = seriesService;
     _seriesInfo         = seriesInfo;
     _fileNameBuilder    = fileNameBuilder;
     _addSeriesValidator = addSeriesValidator;
     _logger             = logger;
 }
        public NamingConfigController(INamingConfigService namingConfigService,
                                      IFilenameSampleService filenameSampleService,
                                      IFilenameValidationService filenameValidationService,
                                      IBuildFileNames filenameBuilder)
        {
            _namingConfigService       = namingConfigService;
            _filenameSampleService     = filenameSampleService;
            _filenameValidationService = filenameValidationService;
            _filenameBuilder           = filenameBuilder;

            SharedValidator.RuleFor(c => c.StandardBookFormat).ValidBookFormat();
            SharedValidator.RuleFor(c => c.AuthorFolderFormat).ValidAuthorFolderFormat();
        }
Example #18
0
        public FileNameSampleService(IBuildFileNames buildFileNames)
        {
            _buildFileNames = buildFileNames;

            _standardAuthor = new Author
            {
                Metadata = new AuthorMetadata
                {
                    Name           = "The Author Name",
                    Disambiguation = "US Author"
                }
            };

            _standardBook = new Book
            {
                Title          = "The Book Title",
                ReleaseDate    = System.DateTime.Today,
                Author         = _standardAuthor,
                AuthorMetadata = _standardAuthor.Metadata.Value
            };

            _standardEdition = new Edition
            {
                Title = "The Edition Title",
                Book  = _standardBook
            };

            var mediaInfo = new MediaInfoModel()
            {
                AudioFormat     = "Flac Audio",
                AudioChannels   = 2,
                AudioBitrate    = 875,
                AudioBits       = 24,
                AudioSampleRate = 44100
            };

            _singleTrackFile = new BookFile
            {
                Quality      = new QualityModel(Quality.MP3_320, new Revision(2)),
                Path         = "/music/Author.Name.Book.Name.TrackNum.Track.Title.MP3256.mp3",
                SceneName    = "Author.Name.Book.Name.TrackNum.Track.Title.MP3256",
                ReleaseGroup = "RlsGrp",
                MediaInfo    = mediaInfo,
                Edition      = _standardEdition
            };

            _preferredWords = new List <string>
            {
                "iNTERNAL"
            };
        }
Example #19
0
        public FileNameSampleService(IBuildFileNames buildFileNames)
        {
            _buildFileNames = buildFileNames;

            var mediaInfo = new MediaInfoModel()
            {
                VideoFormat                  = "AVC",
                VideoBitDepth                = 10,
                VideoMultiViewCount          = 2,
                VideoColourPrimaries         = "BT.2020",
                VideoTransferCharacteristics = "PQ",
                AudioFormat                  = "DTS",
                AudioChannels                = 6,
                AudioChannelPositions        = "3/2/0.1",
                AudioLanguages               = "English",
                Subtitles = "English/German"
            };

            var mediaInfoAnime = new MediaInfoModel()
            {
                VideoFormat                  = "AVC",
                VideoBitDepth                = 10,
                VideoMultiViewCount          = 2,
                VideoColourPrimaries         = "BT.2020",
                VideoTransferCharacteristics = "PQ",
                AudioFormat                  = "DTS",
                AudioChannels                = 6,
                AudioChannelPositions        = "3/2/0.1",
                AudioLanguages               = "Japanese",
                Subtitles = "Japanese/English"
            };

            _movieFile = new MovieFile
            {
                Quality      = new QualityModel(Quality.Bluray1080p, new Revision(2)),
                RelativePath = "The.Movie.Title.2010.1080p.BluRay.DTS.x264-EVOLVE.mkv",
                SceneName    = "The.Movie.Title.2010.1080p.BluRay.DTS.x264-EVOLVE",
                ReleaseGroup = "EVOLVE",
                MediaInfo    = mediaInfo,
                Edition      = "Ultimate extended edition",
            };

            _movie = new Movie
            {
                Title       = "The Movie: Title",
                Year        = 2010,
                ImdbId      = "tt0066921",
                MovieFile   = _movieFile,
                MovieFileId = 1,
            };
        }
Example #20
0
 public AddArtistService(IArtistService artistService,
                         IArtistMetadataService artistMetadataService,
                         IProvideArtistInfo artistInfo,
                         IBuildFileNames fileNameBuilder,
                         IAddArtistValidator addArtistValidator,
                         Logger logger)
 {
     _artistService         = artistService;
     _artistMetadataService = artistMetadataService;
     _artistInfo            = artistInfo;
     _fileNameBuilder       = fileNameBuilder;
     _addArtistValidator    = addArtistValidator;
     _logger = logger;
 }
Example #21
0
 public MovieService(IMovieRepository movieRepository,
                     IEventAggregator eventAggregator,
                     IBuildFileNames fileNameBuilder,
                     IConfigService configService,
                     IImportExclusionsService exclusionService,
                     Logger logger)
 {
     _movieRepository  = movieRepository;
     _eventAggregator  = eventAggregator;
     _fileNameBuilder  = fileNameBuilder;
     _configService    = configService;
     _exclusionService = exclusionService;
     _logger           = logger;
 }
 public EpisodeFileMovingService(IEpisodeService episodeService,
                                 IUpdateEpisodeFileService updateEpisodeFileService,
                                 IBuildFileNames buildFileNames,
                                 IDiskProvider diskProvider,
                                 IConfigService configService,
                                 Logger logger)
 {
     _episodeService           = episodeService;
     _updateEpisodeFileService = updateEpisodeFileService;
     _buildFileNames           = buildFileNames;
     _diskProvider             = diskProvider;
     _configService            = configService;
     _logger = logger;
 }
Example #23
0
 public MoveArtistService(IArtistService artistService,
                          IBuildFileNames filenameBuilder,
                          IDiskProvider diskProvider,
                          IDiskTransferService diskTransferService,
                          IEventAggregator eventAggregator,
                          Logger logger)
 {
     _artistService       = artistService;
     _filenameBuilder     = filenameBuilder;
     _diskProvider        = diskProvider;
     _diskTransferService = diskTransferService;
     _eventAggregator     = eventAggregator;
     _logger = logger;
 }
Example #24
0
 public AddAuthorService(IAuthorService authorService,
                         IAuthorMetadataService authorMetadataService,
                         IProvideAuthorInfo authorInfo,
                         IBuildFileNames fileNameBuilder,
                         IAddAuthorValidator addAuthorValidator,
                         Logger logger)
 {
     _authorService         = authorService;
     _authorMetadataService = authorMetadataService;
     _authorInfo            = authorInfo;
     _fileNameBuilder       = fileNameBuilder;
     _addAuthorValidator    = addAuthorValidator;
     _logger = logger;
 }
Example #25
0
 public SeriesService(ISeriesRepository seriesRepository,
                      IEventAggregator eventAggregator,
                      ISceneMappingService sceneMappingService,
                      IEpisodeService episodeService,
                      IBuildFileNames fileNameBuilder,
                      Logger logger)
 {
     _seriesRepository = seriesRepository;
     _eventAggregator = eventAggregator;
     _sceneMappingService = sceneMappingService;
     _episodeService = episodeService;
     _fileNameBuilder = fileNameBuilder;
     _logger = logger;
 }
Example #26
0
        public NamingModule(INamingConfigService namingConfigService, IBuildFileNames buildFileNames)
            : base("config/naming")
        {
            _namingConfigService = namingConfigService;
            _buildFileNames      = buildFileNames;
            GetResourceSingle    = GetNamingConfig;
            GetResourceById      = GetNamingConfig;
            UpdateResource       = UpdateNamingConfig;

            Get["/samples"] = x => GetExamples(this.Bind <NamingConfigResource>());

            SharedValidator.RuleFor(c => c.MultiEpisodeStyle).InclusiveBetween(0, 3);
            SharedValidator.RuleFor(c => c.NumberStyle).InclusiveBetween(0, 3);
            SharedValidator.RuleFor(c => c.Separator).Matches(@"\s|\s\-\s|\.");
        }
 public ImportListMoviesController(IMovieService movieService,
                                   IProvideMovieInfo movieInfo,
                                   IBuildFileNames fileNameBuilder,
                                   IImportListMovieService listMovieService,
                                   IImportListFactory importListFactory,
                                   IImportExclusionsService importExclusionsService,
                                   IConfigService configService)
 {
     _movieService           = movieService;
     _movieInfo              = movieInfo;
     _fileNameBuilder        = fileNameBuilder;
     _listMovieService       = listMovieService;
     _importListFactory      = importListFactory;
     _importExclusionService = importExclusionsService;
     _configService          = configService;
 }
Example #28
0
 public EpisodeFileMovingService(IEpisodeService episodeService,
                         IUpdateEpisodeFileService updateEpisodeFileService,
                         IBuildFileNames buildFileNames,
                         IDiskProvider diskProvider,
                         IMediaFileAttributeService mediaFileAttributeService,
                         IConfigService configService,
                         Logger logger)
 {
     _episodeService = episodeService;
     _updateEpisodeFileService = updateEpisodeFileService;
     _buildFileNames = buildFileNames;
     _diskProvider = diskProvider;
     _mediaFileAttributeService = mediaFileAttributeService;
     _configService = configService;
     _logger = logger;
 }
Example #29
0
 public RenameBookFileService(IAuthorService authorService,
                              IMediaFileService mediaFileService,
                              IMoveBookFiles bookFileMover,
                              IEventAggregator eventAggregator,
                              IBuildFileNames filenameBuilder,
                              IDiskProvider diskProvider,
                              Logger logger)
 {
     _authorService    = authorService;
     _mediaFileService = mediaFileService;
     _bookFileMover    = bookFileMover;
     _eventAggregator  = eventAggregator;
     _filenameBuilder  = filenameBuilder;
     _diskProvider     = diskProvider;
     _logger           = logger;
 }
Example #30
0
 public MoveAuthorService(IAuthorService authorService,
                          IBuildFileNames filenameBuilder,
                          IDiskProvider diskProvider,
                          IRootFolderWatchingService rootFolderWatchingService,
                          IDiskTransferService diskTransferService,
                          IEventAggregator eventAggregator,
                          Logger logger)
 {
     _authorService             = authorService;
     _filenameBuilder           = filenameBuilder;
     _diskProvider              = diskProvider;
     _rootFolderWatchingService = rootFolderWatchingService;
     _diskTransferService       = diskTransferService;
     _eventAggregator           = eventAggregator;
     _logger = logger;
 }
Example #31
0
 public RenameEpisodeFileService(ISeriesService seriesService,
                                 IMediaFileService mediaFileService,
                                 IMoveEpisodeFiles episodeFileMover,
                                 IEventAggregator eventAggregator,
                                 IEpisodeService episodeService,
                                 IBuildFileNames filenameBuilder,
                                 Logger logger)
 {
     _seriesService    = seriesService;
     _mediaFileService = mediaFileService;
     _episodeFileMover = episodeFileMover;
     _eventAggregator  = eventAggregator;
     _episodeService   = episodeService;
     _filenameBuilder  = filenameBuilder;
     _logger           = logger;
 }
Example #32
0
 public MovieLookupModule(ISearchForNewMovie searchProxy,
                          IProvideMovieInfo movieInfo,
                          IBuildFileNames fileNameBuilder,
                          IMapCoversToLocal coverMapper,
                          IConfigService configService)
     : base("/movie/lookup")
 {
     _movieInfo       = movieInfo;
     _searchProxy     = searchProxy;
     _fileNameBuilder = fileNameBuilder;
     _coverMapper     = coverMapper;
     _configService   = configService;
     Get("/", x => Search());
     Get("/tmdb", x => SearchByTmdbId());
     Get("/imdb", x => SearchByImdbId());
 }
Example #33
0
 public RenameMovieFileService(IMovieService movieService,
                               IMediaFileService mediaFileService,
                               IMoveMovieFiles movieFileMover,
                               IEventAggregator eventAggregator,
                               IBuildFileNames filenameBuilder,
                               IDiskProvider diskProvider,
                               Logger logger)
 {
     _movieService     = movieService;
     _mediaFileService = mediaFileService;
     _movieFileMover   = movieFileMover;
     _eventAggregator  = eventAggregator;
     _filenameBuilder  = filenameBuilder;
     _diskProvider     = diskProvider;
     _logger           = logger;
 }
Example #34
0
        // Add Movie:
        // Called whenever a movie is added from the GUI (and i assume via RSS feeds also)

        // Reason for patch:
        // Movie.Path must be root directory, not a sub folder.

        public static bool AddMovie(ref Movie newMovie, ref NzbDrone.Core.Movies.MovieService __instance,
                                    ref Logger ____logger, ref IConfigService ____configService, ref IMovieRepository ____movieRepository,
                                    ref IBuildFileNames ____fileNameBuilder, ref IEventAggregator ____eventAggregator, ref Movie __result)
        {
            var movie = newMovie;

            Ensure.That(newMovie, () => movie).IsNotNull();

            Utility.WriteToConsole("Patched AddMovie called!", ConsoleColor.Green);
            Utility.WriteToConsole($"New movie {movie.Title} added, patching file path to not have sub folders...", ConsoleColor.Green);

            MoviePathState defaultState = MoviePathState.Static;

            if (!____configService.PathsDefaultStatic)
            {
                defaultState = MoviePathState.Dynamic;
            }
            if (string.IsNullOrWhiteSpace(movie.Path))
            {
                // Call the original GetMovieFolder as it does other stuff too.
                var folderName = ____fileNameBuilder.GetMovieFolder(movie);

                // But replace our movie path with the root folder path, nothing more.
                movie.Path      = newMovie.RootFolderPath;
                movie.PathState = defaultState;
            }
            else
            {
                movie.PathState = defaultState == MoviePathState.Dynamic ? MoviePathState.StaticOnce : MoviePathState.Static;
            }

            ____logger.Info("Adding Movie {0} Path: [{1}]", newMovie, newMovie.Path);

            movie.CleanTitle = newMovie.Title.CleanSeriesTitle();
            movie.SortTitle  = MovieTitleNormalizer.Normalize(movie.Title, movie.TmdbId);
            movie.Added      = DateTime.UtcNow;

            ____movieRepository.Insert(newMovie);
            ____eventAggregator.PublishEvent(new MovieAddedEvent(__instance.GetMovie(movie.Id)));

            __result = movie;

            Utility.WriteToConsole($"Patching complete, new root directory of movie {movie.Title} is {movie.Path}", ConsoleColor.Green);
            Utility.WriteToConsole("Patching complete.", ConsoleColor.Green);
            return(false);
        }
Example #35
0
 public ImportListMoviesModule(IMovieService movieService,
                               IProvideMovieInfo movieInfo,
                               IBuildFileNames fileNameBuilder,
                               IImportListMovieService listMovieService,
                               IImportListFactory importListFactory,
                               IImportExclusionsService importExclusionsService,
                               IConfigService configService)
     : base("/importlist/movie")
 {
     _movieService           = movieService;
     _movieInfo              = movieInfo;
     _fileNameBuilder        = fileNameBuilder;
     _listMovieService       = listMovieService;
     _importListFactory      = importListFactory;
     _importExclusionService = importExclusionsService;
     _configService          = configService;
     Get("/", x => GetDiscoverMovies());
 }
Example #36
0
        public FileNameSampleService(IBuildFileNames buildFileNames)
        {
            _buildFileNames = buildFileNames;

            _standardSeries = new Series
            {
                SeriesType = SeriesTypes.Standard,
                Title = "Series Title (2010)"
            };

            _dailySeries = new Series
            {
                SeriesType = SeriesTypes.Daily,
                Title = "Series Title (2010)"
            };

            _animeSeries = new Series
            {
                SeriesType = SeriesTypes.Anime,
                Title = "Series Title (2010)"
            };

            _episode1 = new Episode
            {
                SeasonNumber = 1,
                EpisodeNumber = 1,
                Title = "Episode Title (1)",
                AirDate = "2013-10-30",
                AbsoluteEpisodeNumber = 1,
            };

            _episode2 = new Episode
            {
                SeasonNumber = 1,
                EpisodeNumber = 2,
                Title = "Episode Title (2)",
                AbsoluteEpisodeNumber = 2
            };

            _episode3 = new Episode
            {
                SeasonNumber = 1,
                EpisodeNumber = 3,
                Title = "Episode Title (3)",
                AbsoluteEpisodeNumber = 3
            };

            _singleEpisode = new List<Episode> { _episode1 };
            _multiEpisodes = new List<Episode> { _episode1, _episode2, _episode3 };

            var mediaInfo = new MediaInfoModel()
            {
                VideoCodec = "AVC",
                AudioFormat = "DTS",
                AudioLanguages = "English",
                Subtitles = "English/German"
            };

            var mediaInfoAnime = new MediaInfoModel()
            {
                VideoCodec = "AVC",
                AudioFormat = "DTS",
                AudioLanguages = "Japanese",
                Subtitles = "Japanese/English"
            };

            _singleEpisodeFile = new EpisodeFile
            {
                Quality = new QualityModel(Quality.HDTV720p, new Revision(2)),
                RelativePath = "Series.Title.S01E01.720p.HDTV.x264-EVOLVE.mkv",
                SceneName = "Series.Title.S01E01.720p.HDTV.x264-EVOLVE",
                ReleaseGroup = "RlsGrp",
                MediaInfo = mediaInfo
            };

            _multiEpisodeFile = new EpisodeFile
            {
                Quality = new QualityModel(Quality.HDTV720p, new Revision(2)),
                RelativePath = "Series.Title.S01E01-E03.720p.HDTV.x264-EVOLVE.mkv",
                SceneName = "Series.Title.S01E01-E03.720p.HDTV.x264-EVOLVE",
                ReleaseGroup = "RlsGrp",
                MediaInfo = mediaInfo,
            };

            _dailyEpisodeFile = new EpisodeFile
            {
                Quality = new QualityModel(Quality.HDTV720p, new Revision(2)),
                RelativePath = "Series.Title.2013.10.30.HDTV.x264-EVOLVE.mkv",
                SceneName = "Series.Title.2013.10.30.HDTV.x264-EVOLVE",
                ReleaseGroup = "RlsGrp",
                MediaInfo = mediaInfo
            };

            _animeEpisodeFile = new EpisodeFile
            {
                Quality = new QualityModel(Quality.HDTV720p, new Revision(2)),
                RelativePath = "[RlsGroup] Series Title - 001 [720p].mkv",
                SceneName = "[RlsGroup] Series Title - 001 [720p]",
                ReleaseGroup = "RlsGrp",
                MediaInfo = mediaInfoAnime
            };

            _animeMultiEpisodeFile = new EpisodeFile
            {
                Quality = new QualityModel(Quality.HDTV720p, new Revision(2)),
                RelativePath = "[RlsGroup] Series Title - 001 - 103 [720p].mkv",
                SceneName = "[RlsGroup] Series Title - 001 - 103 [720p]",
                ReleaseGroup = "RlsGrp",
                MediaInfo = mediaInfoAnime
            };
        }