Repository navigation
📂 v2.9.3: Split Recording Organization Fix
A critical bug fix that resolves an issue where split recordings were not being organized into game-specific folders. Thanks to @vunhatchuong for the detailed bug report! (Issue #23)
🐛 Bug Fixes
-
📂 Split recordings not organized into folders:
- Fixed a critical Lua variable scoping bug where the
on_recording_file_changed()signal handler was accessing a globalcurrent_recording_filevariable, while all other functions (delayed_recording_init,check_split_files,on_event) accessed a local variable with the same name. This happened because thelocaldeclaration was placed after the signal handler function definition — in Lua,localvariables are only visible to code that comes after their declaration. - Symptom: Split recordings worked on the 1st recording session but failed on the 2nd, 3rd, etc. ("every other recording" pattern). The signal handler retained stale file paths from previous sessions in the global variable, causing it to attempt moving non-existent files instead of the actual split segment.
- Fix: Moved the
local current_recording_fileandlocal split_filesdeclarations before theon_recording_file_changed()function, so all functions now share the same local upvalue.
- Fixed a critical Lua variable scoping bug where the
-
📁 Initial recording file path not detected (Advanced Output Mode):
- Fixed an issue where
get_last_fileproc handler returned empty foradv_file_output(OBS Advanced output mode), leavingcurrent_recording_fileuninitialized. - New fallback: The script now reads the file path directly from the recording output's settings (
obs_output_get_settings) whenget_last_filefails, checking both"path"and"url"keys.
- Fixed an issue where
-
🛡️ Safety net in file_changed signal handler:
- If
current_recording_fileis still uninitialized at the time of the first split, the signal handler now attempts to recover the previous file path from the recording output reference (recording_output_ref) as a last resort.
- If
💡 Update: Simply replace the
Smart_Replay_Mover.luafile with the new version and restart OBS. All your settings and custom names will be preserved.