Skip to content

Conversation

@nstwfdev
Copy link

@nstwfdev nstwfdev commented Feb 19, 2025

Fix the issue when trying to access plugin settings from outside, such as in a Python script, where the data is not updated

media_source= obs.obs_get_source_by_name(MEDIA_SOURCE_NAME)

settings = obs.obs_source_get_settings(media_source)
current_media_index = obs.obs_data_get_int(settings, "current_media_index") <- never updating
current_file_name = obs.obs_data_get_string(settings, "current_file_name") <- never updating

@CodeYan01
Copy link
Owner

based on my testing, current_media_index does update, so the actual fix is done in #40

the reason your fix also works is because update_current_filename_setting is also called in mps_update, but calling mps_update does too much

Please verify that my fix works on your side. I tried using the script you gave and it worked as expected

@nstwfdev
Copy link
Author

@CodeYan01 yep, daa19a3 resolved my issue, ty

@nstwfdev nstwfdev closed this Feb 19, 2025
@CodeYan01
Copy link
Owner

Thank you

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.

2 participants