Captures the audio container of the music tracks

Adds a Container to the audio metadata, captured with TagLibSharp from the concrete type of the parsed file during the music library scan and stored on the track through a new column and an EF migration. The container is refreshed when a file changes, survives track and artist edits and provider enrichment, and is exposed read-only in the track responses, never settable through a request.

Extracts the container resolution into a testable resolver used by the scan pipeline and the ID3 plugin, refuses to read a file that is itself a reparse point during extraction, and updates the endpoint summaries, the API and domain documentation, and the tests.
This commit is contained in:
BinaryAlley committed 2026-10-14 13:40:28 +03:00
1 parent 4ffa81fffe
commit f29f89f31f
60 files changed
+4483 -68

No files matched your search

@@ -39,6 +39,7 @@ public class TrackResponseFixture
/// <param name="albumId">Optional. The Id of the album the track belongs to.</param>
/// <param name="libraryId">Optional. The Id of the media library this track belongs to.</param>
/// <param name="path">Optional. The file system path of the track.</param>
/// <param name="container">Optional. The container of the audio file of the track.</param>
/// <param name="metadata">Optional. The audio metadata of the track.</param>
/// <param name="trackNumber">Optional. The number of the track on its disc.</param>
/// <param name="discNumber">Optional. The number of the disc the track belongs to.</param>
@@ -56,6 +57,7 @@ public class TrackResponseFixture
/// <param name="ratings">Optional. The list of ratings of the track.</param>
/// <param name="includeMusicBrainzRecordingId">Whether the MusicBrainz recording Id should be included, or forced to <see langword="null"/>.</param>
/// <param name="includeMusicBrainzTrackId">Whether the MusicBrainz track Id should be included, or forced to <see langword="null"/>.</param>
/// <param name="includeContainer">Whether the container should be included, or forced to <see langword="null"/>.</param>
/// <returns>The created <see cref="TrackResponse"/>.</returns>
public TrackResponse Create(
Guid? id = null,
@@ -78,7 +80,9 @@ public class TrackResponseFixture
List<MediaContributorReferenceDto>? contributors = null,
List<AudioRatingDto>? ratings = null,
bool includeMusicBrainzRecordingId = true,
bool includeMusicBrainzTrackId = true)
bool includeMusicBrainzTrackId = true,
bool includeContainer = true,
string? container = null)
{
return new TrackResponse(
id ?? Guid.NewGuid(),
@@ -99,7 +103,8 @@ public class TrackResponseFixture
moods ?? _moodDtoFixture.CreateMany(1),
isrcs ?? _isrcDtoFixture.CreateMany(1),
contributors ?? _mediaContributorReferenceDtoFixture.CreateMany(1),
ratings ?? _audioRatingDtoFixture.CreateMany(1));
ratings ?? _audioRatingDtoFixture.CreateMany(1),
includeContainer ? (container ?? _faker.Random.ArrayElement(["MP3", "FLAC", "OGG", "MP4", "AAC", "WAV"])) : null);
}
/// <summary>