Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EqualsAny condition check for int and double #9351

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

Shadowghost
Copy link
Contributor

Currently EqualsAny is not implemented for double and the implementation for int does not work as it should (see #9350)

Changes
Split the conditional string value, parse the substrings into a int/double and check if one of them is equal to the current value.

Issues
Fixes #9350

Copy link
Member

@Bond-009 Bond-009 left a comment

Choose a reason for hiding this comment

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

Use a foreach and our own Split that works on ReadonlySpan

@Shadowghost Shadowghost force-pushed the condition-fix branch 3 times, most recently from a1c9fd9 to 06e3543 Compare February 19, 2023 13:56
@Shadowghost Shadowghost changed the base branch from master to release-10.8.z February 19, 2023 13:56
@Shadowghost Shadowghost added the stable backport Backport into the next stable release label Feb 19, 2023
Copy link
Member

@Bond-009 Bond-009 left a comment

Choose a reason for hiding this comment

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

Maybe change the other ones in this file too, the default NumberStyles should be fine, no need to support currency symbols or hex etc

MediaBrowser.Model/Dlna/ConditionProcessor.cs Outdated Show resolved Hide resolved
MediaBrowser.Model/Dlna/ConditionProcessor.cs Outdated Show resolved Hide resolved
@Bond-009 Bond-009 merged commit e8b0ae0 into jellyfin:release-10.8.z Feb 20, 2023
@jellyfin-bot jellyfin-bot removed the stable backport Backport into the next stable release label Mar 10, 2023
crobibero pushed a commit that referenced this pull request Mar 10, 2023
Fix EqualsAny condition check for int and double

Original-merge: e8b0ae0

Merged-by: Bond-009 <bond.009@outlook.com>

Backported-by: crobibero <cody@robibe.ro>
@Shadowghost Shadowghost deleted the condition-fix branch August 5, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants