added uri type checking
This commit is contained in:
parent
94b23b5c66
commit
25e6998a79
@ -127,6 +127,10 @@ class PlaylistEngine:
|
||||
if name:
|
||||
playlist = next((i for i in playlist_source.playlists if i.name == name), None)
|
||||
else:
|
||||
|
||||
if uri.object_type is not Uri.ObjectType.playlist:
|
||||
raise TypeError('uri not a playlist')
|
||||
|
||||
playlist = next((i for i in playlist_source.playlists if i.uri == uri), None)
|
||||
|
||||
if playlist is None:
|
||||
|
Loading…
Reference in New Issue
Block a user