Esempio n. 1
0
 public SourceFile(string filename, bool lookup)
 {
     _file = new FileInfo(filename);
     _lookup = lookup;
     _seriesSearch = SiteReader.ParseShowName(_file.Name);
     _s00e00 = SiteReader.ParseSeasonEpisode(_file.Name);
     _seasonNumber = SiteReader.ParseSeasonNumber(_s00e00);
     _episodeNumber = SiteReader.ParseEpisodeNumber(_s00e00);
     _series = null;
     _episode = null;
     LoadSeries();
     if (_series != null)
         LoadEpisode();
 }
Esempio n. 2
0
 private void LoadSeries()
 {
     List<TVSeries> shows = new List<TVSeries>();
     for (int j = 0; j < 5; j++)
     {
         string testShowName = _seriesSearch;
         switch (j)
         {
             case 1:
                 testShowName = (_seriesSearch.Contains(" and ")) ? _seriesSearch.Replace(" and ", " & ") : _seriesSearch;
                 break;
             case 2:
                 testShowName = _seriesSearch.Substring(_seriesSearch.IndexOf(' ') + 1);
                 break;
             case 3:
                 testShowName = _seriesSearch.Substring(0, _seriesSearch.LastIndexOf(' '));
                 break;
             case 4:
                 testShowName = _seriesSearch.Substring(_seriesSearch.IndexOf(' ') + 1, _seriesSearch.LastIndexOf(' ') - _seriesSearch.IndexOf(' ') - 1);
                 break;
             default:
                 testShowName = _seriesSearch;
                 break;
         }
         shows = SiteReader.GetSeries(testShowName);
         if (shows.Count > 0)
             break;
     }
     if (shows.Count > 0)
         _series = shows.First();
 }
Esempio n. 3
0
 public void SetSeries(TVSeries series)
 {
     _series = series;
     if (_series != null)
         LoadEpisode();
 }