Example #1
0
        public void Visit(TVShow tvShow)
        {
            _directory = _prefs.TVShows.Directory;
            _fileName = _prefs.TVShows.FileName;

            _directory = ReplaceTVShowPlaceholders(_directory, tvShow);
            _fileName = ReplaceTVShowPlaceholders(_fileName, tvShow);
        }
Example #2
0
 internal static Job CreateTVShowJob()
 {
     var metadata = new DiscMetadata
         {
             Derived = new DiscMetadata.DerivedMetadata
                 {
                     VolumeLabel = "SCRUBS_S1_D1"
                 }
         };
     var disc = new Disc
         {
             Metadata = metadata,
             Playlists = new List<Playlist>
                 {
                     new Playlist
                         {
                             Tracks = new List<Track>
                                 {
                                     new Track
                                         {
                                             IsVideo = true,
                                             Codec = Codec.AVC,
                                             Type = TrackType.MainFeature,
                                             VideoFormat = TSVideoFormat.VIDEOFORMAT_1080p,
                                             AspectRatio = TSAspectRatio.ASPECT_16_9,
                                             Index = 0,
                                             IndexOfType = 0,
                                             IsBestGuess = true,
                                             Keep = true,
                                             Language = Language.English
                                         },
                                     new Track
                                         {
                                             IsAudio = true,
                                             Codec = Codec.DTSHDMA,
                                             Type = TrackType.MainFeature,
                                             ChannelCount = 5.1,
                                             Index = 1,
                                             IndexOfType = 0,
                                             IsBestGuess = true,
                                             Keep = true,
                                             Language = Language.English
                                         },
                                     new Track
                                         {
                                             IsSubtitle = true,
                                             Codec = Codec.PGS,
                                             Type = TrackType.MainFeature,
                                             Index = 2,
                                             IndexOfType = 0,
                                             IsBestGuess = true,
                                             Keep = true,
                                             Language = Language.English
                                         },
                                 }
                         }
                 }
         };
     var job = new Job(disc)
         {
             ReleaseMediumType = ReleaseMediumType.TVShow,
             SearchQuery = new SearchQuery
                 {
                     Title = "Scrubs",
                     Year = 2001,
                     Language = Language.English
                 }
         };
     var tvShow = new TVShow
         {
             IsSelected = true,
             Title = "Scrubs",
             Id = 76156,
             Url = "http://thetvdb.com/?tab=series&id=76156&lid=7",
             SelectedEpisodeIndex = 0
         };
     tvShow.Episodes.AddRange(new[]
         {
             new TVShow.Episode
                 {
                     SeasonNumber = 1,
                     EpisodeNumber = 1,
                     Title = "My First Day",
                     Id = 184602,
                     ReleaseDate = DateTime.Parse("2001-10-02")
                 }
         });
     job.TVShows.Add(tvShow);
     return job;
 }
Example #3
0
        private string ReplaceTVShowPlaceholders(string fsPart, TVShow tvShow)
        {
            var episode = tvShow.SelectedEpisode;
            if (episode == null)
                return fsPart;

            Replace(ref fsPart, "season", episode.SeasonNumber.ToString(_prefs.TVShows.SeasonNumberFormat));
            Replace(ref fsPart, "episode", episode.EpisodeNumber.ToString(_prefs.TVShows.EpisodeNumberFormat));
            Replace(ref fsPart, "date", episode.ReleaseDate.ToString(_prefs.TVShows.ReleaseDateFormat));
            Replace(ref fsPart, "episodetitle", episode.Title);

            return fsPart;
        }