mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #11621] Handle exception for unexpected audio file YEAR tag values #12948
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/jellyfin/jellyfin/pull/11621
State: closed
Merged: Yes
Log out of range exception instead of throwing (which would abort the user's operation such as playback) when encountering unexpected values in the YEAR tag of audio files.
The code currently passes the entire content of the YEAR tag to the
yearargument of theSystem.DateTimeconstructor, but this fails if the tag value is something like "20180101" which has been reported in the wild. I'm not sure there's anything better to do than simply catch the exception and move on given the number of possible date formats if we want to handle anything besides "YYYY" in that tag.Changes
Add try/catch block in AudioFileProber.cs
Issues
Fixes #11576