Esempio n. 1
0
        static void BuildSong(BuildOptions options)
        {
            string currentDir  = Directory.GetCurrentDirectory();
            string packagePath = Path.Combine(currentDir, "package");
            string songPath    = Path.Combine(currentDir, "song.json");

            if (!File.Exists(songPath))
            {
                Console.WriteLine($"Can't find \"song.json\" file in {currentDir}");
                return;
            }

            if (!Directory.Exists(packagePath))
            {
                // Create package directory
                Directory.CreateDirectory(packagePath);
            }

            var env = FEnvironment.New(packagePath, "bfforever", 2517);

            env.SavePendingChanges();


            SongManager man = new SongManager(env);

            man.ImportSong(songPath);

            //FusedSong song = FusedSong.Import(songPath);

            // TODO: Calculate audio file checksums to determine if re-encoding is needed
        }
Esempio n. 2
0
 public SongManager(FEnvironment env)
 {
     _packageManager = env;
 }
Esempio n. 3
0
 public SongManager(string packageRoot)
 {
     _packageManager = new FEnvironment();
     _packageManager.LoadPackage(packageRoot);
 }