1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-20 01:42:35 +01:00

Fixed: Total runtime hours without decimal point

This commit is contained in:
Bogdan 2024-08-12 23:25:31 +03:00 committed by Qstick
parent 68c20713e5
commit 2f413c68d9

View File

@ -55,9 +55,11 @@ public static MediaInfoResource ToResource(this MediaInfoModel model, string sce
private static string FormatRuntime(TimeSpan runTime) private static string FormatRuntime(TimeSpan runTime)
{ {
if (runTime.TotalHours > 0) var hours = (int)runTime.TotalHours;
if (hours > 0)
{ {
return $"{runTime.TotalHours}:{runTime.Minutes:00}:{runTime.Seconds:00}"; return $"{hours}:{runTime.Minutes:00}:{runTime.Seconds:00}";
} }
return $"{runTime.Minutes}:{runTime.Seconds:00}"; return $"{runTime.Minutes}:{runTime.Seconds:00}";