=== Summary: 675 files | 7 generated | 484 fresh | 4605 untracked | 4268 adopted | 355 marked | 466 validated-ok | 2+0 stale (sig+body) | 0 skipped | 0 failed | elapsed 11:08:11.442 (40091.44s) ===

This commit is contained in:
julian
2026-06-28 02:50:05 -07:00
parent a19fb90902
commit 586f02a2ca
654 changed files with 5260 additions and 0 deletions
+4
View File
@@ -5,6 +5,7 @@ namespace adas_core.Domain.Utils;
/// <summary>
/// Provides static utility methods for handling media-related operations.
/// </summary>
/// <!-- aidoc:v1 sig=448de2e -->
public static class MediaUtils
{
public static readonly Dictionary<string, string> Mapping = new(StringComparer.InvariantCultureIgnoreCase)
@@ -98,6 +99,7 @@ public static class MediaUtils
/// </summary>
/// <param name="filePath">The file path whose extension is used to resolve the MIME type.</param>
/// <returns>The corresponding MIME type string if the extension is found in the mapping; otherwise, the default <c>application/octet-stream</c> value.</returns>
/// <!-- aidoc:v1 sig=32736f8 body=5e920f2 -->
public static string GetMimeType(string filePath)
{
var extension = Path.GetExtension(filePath).ToLowerInvariant();
@@ -110,6 +112,7 @@ public static class MediaUtils
/// </summary>
/// <param name="filePath">The path of the file to evaluate.</param>
/// <returns><c>true</c> if the file extension matches one of the supported video extensions; otherwise, <c>false</c>.</returns>
/// <!-- aidoc:v1 sig=76fdeef body=e5c094c -->
public static bool IsVideoFile(string filePath)
{
// Extensiones de video soportadas
@@ -124,6 +127,7 @@ public static class MediaUtils
/// </summary>
/// <param name="videoPath">The file path of the video whose duration should be retrieved.</param>
/// <returns>The video duration in milliseconds, or null if an error occurs while reading the file.</returns>
/// <!-- aidoc:v1 sig=06def65 body=dc9235d -->
public static long? GetVideoDuration(string videoPath)
{
try