Settings: allow removing a secondary library path mapping#193
Merged
Brandon-Haney merged 2 commits intoJun 27, 2026
Merged
Conversation
Libraries with more than one path mapping (e.g. Movies + Movies UHD) had no way
to delete the extra mapping from the UI — Edit Paths could only edit fields. Add
a per-mapping Remove button (shown when a library has 2+ mappings) that marks the
mapping for deletion via a hidden delete_<pos> flag; PUT /libraries/{id}/paths
now drops flagged mappings instead of updating them. The last remaining mapping
keeps no Remove button (toggle the library off instead).
Replace the native browser confirm() for removing a library path mapping with the existing in-app modal pattern (matches the pinned-group unpin dialog) — backdrop, header/body/footer, danger Remove button, Esc-to-cancel.
StudioNirin
approved these changes
Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a way to remove a secondary library path mapping from Settings > Libraries. Previously a library could accumulate extra path mappings (for example after auto-fill, or when a library spans multiple roots) with no way to delete one from the UI; the only options were edit or leave it. This adds a per-mapping Remove action.
What changed
update_library_pathshonors adelete_<pos>flag per mapping. Flagged mappings are dropped frompath_mappingsinstead of updated, thenvalid_sectionsis rebuilt and settings saved. Deletions are applied highest-index-first so earlier indices stay valid.How to test
plexcache_settings.json(path_mappings), and the library still works with its remaining mapping(s).Covered by
tests/test_library_paths_delete.py.