public override void Call() { if (IsCanceled) { retag.Redo(); return; } var tager = new Tager(new FileLoader()); if (!tager.Load(Menu.GetUserInput("path:"))) { throw new FileNotFoundException("File does not exist"); } Menu.PrintHelp(); Menu.PrintCurrentFile(tager.CurrentFile); var tags = GetTagsFromFileName(tager.CurrentFile); retag = new Retag(); retag.Call(tags, tager); retag.Save(); Menu.PrintSuccessMessage(); }
public void Analyze(IEnumerable <string> paths, Mask mask) { foreach (var path in Filtrate(paths)) { if (_tager.Load(path)) { if (!_tager.ValidateFileName(mask)) { NotSynchronizedFiles.Add(_tager.CurrentFile, GetFileInfo(mask)); } else { SynchronizedFiles.Add(_tager.CurrentFile); } } else { ErrorFiles.Add(path, "load error"); } } }
public override void Call() { if (IsCanceled) { rename.Redo(); return; } var tager = new Tager(new FileLoader()); // _tager.Load(@"C:\Users\Alexandr\Desktop\TEST\песня.mp3"); if (!tager.Load(Menu.GetUserInput("path:"))) { throw new FileNotFoundException("File does not exist"); } Menu.PrintHelp(); rename = new Rename(); rename.Call(new Mask(Menu.GetUserInput("mask:")), tager,tager.CurrentFile); rename.Save(); Menu.PrintSuccessMessage(); }