public clInfoSerie getInfoSerie(string file) { clInfoSerie tmp_info = null; Console.WriteLine("File: {0}",file); MatchCollection found = m_regExX.Matches(file); if (found.Count > 0) { tmp_info = getSplitFile(file, found[0].Groups[0].Value); return tmp_info; } found = m_regExSE.Matches(file); if (found.Count > 0) { tmp_info = getSplitFile(file, found[0].Groups[0].Value); return tmp_info; } tmp_info = new clInfoSerie(); return tmp_info; }
public clSubtitledown() { m_sBaseUrl = @"http://www.italiansubs.net/"; m_RegExp = "<td><h3>.*?href=\"([^\"]*?)\">([^<]*)</a>"; //m_RegExpEpisode = "<dd><img.*?href=\"([^\\\"]*?)\">([^<]*)</a>"; m_RegExpEpisode = "<dd><a href=\"([^\"]*?)\"><img.*?href=\"([^\"]*?)\">([^<]*)</a>"; m_RegExpDownload = "<a href=\"(.*)\" rel=\"nofollow\">"; //m_RegExpDownload = ".*rel=\"nofollow\"*?href=\"(.*?fname=([^\\&]*)&.*?)>"; m_sUserName = ""; m_sPassword = ""; m_Serie = new clInfoSerie(); Engine = new Regex(m_RegExp, RegexOptions.IgnoreCase); EpisodeEngine = new Regex(m_RegExpEpisode, RegexOptions.IgnoreCase); DownloadEngine = new Regex(m_RegExpDownload, RegexOptions.IgnoreCase); m_workback = new BackgroundWorker(); m_workback.WorkerReportsProgress = true; m_workback.WorkerSupportsCancellation = true; m_workback.DoWork += new DoWorkEventHandler(m_workback_DoWork); m_workback.RunWorkerCompleted += new RunWorkerCompletedEventHandler(m_workback_RunWorkerCompleted); }
private clInfoSerie getSplitFile(string file, string parte) { clInfoSerie tmp = new clInfoSerie(); tmp.File = file; tmp.Telefilm = getTelefilm(file, parte); tmp.Serie = getSerie(parte); tmp.Puntata = getPuntata(parte); return tmp; }