mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Fix missing music genre metadata (#14332)
This commit is contained in:
parent
96c9f4fdad
commit
b528c1100f
@ -701,7 +701,7 @@ public sealed class BaseItemRepository
|
|||||||
dto.TotalBitrate = entity.TotalBitrate;
|
dto.TotalBitrate = entity.TotalBitrate;
|
||||||
dto.ExternalId = entity.ExternalId;
|
dto.ExternalId = entity.ExternalId;
|
||||||
dto.Size = entity.Size;
|
dto.Size = entity.Size;
|
||||||
dto.Genres = entity.Genres?.Split('|') ?? [];
|
dto.Genres = string.IsNullOrWhiteSpace(entity.Genres) ? [] : entity.Genres.Split('|');
|
||||||
dto.DateCreated = entity.DateCreated.GetValueOrDefault();
|
dto.DateCreated = entity.DateCreated.GetValueOrDefault();
|
||||||
dto.DateModified = entity.DateModified.GetValueOrDefault();
|
dto.DateModified = entity.DateModified.GetValueOrDefault();
|
||||||
dto.ChannelId = entity.ChannelId ?? Guid.Empty;
|
dto.ChannelId = entity.ChannelId ?? Guid.Empty;
|
||||||
@ -733,7 +733,7 @@ public sealed class BaseItemRepository
|
|||||||
dto.ExtraIds = string.IsNullOrWhiteSpace(entity.ExtraIds) ? [] : entity.ExtraIds.Split('|').Select(e => Guid.Parse(e)).ToArray();
|
dto.ExtraIds = string.IsNullOrWhiteSpace(entity.ExtraIds) ? [] : entity.ExtraIds.Split('|').Select(e => Guid.Parse(e)).ToArray();
|
||||||
dto.ProductionLocations = entity.ProductionLocations?.Split('|') ?? [];
|
dto.ProductionLocations = entity.ProductionLocations?.Split('|') ?? [];
|
||||||
dto.Studios = entity.Studios?.Split('|') ?? [];
|
dto.Studios = entity.Studios?.Split('|') ?? [];
|
||||||
dto.Tags = entity.Tags?.Split('|') ?? [];
|
dto.Tags = string.IsNullOrWhiteSpace(entity.Tags) ? [] : entity.Tags.Split('|');
|
||||||
|
|
||||||
if (dto is IHasProgramAttributes hasProgramAttributes)
|
if (dto is IHasProgramAttributes hasProgramAttributes)
|
||||||
{
|
{
|
||||||
|
@ -340,9 +340,10 @@ namespace MediaBrowser.Providers.MediaInfo
|
|||||||
|
|
||||||
genres = genres.Trimmed().Distinct(StringComparer.OrdinalIgnoreCase).ToArray();
|
genres = genres.Trimmed().Distinct(StringComparer.OrdinalIgnoreCase).ToArray();
|
||||||
|
|
||||||
audio.Genres = options.ReplaceAllMetadata || audio.Genres is null || audio.Genres.Length == 0
|
if (options.ReplaceAllMetadata || audio.Genres is null || audio.Genres.Length == 0 || audio.Genres.All(string.IsNullOrWhiteSpace))
|
||||||
? genres
|
{
|
||||||
: audio.Genres;
|
audio.Genres = genres;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TryGetSanitizedAdditionalFields(track, "REPLAYGAIN_TRACK_GAIN", out var trackGainTag);
|
TryGetSanitizedAdditionalFields(track, "REPLAYGAIN_TRACK_GAIN", out var trackGainTag);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user