Browse Source

fix: fallback to TagLib date parsing if ffprobe fails

Bring back hardcoded PremiereDate with correctly parsed year from TagLib, if ffprobe cannot get it
sel10ut 1 year ago
parent
commit
368a1b385a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      MediaBrowser.Providers/MediaInfo/AudioFileProber.cs

+ 5 - 0
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))