private static void GenerateVirtualFlac(string file) { Init("Creating..."); string fileName = new FileInfo(file).Name; string aplDirectory = Directory.GetParent(file).FullName; string[] files = Directory.GetFiles(aplDirectory, "*.apl"); foreach (string f in files) { AplFile apl = new AplFile(f); if (apl.ImageFile.ToLower() != fileName.ToLower()) { Console.WriteLine(apl.ImageFile); Console.WriteLine(fileName); throw new VfgException("Invalid apl/ image combination"); } aplFiles_.Add(apl); } new VirtualFlacCreator(file, fileName, aplFiles_.ToArray()); Done(); }
private static VorbisComments LoadMetadata(string dir, string fileName) { // load metadata AplFile metadataFile = new AplFile(Path.Combine(dir, fileName + ".apl")); return new VorbisComments(metadataFile.Metadata); }