From 1236bb298c9c5028cce454cbc110fbc4ca26e7eb Mon Sep 17 00:00:00 2001 From: sel10ut <45976019+sel10ut@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:54:53 +0300 Subject: [PATCH 1/2] fix: correct parsing of audio release date property Read full date from ffmpeg probe. --- MediaBrowser.Providers/MediaInfo/AudioFileProber.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs b/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs index 4d4b59b8cf..6ea28e7179 100644 --- a/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs +++ b/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs @@ -228,6 +228,7 @@ namespace MediaBrowser.Providers.MediaInfo audio.RunTimeTicks = mediaInfo.RunTimeTicks; audio.Size = mediaInfo.Size; + audio.PremiereDate = mediaInfo.PremiereDate; if (!audio.IsLocked) { @@ -370,7 +371,6 @@ namespace MediaBrowser.Providers.MediaInfo { var year = Convert.ToInt32(tags.Year); audio.ProductionYear = year; - audio.PremiereDate = new DateTime(year, 01, 01); } if (!audio.LockedFields.Contains(MetadataField.Genres)) From 368a1b385ad51328a4e6daf87805de5968fe20c0 Mon Sep 17 00:00:00 2001 From: sel10ut <45976019+sel10ut@users.noreply.github.com> Date: Fri, 15 Mar 2024 01:37:11 +0300 Subject: [PATCH 2/2] fix: fallback to TagLib date parsing if ffprobe fails Bring back hardcoded PremiereDate with correctly parsed year from TagLib, if ffprobe cannot get it --- MediaBrowser.Providers/MediaInfo/AudioFileProber.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs b/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs index 6ea28e7179..60eacf2614 100644 --- a/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs +++ b/MediaBrowser.Providers/MediaInfo/AudioFileProber.cs @@ -371,6 +371,11 @@ namespace MediaBrowser.Providers.MediaInfo { var year = Convert.ToInt32(tags.Year); audio.ProductionYear = year; + + if (!audio.PremiereDate.HasValue) + { + audio.PremiereDate = new DateTime(year, 01, 01); + } } if (!audio.LockedFields.Contains(MetadataField.Genres))