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: don't return videoFormat: null for async transport updates #32

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

sphlabs
Copy link
Contributor

@sphlabs sphlabs commented Mar 9, 2024

About the Contributor

One of the maintainers of the Hyperdeck Companion module.

Type of Contribution

This is a:
Bug fix

Current Behavior

The async transportStatus update will send a value of null for videoFormat if no other value is present. This is incorrect, because the Hyperdeck only sends parameters that have changed since the last transport status update, so if there is no videoFormat parameter present, one should not be passed upstream either.

New Behavior

Remove the fallback null value for videoFormat

Testing Instructions

Start and stop playback, and verify that there is no videoFormat parameter being passed to notify.transport handlers.

Other Information

Status

  • [✅ ] PR is ready to be reviewed.
  • [✅ ] The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

sphlabs and others added 2 commits March 9, 2024 16:19
Hyperdeck will only return settings that have changed value, through async notifications. Therefore, it is wrong to return null when the parameter is not present, and by returning null for videoFormat, the previous set value can be lost.
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.85%. Comparing base (346248f) to head (3cf012f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #32      +/-   ##
==========================================
+ Coverage   51.79%   51.85%   +0.06%     
==========================================
  Files          37       37              
  Lines         863      862       -1     
  Branches      146      145       -1     
==========================================
  Hits          447      447              
+ Misses        416      362      -54     
- Partials        0       53      +53     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Julusian Julusian merged commit de59cab into nrkno:master Mar 11, 2024
7 checks passed
@Julusian
Copy link
Contributor

This is published in v2.0.1

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.

3 participants