Esempio n. 1
0
        private void NovelDownload(argumentList args, int ti, Action <int, string> u)
        {
            if (args.s)
            {
                throw new Exception("Novel Downloader does not support searching at this time.");
            }
            if (args.cc)
            {
                throw new Exception("Novel Downloader does not support continuos downloads at this time.");
            }

            IAppBase appbase;
            SiteBase bas;

            if (args.term.IsValidUri())
            {
                appbase = args.term.SiteFromString().GenerateExtractor(args, ti, u);
            }
            else
            {
                ArchiveManager am = new ArchiveManager();
                am.InitReadOnlyStream(args.term);
                string[] b;
                using (StreamReader sr = new StreamReader(am.zapive.GetEntry("main.adl").Open()))
                    b = sr.ReadToEnd().Split("\n");
                bas = MetaData.GetMeta(b).url.SiteFromString();
                am.CloseStream();
                GC.Collect();
                appbase = bas.GenerateExtractor(args, ti, u);
            }
            //Novels.DownloaderBase dbase = args.term.SiteFromString().GenerateExtractor(args, ti, u
            appbase.BeginExecution();
        }
Esempio n. 2
0
 public void ExportFinal()
 {
     acm.CloseStream();
 }