Skip to content

Commit

Permalink
Merge pull request jellyfin#11155 from sel10ut/bugfix/fix-releasedate…
Browse files Browse the repository at this point in the history
…-tag

Fix parsing of audio PremiereDate property
  • Loading branch information
Bond-009 committed Mar 16, 2024
2 parents 1424723 + 368a1b3 commit b6d130a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion MediaBrowser.Providers/MediaInfo/AudioFileProber.cs
Expand Up @@ -228,6 +228,7 @@ public partial class AudioFileProber

audio.RunTimeTicks = mediaInfo.RunTimeTicks;
audio.Size = mediaInfo.Size;
audio.PremiereDate = mediaInfo.PremiereDate;

if (!audio.IsLocked)
{
Expand Down Expand Up @@ -370,7 +371,11 @@ private async Task FetchDataFromTags(Audio audio, MetadataRefreshOptions options
{
var year = Convert.ToInt32(tags.Year);
audio.ProductionYear = year;
audio.PremiereDate = new DateTime(year, 01, 01);

if (!audio.PremiereDate.HasValue)
{
audio.PremiereDate = new DateTime(year, 01, 01);
}
}

if (!audio.LockedFields.Contains(MetadataField.Genres))
Expand Down

0 comments on commit b6d130a

Please sign in to comment.