[PR #7167] [MERGED] ProbeResultNormalizer: fix framerate compare + tests #11287

Closed
opened 2026-02-07 06:35:46 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/7167
Author: @Maeur1
Created: 1/13/2022
Status: Merged
Merged: 3/10/2022
Merged by: @Bond-009

Base: masterHead: master


📝 Commits (4)

📊 Changes

2 files changed (+26 additions, -6 deletions)

View changed files

📝 MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs (+16 -6)
📝 tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs (+10 -0)

📄 Description

Changes
The same fixes from https://github.com/jellyfin/jellyfin/pull/7120, but instead this includes some tests to ensure that the logic is correct. Was unsure on how I could push some commits to the existing branch so I made a new PR completely.

I could see why we wanted some tests, as the math conversion did seem quite complex, but after some testing it looks to be functioning correctly.

I broke out the method to make it testable, as the main method this logic sat in would require quite a lot of mocking which I am not too comfortable doing just yet, this stuff is still kinda black magic to me as I haven't ever written anything in C#.

Issues
No issues here, just fixing some ffprobe errors I was having previously from https://github.com/jellyfin/jellyfin/pull/7041


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/7167 **Author:** [@Maeur1](https://github.com/Maeur1) **Created:** 1/13/2022 **Status:** ✅ Merged **Merged:** 3/10/2022 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (4) - [`11019d5`](https://github.com/jellyfin/jellyfin/commit/11019d5c75e2c6ebe4ddd0db6958c8bd9254c2ca) Fix Inifinity Bug - [`15d0ebe`](https://github.com/jellyfin/jellyfin/commit/15d0ebeba8e64375b2ed3e9fd42657a90bed68d7) Add test for 0 - [`0483d2f`](https://github.com/jellyfin/jellyfin/commit/0483d2f2442549a4ffb6ec0f83f8c24d9f673bb7) Add tests - [`f14ecc4`](https://github.com/jellyfin/jellyfin/commit/f14ecc4e08bf8f13003951786c6a9e2a26950971) fix ### 📊 Changes **2 files changed** (+26 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs` (+16 -6) 📝 `tests/Jellyfin.MediaEncoding.Tests/Probing/ProbeResultNormalizerTests.cs` (+10 -0) </details> ### 📄 Description <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** The same fixes from https://github.com/jellyfin/jellyfin/pull/7120, but instead this includes some tests to ensure that the logic is correct. Was unsure on how I could push some commits to the existing branch so I made a new PR completely. I could see why we wanted some tests, as the math conversion did seem quite complex, but after some testing it looks to be functioning correctly. I broke out the method to make it testable, as the main method this logic sat in would require quite a lot of mocking which I am not too comfortable doing just yet, this stuff is still kinda black magic to me as I haven't ever written anything in C#. **Issues** No issues here, just fixing some ffprobe errors I was having previously from https://github.com/jellyfin/jellyfin/pull/7041 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:35:46 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#11287