emby-toolbox/EmbyToolbox/Models/ExternalAudioDiscovery.cs
Emby Toolbox 6264b487fe Initial commit: Emby Toolbox (conversion scroll fix, bulk Del for tracks).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-12 21:33:47 +05:00

45 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace EmbyToolbox.Models;
/// <summary>Сторонний аудиофайл (контейнер или raw), возможно с несколькими аудиопотоками.</summary>
public sealed class ExternalAudioFile
{
public ExternalAudioFile(string fullPath, IReadOnlyList<ExternalAudioStream> streams)
{
FullPath = fullPath;
Streams = streams;
}
public string FullPath { get; }
public IReadOnlyList<ExternalAudioStream> Streams { get; }
}
/// <summary>Один аудиопоток внутри <see cref="ExternalAudioFile"/> (индекс для ffmpeg <c>-map</c> <i>input:a:N</i>).</summary>
public sealed class ExternalAudioStream
{
public required string FileFullPath { get; init; }
/// <summary>Порядковый номер аудиопотока внутри файла (0 = первый audio), для <c>-map M:a:N</c>.</summary>
public int StreamOrdinal { get; init; }
public required string CodecName { get; init; }
public string? TitleFromProbe { get; init; }
public int? Channels { get; init; }
public int? SampleRateHz { get; init; }
public long? BitRateBps { get; init; }
}
/// <summary>Результат поиска sidecar: объединённые файлы для плана/ffmpeg и разобранное внешнее аудио.</summary>
public sealed class SidecarDiscoveryResult
{
public SidecarDiscoveryResult(IReadOnlyList<SidecarFile> sidecars, IReadOnlyList<ExternalAudioFile> externalAudioFiles)
{
Sidecars = sidecars;
ExternalAudioFiles = externalAudioFiles;
}
public IReadOnlyList<SidecarFile> Sidecars { get; }
/// <summary>Разбор аудиофайлов (пути совпадают с audio-<see cref="SidecarFile"/>).</summary>
public IReadOnlyList<ExternalAudioFile> ExternalAudioFiles { get; }
}