Add missing files check for local browser sources #263

Merged
WizardCM merged 1 commit from missing-files into master 2021-03-22 14:54:36 -05:00
WizardCM commented 2021-02-01 03:22:04 -06:00 (Migrated from github.com)

Description

Adds support for reporting missing files using the API that came in https://github.com/obsproject/obs-studio/pull/2233.

Limited to Local File mode only, of course.

image

To match the below snippet, I also added a basic if (bs) check just in case. You never know what CEF will do.

github.com/obsproject/obs-browser@d2c9fef101/obs-browser-plugin.cpp (L165)

Motivation and Context

Reporting errors to the user is good. Using new features is also good.

How Has This Been Tested?

  • Create a number of browser sources, including a couple in local file mode.
  • Close OBS, then delete the file selected in one of the local sources
  • Reopen OBS
  • See dialog, point it to a new location for the file
  • See the source correctly update

Note: I did run into one application hang while the dialog was open, but I'm not sure if it was caused by my changes or just a side effect of the browser doing its thing on startup.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.
### Description Adds support for reporting missing files using the API that came in https://github.com/obsproject/obs-studio/pull/2233. Limited to Local File mode only, of course. ![image](https://user-images.githubusercontent.com/941350/106438146-33ca4f00-64ca-11eb-94d2-2252dee3a9ec.png) To match the below snippet, I also added a basic `if (bs)` check just in case. You never know what CEF will do. https://github.com/obsproject/obs-browser/blob/d2c9fef1018aee8c2f78312011da25e1abcbe124/obs-browser-plugin.cpp#L165 ### Motivation and Context Reporting errors to the user is good. Using new features is also good. ### How Has This Been Tested? * Create a number of browser sources, including a couple in local file mode. * Close OBS, then delete the file selected in one of the local sources * Reopen OBS * See dialog, point it to a new location for the file * See the source correctly update **Note:** I did run into one application hang while the dialog was open, but I'm not sure if it was caused by my changes or just a side effect of the browser doing its thing on startup. ### Types of changes - New feature (non-breaking change which adds functionality) ### Checklist: - [x] My code has been run through [clang-format](https://github.com/obsproject/obs-studio/blob/master/.clang-format). - [x] I have read the [**contributing** document](https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst). - [x] My code is not on the master branch. - [x] The code has been tested. - [x] All commit messages are properly formatted and commits squashed where appropriate. - [x] I have included updates to all appropriate documentation.
VodBox (Migrated from github.com) reviewed 2021-02-01 03:22:04 -06:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-obsproject/obs-browser!263
No description provided.