mirror of
https://github.com/muskit/MercuryConverter.git
synced 2026-06-02 20:24:26 -07:00
we can export!!
This commit is contained in:
@@ -2,11 +2,14 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
using System.Threading.Tasks;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Platform;
|
||||
using Avalonia.Platform.Storage;
|
||||
using Avalonia.Threading;
|
||||
using FFMpegCore;
|
||||
using FFMpegCore.Arguments;
|
||||
using MercuryConverter.UI;
|
||||
|
||||
namespace MercuryConverter.Utility;
|
||||
@@ -47,4 +50,19 @@ public static class Utils
|
||||
/// <param name="path">Forward-slash (/)-separated path to asset.</param>
|
||||
/// <returns></returns>
|
||||
public static Stream AssetPath(string path) => AssetLoader.Open(new Uri("avares://MercuryConverter/Assets/" + path));
|
||||
|
||||
public static string IIDToMusicFilePath(uint id)
|
||||
{
|
||||
return $"MER_BGM_S{id / 1000:D2}_{id % 1000:D3}";
|
||||
}
|
||||
|
||||
public static bool IsFFMpegAvailable()
|
||||
{
|
||||
// FFMpegArguments
|
||||
// .FromFileInput("dummy_input.mp4") // Use a dummy input, as it won't be processed
|
||||
// .OutputToFile("dummy_output.mp4", true, options => options.WithArgument(new CustomArgument("-version"))) // Request FFmpeg version
|
||||
// .ProcessSynchronously();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user