mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #7167] [MERGED] ProbeResultNormalizer: fix framerate compare + tests #11287
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?
📋 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:
master← Head:master📝 Commits (4)
11019d5Fix Inifinity Bug15d0ebeAdd test for 00483d2fAdd testsf14ecc4fix📊 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.