Trigger partial rescans of Plex libraries on SMB change notifications
If you're like me, and you have your Plex media hosted on an SMB share and Plex Media Server running on a different computer, you might have found that Plex Media Server isn't able to automatically rescan when media is added/changed/removed from your media folders.
This Python script connects to the SMB share, listens for change notifications, and triggers Plex Media Server to do a partial rescan on the changed folders - essentially restoring the default Plex functionality.
- Download or clone this repo
- Install project requirements - uv is recommended (
uv sync), but is not required. - Rename
config.toml.exampletoconfig.toml - Update
config.tomlyour SMB share details, Plex details, etc. Follow the comments in the file for hints. - Run
main.py(uv run refresher/main.py) - Profit
The SMB logic is heavily adapted from https://github.com/undone37/smb-change-monitor