public override void ProcessMessage(IProcessorMessage message) { if (message is ProcessorMessageExit) { LoggerWriter.WriteLine(Tokens.Info, "Processed " + NumProcessed + " folders and found " + NumSucceeded + " database entries"); } Processor.ProcessMessage(message); }
private void FreedbQuery(IEnumerable <int> lengths, DirectoryInfo dirInfo) { if (lengths.Count() > 0) { Release release = FreedbAccess.QueryRelease(lengths, dirInfo, Heuristic); if (!Object.ReferenceEquals(release, null)) { NumSucceeded++; CreateTagsFromRelease(dirInfo.FullName, release); } } else { LoggerWriter.WriteLine(Tokens.Info, "-> No files found"); } }
public void ProcessMessage(IProcessorMessage message) { if (message is ProcessorMessageExit) { LoggerWriter.WriteLine(Tokens.Info, "Processed " + NumProcessed + " folders and found " + NumSucceeded + " freedb entries"); } else if (message is ProcessorMessageAbort) { Abort = (message as ProcessorMessageAbort).Abort; } else if (message is ProcessorMessageQueryAbort) { if (Abort) { (message as ProcessorMessageQueryAbort).Abort = Abort; } } Processor.ProcessMessage(message); }
public void Process(object obj) { try { NumProcessed++; LoggerWriter.WriteDelimiter(Tokens.Info); LoggerWriter.WriteLine(Tokens.Info, "Analysing directory: \"" + (obj as DirectoryInfo).FullName + "\""); DateTime startTime = DateTime.Now; ProcessDirectory(obj as DirectoryInfo); LoggerWriter.WriteStep(Tokens.Info, "Time required", (DateTime.Now - startTime).ToString()); } catch (Exception e) { LoggerWriter.WriteLine(Tokens.Exception, e); } }
public override void Process(object obj) { try { NumProcessed++; LoggerWriter.WriteDelimiter(Tokens.Info); LoggerWriter.WriteLine(Tokens.Info, "Analysing directory: \"" + (obj as DirectoryInfo).FullName + "\""); DateTime startTime = DateTime.Now; AlbumExplorer.AlbumResult result = Explorer.ExploreDirectory(obj as DirectoryInfo); if (result.Album.Result != AlbumExplorer.ParseResult.NoMp3s) { if (result.Album.Result == AlbumExplorer.ParseResult.Fine) { LoggerWriter.WriteStep(Tokens.Info, "Status", "Required information found." + " Artist: \"" + result.Album.Words[FrameMeaning.Artist] + "\"" + " Album: \"" + result.Album.Words[FrameMeaning.Album] + "\""); WebQuery(obj as DirectoryInfo, result.Album); } else if (result.Album.Result != AlbumExplorer.ParseResult.Fine) { LoggerWriter.WriteStep(Tokens.Info, "Status", "MP3 files missing minimum information required for query (artist+album)!"); } } LoggerWriter.WriteStep(Tokens.Info, "Time required", (DateTime.Now - startTime).ToString()); } catch (Exception e) { LoggerWriter.WriteLine(Tokens.Exception, e); } }