Add Webhook notifications and option to prune orphan strm files. - #7
Add Webhook notifications and option to prune orphan strm files.#7mcortt wants to merge 8 commits into
Conversation
Add webhook notifications (Discord/Slack/generic JSON)
Fix webhook 403: set custom User-Agent, surface HTTP error body
Add orphan cleanup
Add tests for directory plugin file detection and orphan pruning functionality.
|
Also added an option to prune orphan strm files |
|
Sorry for the long silence on this @mcortt — I was away and this deserved a proper read rather than a quick skim. I've now gone through it carefully. The quality here is genuinely high. Some specific things I want to call out, because they're the things people usually get wrong:
The webhook half I have no concerns about: opt-in, 10s timeout, failures logged not raised, and — importantly — no URLs or credentials in the payloads, only counts. One blocker, and it's not your faultThis PR is from 2 July; v1.16.1 added a Your collectors call them without it: movie_folder, strm_filename, _name, _year = self._movie_target_paths(
movie, root_folder, cat_name, nest_by_cat, append_tmdb_id,
) # <-- tmdb_tag_format defaults to "plex"So for a user with
The 0-active guardrail doesn't catch it, because That's not a corner case: most users of this plugin are on Jellyfin/Emby (Plex can't play Fix is one argument in each collector — pass tmdb_tag_format = (settings.get("tmdb_tag_format") or "plex").strip().lower()Two smaller items
How do you want to play it?Happy either way:
One last thought, no strong feelings: webhooks and prune are two unrelated features in one PR. If you'd rather land them separately I'd take the webhook half immediately — it has no blockers at all. But I'm equally happy to take both together once the tag-format bug is closed. Really nice work — the guardrails in the prune path are better than most of what I'd have written first time. |
|
You are absolutely right. It should've been two separate PRs. My bad. I am fine with whatever you want to do. If you want to rebase/fix and push it go for it. That way you can go ahead and implement the webhook portion, and then once the follow-up commit is processed the prune can be added at your convenience. |
No description provided.