Sunshine
Sunshine copied to clipboard
fix(process): proc status lost when streaming
Description
Steps to reproduce:
- Start any streaming using moonlight.
- Return to the app selection page.
- Open the sunshine Web-UI, delete or add any application.
- Streaming status on moonlight has been lost.
Reason:
void
refresh(const std::string &file_name) {
auto proc_opt = proc::parse(file_name);
if (proc_opt) {
proc = std::move(*proc_opt); // <---- !!!! Look here, It is overwritten.
}
}
Screenshot
None
Issues Fixed or Closed
None
Type of Change
- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Dependency update (updates to dependencies)
- [ ] Documentation update (changes to documentation)
- [ ] Repository update (changes to repository files, e.g.
.github/...)
Checklist
- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated the in code docstring/documentation-blocks for new or existing methods/components
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Could you add documentation blocks for the new methods in the header file (not in the cpp file)?
https://docs.lizardbyte.dev/projects/sunshine/en/master/md_third-party_2doxyconfig_2docs_2source__code.html#documentation-blocks
done.
Also @ReenigneArcher, why do we use -1 here?
Is 0 not good enough?
Not sure exactly where that code comes from, but 0 is the first app.
Not sure exactly where that code comes from, but 0 is the first app.
But then we have a lot of places in the code checking running() > 0 to determine if any app is running. Which is incorrect...
We should change the app_id type to std::optional<int> in some other PR...
That whole system problem needs to be re-thought. As far as I see, app_id is not even real, it's more like an app index.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
I've added some comment style suggestion, based on the feedback I've got from RA in my other commits.
Also I've found some other issues with the
envthat I would like you to fix. Sorry, that such a simple PR turned out to explode. If you prefer I can also take over the requested changes, just let me know.
I would prefer if you could take over the requested changes. Thank you! 😀
@ReenigneArcher I will move some data around without changing logic too much. This should automatically resolve all of the known issues.
@MiroKaku Have you perhaps unchecked the checkbox where maintainers or something can push to the branch? If so, can you enable it?
Otherwise I will have to create a fork :/
@MiroKaku Have you perhaps unchecked the checkbox where maintainers or something can push to the branch? If so, can you enable it?
Otherwise I will have to create a fork :/
It is checked, but I don't think it allows "Collaborators" to push to.
I will create a fork then.
It looks like this PR has been idle for 90 days. If it's still something you're working on or would like to pursue, please leave a comment or update your branch. Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks!
This PR was closed because it has been stalled for 10 days with no activity.