Esempio n. 1
0
        public AddModifyRule(ShowRule rule, [NotNull] ShowItem show, int seasonNumber)
        {
            mRule   = rule;
            mSeason = show.GetSeason(seasonNumber);
            mOrder  = show.Order;

            InitializeComponent();

            FillDialog();
        }
Esempio n. 2
0
        // ReSharper disable once MemberCanBePrivate.Global
        public static string WebsiteSeasonUrl(string slug, Season.SeasonType type, int seasonNumber)
        {
            //format: https://thetvdb.com/series/the-terror/seasons/official/2
            switch (type)
            {
            case Season.SeasonType.dvd:
                return($"{WebsiteRoot}/series/{slug}/seasons/dvd/{seasonNumber}");

            case Season.SeasonType.aired:
                return($"{WebsiteRoot}/series/{slug}/seasons/official/{seasonNumber}");

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
Esempio n. 3
0
        // ReSharper disable once MemberCanBePrivate.Global
        public static string WebsiteSeasonUrl(int seriesId, Season.SeasonType type, int seasonNumber)
        {
            //format: return $"{WebsiteRoot}/?tab=season&seriesid={seriesId}&seasonid={seasonId}";
            switch (type)
            {
            case Season.SeasonType.dvd:
                return($"{WebsiteRoot}/series/{seriesId}/seasons/dvd/{seasonNumber}");

            case Season.SeasonType.aired:
                return($"{WebsiteRoot}/series/{seriesId}/seasons/official/{seasonNumber}");

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
Esempio n. 4
0
        public int GetSeasonIndex(int seasonNumber, Season.SeasonType type)
        {
            Dictionary <int, Season> appropriateSeasons = type == Season.SeasonType.aired ? AiredSeasons : DvdSeasons;

            List <int> seasonNumbers = new List <int>();

            foreach (KeyValuePair <int, Season> sn in appropriateSeasons)
            {
                if (sn.Value.IsSpecial())
                {
                    continue;
                }

                seasonNumbers.Add(sn.Value.SeasonNumber);
            }

            seasonNumbers.Sort();

            return(seasonNumbers.IndexOf(seasonNumber) + 1);
        }
Esempio n. 5
0
        public bool HasAnyAirdates(int snum, Season.SeasonType type)
        {
            Dictionary <int, Season> seasonsToUse = type == Season.SeasonType.dvd ? DvdSeasons : AiredSeasons;

            return(seasonsToUse.ContainsKey(snum) && seasonsToUse[snum].Episodes.Values.Any(e => e.FirstAired != null));
        }