Merge pull request #11155 from sel10ut/bugfix/fix-releasedate-tag

Fix parsing of audio PremiereDate property
This commit is contained in:
Bond-009 2024-03-16 16:43:59 +01:00 committed by GitHub
commit b6d130ae2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,11 @@ namespace MediaBrowser.Providers.MediaInfo
{
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))