Bug Report "Image slide show" source not noticing changes in directory

citlee

New Member
Hi,

I'm using the latest OBS Studio version (24.0.3), OS is Windows 10 (64bit). I have a directory of files I would like to use as a BRB scene. I create an "Image slide show" source, and "Add directory" to "Image Files" in the source properties. OBS doesn't seem to update its view of the list of files in the directory when they're changed, for either deletions or additions. To make it notice changes in the directory, it seems to require editing the properties for the source and changing something - simply opening the properties and hitting OK or cancel is not enough. Even with "Visibility behaviour" set to "Stop when not visible, restart when visible", toggling the visibility of the slideshow in the list of sources doesn't make it refresh the list of files in the directory.

With that combination ("Stop when not visible" and hiding the slideshow source) I would expect it to reload the list of images in the directory when the source is visible again, hence tagging this as a bug report rather than a question. But if there is a workaround (other than toggling a setting in the source properties) that still uses the "Image slide show" source, I would love to hear it.

Thanks!

(no log file included as it doesn't contain anything relevant)
 

citlee

New Member
Did you find a workaround for this? I'm interested as well.
Apart from the one I mentioned, no. The behaviour described feels like a bug rather than intentional (or at least is currently worded as such). Might create a bug bounty, but for Bountysource I have to open an actual issue rather than a forum post.
 

rusty1

Member
I also am looking for a solution to this problem. I was quite surprised to find that you can not refresh the directory by hiding and showing the source, like you can with videos. Needing to navigate back into the source and fuss with its settings in the middle of s broadcast is a major set back.
 

dcmouser

Member
Wanted to add another request for this feature -- some way of forcing the rescanning of the directory for changes (additions or deletions) to the image files. Ideally it would automatically rescan when switching to the scene, but even a manual hotkey would be better than nothing.
 

Kevin Kelm

New Member
Rescanning the directory when files are added/removed would be amazing. I run viz and ads in a bar with it and it would be nice to be able to drop files into the directory and have OBS immediately refresh its file list.
 

dcmouser

Member
I have an easy fix for this in source code, but I've not been very successful in submitting changes.
It's surely not the most efficient way, but it basically just forces the plugin to do what it already does when you edit the settings, except to reload the files when the slideshow deactivates (you need to have the option to stop and restart slideshow set in the slideshow source).

If someone can submit a code change its simply to add this function to obs-slideshow.c:

static void jrRescanFiles(struct slideshow *ssdata)
{
// just force an update
obs_source_t *source = ssdata->source;
obs_data_t *settings = obs_source_get_settings(source);
ss_update(ssdata, settings);
}


and add a call to it from within:
static void ss_deactivate(void *data)
{
struct slideshow *ss = data;
// reload and rescan files
jrRescanFiles(ss);
....
 

dcmouser

Member
Actually probably better to put the call to jrRescanFiles(ss) in ss_activate instead of ss_deactivate if you want it to rescan on first start.
 
Top