Example #1
0
        public Main(string[] arguments, int ti = -1, Action <int, string> u = null)
        {
            ArgumentObject args = new ArgumentObject(arguments);

            Restart :;
            if (args.arguments.mn == "nvl")
            {
                NovelDownload(args.arguments, ti, u);
            }
            else if (args.arguments.mn == "ani")
            {
                AnimeDownload(args.arguments, ti, u);
            }
            else
            {
                if (!searchMN(ref args))
                {
                    u?.Invoke(ti, "Error: could not parse command (Failure to parse website to ani/nvl flag.. you can retry with ani/nvl flag)");
                    ADLUpdates.CallError(new Exception("Error: Could not parse command (mn selector)"));
                    return;
                }
                else
                {
                    goto Restart;
                }
            }
        }
Example #2
0
 public void InitializeZipper(string loc, bool dc = false)
 {
     try
     {
         bookStream = new FileStream(loc, dc ? FileMode.Open : FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite);
         zapive     = new ZipArchive(bookStream, ZipArchiveMode.Update, true);
     }
     catch
     {
         ADLUpdates.CallError(new Exception("Failed to initialize stream."));
     }
 }