Skip to content

Conversation

gnattu
Copy link
Member

@gnattu gnattu commented Feb 3, 2025

Although the number type is nullable from the type definition of ATL, the lib might still normalize all unknown values to 0 which makes doing null check only not enough. Fallback to ffprobe results when the number is 0 as well.

Changes

Issues

Fixes #13484 without upstream changes so that the limited tags are falling back to ffprobe results. The complete fix is awaiting upstream release.

Although the number type is nullable from the type definition of ATL, the lib might still normalize all unknown values to 0 which makes doing null check only not enough. Fallback to ffprobe results when the number is 0 as well.
@gnattu gnattu added the stable backport Backport into the next stable release label Feb 3, 2025
@gnattu gnattu requested a review from a team February 3, 2025 23:23
Comment on lines +175 to +177
track.Year = track.Year is null or 0 ? mediaInfo.ProductionYear : track.Year;
track.TrackNumber = track.TrackNumber is null or 0 ? mediaInfo.IndexNumber : track.TrackNumber;
track.DiscNumber = track.DiscNumber is null or 0 ? mediaInfo.ParentIndexNumber : track.DiscNumber;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually don't use inline-linq like or in the code

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in this case it is much cleaner than having nested assignments.

@voronind-com
Copy link

voronind-com commented Feb 4, 2025

Doesnt't it also affect other fields? Like DATE/YEAR?

@gnattu
Copy link
Member Author

gnattu commented Feb 4, 2025

We are only doing fallbacks for those limited fields for basic metadata as ffprobe has its own limitations.

@joshuaboniface joshuaboniface merged commit 117d208 into jellyfin:release-10.10.z Feb 9, 2025
15 of 16 checks passed
Bond-009 pushed a commit that referenced this pull request Feb 9, 2025
Correctly handle audio number tag fallbacks

Original-merge: 117d208

Merged-by: joshuaboniface <joshua@boniface.me>

Backported-by: Bond_009 <bond.009@outlook.com>
@jellyfin-bot jellyfin-bot removed the stable backport Backport into the next stable release label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants