mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-29 21:36:31 +01:00
Initial check-in of VideoInfoProvider, although it's currently disabled.
This commit is contained in:
parent
8f024e8199
commit
aae259d2cd
@@ -35,6 +35,28 @@ namespace MediaBrowser.Controller.FFMpeg
|
||||
}
|
||||
}
|
||||
|
||||
public async static Task<FFProbeResult> Run(Video item, string outputCachePath)
|
||||
{
|
||||
// Use try catch to avoid having to use File.Exists
|
||||
try
|
||||
{
|
||||
using (FileStream stream = File.OpenRead(outputCachePath))
|
||||
{
|
||||
return JsonSerializer.DeserializeFromStream<FFProbeResult>(stream);
|
||||
}
|
||||
}
|
||||
catch (FileNotFoundException)
|
||||
{
|
||||
}
|
||||
|
||||
await Run(item.Path, outputCachePath);
|
||||
|
||||
using (FileStream stream = File.OpenRead(outputCachePath))
|
||||
{
|
||||
return JsonSerializer.DeserializeFromStream<FFProbeResult>(stream);
|
||||
}
|
||||
}
|
||||
|
||||
private async static Task Run(string input, string output)
|
||||
{
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||
|
||||
Reference in New Issue
Block a user