-
Notifications
You must be signed in to change notification settings - Fork 200
Closed
Labels
Description
Describe the Bug
_sectionByTitle gets clobbered when there are multiple libraries with the same title. The returned library could be unexpected to the user.
Code Snippets
# Library 1: title = Movies, sectionID = 1
# Library 2: title = Movies, sectionID = 2
# Library 3: title = TV Shows, sectionID = 3
# ambiguous library name, returns library 2
plex.library.section("Movies")
# unambiguous library name, returns library 3
plex.library.section("TV Shows")
# The only way to return library 1 is by ID
plex.library.sectionByID(1)Expected Behavior
Maybe raise a warning (non-breaking change) or exception (breaking change) indicating at the library title is ambiguous and directing the user to use sectionByID() instead.
Additional Context
The current behaviour returns the last library (highest sectionID) with the same title.
Operating System and Version
N/A
Plex Media Server Version
1.40.0.7775
Python Version
3.11.7
PlexAPI Version
4.15.7