Skip to content

Add/Fix support to outputting to Image Sources#133

Open
aapokaapo wants to merge 13 commits intoroyshil:masterfrom
aapokaapo:master
Open

Add/Fix support to outputting to Image Sources#133
aapokaapo wants to merge 13 commits intoroyshil:masterfrom
aapokaapo:master

Conversation

@aapokaapo
Copy link

This PR adds/fixes the support to outputting image URLs to OBS Image Sources

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for outputting image URLs to OBS Image Sources by detecting the image_source type and setting the appropriate file property instead of the text property used for text sources.

  • Adds conditional logic to detect and handle image sources separately from text and media sources
  • Implements an optimization to skip updates when the file path hasn't changed
  • Includes a TODO note about validating image file extensions to prevent OBS crashes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

royshil and others added 3 commits November 13, 2025 17:25
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
// if the target source is a text source - set the text field
obs_data_set_string(target_settings, "text", str.c_str());
// if target source is an image source - set the file path from the provided string (expected to be a file path or URL)
// TODO: allow only strings that end with an image extension to avoid OBS crashing
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot implement the image extension check

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