コード例 #1
0
 public RefreshEpisodeMetadata(MediaFileProvider mediaFileProvider, SeriesProvider seriesProvider,
                                 MetadataProvider metadataProvider)
 {
     _mediaFileProvider = mediaFileProvider;
     _seriesProvider = seriesProvider;
     _metadataProvider = metadataProvider;
 }
コード例 #2
0
 public RenameSeasonJob(MediaFileProvider mediaFileProvider, DiskScanProvider diskScanProvider,
                         ExternalNotificationProvider externalNotificationProvider, SeriesProvider seriesProvider)
 {
     _mediaFileProvider = mediaFileProvider;
     _diskScanProvider = diskScanProvider;
     _externalNotificationProvider = externalNotificationProvider;
     _seriesProvider = seriesProvider;
 }
コード例 #3
0
 public ImportNewSeriesJob(SeriesProvider seriesProvider, EpisodeProvider episodeProvider,
                             MediaFileProvider mediaFileProvider, UpdateInfoJob updateInfoJob,
                             DiskScanJob diskScanJob, BannerDownloadJob bannerDownloadJob)
 {
     _seriesProvider = seriesProvider;
     _episodeProvider = episodeProvider;
     _mediaFileProvider = mediaFileProvider;
     _updateInfoJob = updateInfoJob;
     _diskScanJob = diskScanJob;
     _bannerDownloadJob = bannerDownloadJob;
 }
コード例 #4
0
 public DiskScanProvider(DiskProvider diskProvider, EpisodeProvider episodeProvider,
                         SeriesProvider seriesProvider, MediaFileProvider mediaFileProvider,
                         ExternalNotificationProvider externalNotificationProvider, DownloadProvider downloadProvider,
                         SignalRProvider signalRProvider)
 {
     _diskProvider = diskProvider;
     _episodeProvider = episodeProvider;
     _seriesProvider = seriesProvider;
     _mediaFileProvider = mediaFileProvider;
     _externalNotificationProvider = externalNotificationProvider;
     _downloadProvider = downloadProvider;
     _signalRProvider = signalRProvider;
 }
コード例 #5
0
 public DiskScanProvider(DiskProvider diskProvider, EpisodeProvider episodeProvider,
                         SeriesProvider seriesProvider, MediaFileProvider mediaFileProvider,
                         ExternalNotificationProvider externalNotificationProvider, DownloadProvider downloadProvider,
                         SignalRProvider signalRProvider, ConfigProvider configProvider,
                         RecycleBinProvider recycleBinProvider, MediaInfoProvider mediaInfoProvider)
 {
     _diskProvider                 = diskProvider;
     _episodeProvider              = episodeProvider;
     _seriesProvider               = seriesProvider;
     _mediaFileProvider            = mediaFileProvider;
     _externalNotificationProvider = externalNotificationProvider;
     _downloadProvider             = downloadProvider;
     _signalRProvider              = signalRProvider;
     _configProvider               = configProvider;
     _recycleBinProvider           = recycleBinProvider;
     _mediaInfoProvider            = mediaInfoProvider;
 }
コード例 #6
0
 public DiskScanProvider(DiskProvider diskProvider, EpisodeProvider episodeProvider,
                         SeriesProvider seriesProvider, MediaFileProvider mediaFileProvider,
                         ExternalNotificationProvider externalNotificationProvider, DownloadProvider downloadProvider,
                         SignalRProvider signalRProvider, ConfigProvider configProvider,
                         RecycleBinProvider recycleBinProvider, MediaInfoProvider mediaInfoProvider)
 {
     _diskProvider = diskProvider;
     _episodeProvider = episodeProvider;
     _seriesProvider = seriesProvider;
     _mediaFileProvider = mediaFileProvider;
     _externalNotificationProvider = externalNotificationProvider;
     _downloadProvider = downloadProvider;
     _signalRProvider = signalRProvider;
     _configProvider = configProvider;
     _recycleBinProvider = recycleBinProvider;
     _mediaInfoProvider = mediaInfoProvider;
 }
コード例 #7
0
 public EpisodeController(JobProvider jobProvider, MediaFileProvider mediaFileProvider)
 {
     _jobProvider = jobProvider;
     _mediaFileProvider = mediaFileProvider;
 }
コード例 #8
0
ファイル: MisnamedProvider.cs プロジェクト: Normmatt/NzbDrone
 public MisnamedProvider(MediaFileProvider mediaFileProvider, EpisodeProvider episodeProvider)
 {
     _mediaFileProvider = mediaFileProvider;
     _episodeProvider = episodeProvider;
 }
コード例 #9
0
        public virtual String GetDownloadTitle(EpisodeParseResult parseResult)
        {
            if (_configProvider.DownloadClientUseSceneName)
            {
                logger.Trace("Using scene name: {0}", parseResult.OriginalString);
                return(parseResult.OriginalString);
            }

            var seriesTitle = MediaFileProvider.CleanFilename(parseResult.Series.Title);

            //Handle Full Naming
            if (parseResult.FullSeason)
            {
                var seasonResult = String.Format("{0} - Season {1} [{2}]", seriesTitle,
                                                 parseResult.SeasonNumber, parseResult.Quality.Quality);

                if (parseResult.Quality.Proper)
                {
                    seasonResult += " [Proper]";
                }

                return(seasonResult);
            }

            if (parseResult.Series.IsDaily)
            {
                var dailyResult = String.Format("{0} - {1:yyyy-MM-dd} - {2} [{3}]", seriesTitle,
                                                parseResult.AirDate, parseResult.Episodes.First().Title, parseResult.Quality.Quality);

                if (parseResult.Quality.Proper)
                {
                    dailyResult += " [Proper]";
                }

                return(dailyResult);
            }

            //Show Name - 1x01-1x02 - Episode Name
            //Show Name - 1x01 - Episode Name
            var episodeString = new List <String>();
            var episodeNames  = new List <String>();

            foreach (var episode in parseResult.Episodes)
            {
                episodeString.Add(String.Format("{0}x{1:00}", episode.SeasonNumber, episode.EpisodeNumber));
                episodeNames.Add(Parser.CleanupEpisodeTitle(episode.Title));
            }

            var    epNumberString = String.Join("-", episodeString);
            string episodeName;


            if (episodeNames.Distinct().Count() == 1)
            {
                episodeName = episodeNames.First();
            }

            else
            {
                episodeName = String.Join(" + ", episodeNames.Distinct());
            }

            var result = String.Format("{0} - {1} - {2} [{3}]", seriesTitle, epNumberString, episodeName, parseResult.Quality.Quality);

            if (parseResult.Quality.Proper)
            {
                result += " [Proper]";
            }

            return(result);
        }
コード例 #10
0
 public MisnamedProvider(MediaFileProvider mediaFileProvider, EpisodeProvider episodeProvider)
 {
     _mediaFileProvider = mediaFileProvider;
     _episodeProvider   = episodeProvider;
 }