Ejemplo n.º 1
0
 public string getSeasonId(string seriesId, string seasonNumber)
 {
     if (!_seasons.TryGetValue(seriesId + "_" + seasonNumber, out MxfSeason season))
     {
         Seasons.Add(season = new MxfSeason()
         {
             index        = Seasons.Count + 1,
             SeasonNumber = seasonNumber,
             Series       = getSeriesInfo(seriesId).Id,
             zap2it       = seriesId
         });
         _seasons.Add(seriesId + "_" + seasonNumber, season);
     }
     return(season.Id);
 }
Ejemplo n.º 2
0
 public MxfSeason GetSeason(string seriesId, int seasonNumber, string protoTypicalProgram)
 {
     if (_seasons.TryGetValue($"{seriesId}_{seasonNumber}", out var season))
     {
         season.ProtoTypicalProgram = season.ProtoTypicalProgram ?? protoTypicalProgram;
         return(season);
     }
     With.Seasons.Add(season = new MxfSeason
     {
         Index               = With.Seasons.Count + 1,
         mxfSeriesInfo       = GetSeriesInfo(seriesId),
         SeasonNumber        = seasonNumber,
         ProtoTypicalProgram = protoTypicalProgram
     });
     _seasons.Add(seriesId + "_" + seasonNumber, season);
     return(season);
 }