From 6237fd614028e8aa68a0ccdff692c2e93518bde0 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 28 Jun 2025 03:00:53 +0800 Subject: [PATCH] :bug: Fix file analyze didn't generate video ratio --- DysonNetwork.Sphere/Storage/FileService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DysonNetwork.Sphere/Storage/FileService.cs b/DysonNetwork.Sphere/Storage/FileService.cs index 9db0129..d7d70fa 100644 --- a/DysonNetwork.Sphere/Storage/FileService.cs +++ b/DysonNetwork.Sphere/Storage/FileService.cs @@ -164,6 +164,8 @@ public class FileService( ["tags"] = mediaInfo.Format.Tags ?? [], ["chapters"] = mediaInfo.Chapters, }; + if (mediaInfo.PrimaryVideoStream is not null) + file.FileMeta["ratio"] = mediaInfo.PrimaryVideoStream.Width / mediaInfo.PrimaryVideoStream.Height; } catch (Exception ex) {