add warning when regex for uri fails

This commit is contained in:
Niko committed 2025-12-23 19:39:54 +01:00
1 parent 179d3e486c
commit 051e6d49af
2 files changed
+3

No files matched your search

+2
View File
@@ -11,6 +11,8 @@ Add your changes below.
### Added
- Added a warning if the URI regex did not match the input.
### Fixed
### Removed
+1
View File
@@ -2140,6 +2140,7 @@ class Spotify:
def _get_uri(self, type, id):
if self._is_uri(id):
warnings.warn(f"{repr(id)} did not match the Spotify URI RegEx.", UserWarning)
return id
else:
return "spotify:" + type + ":" + self._get_id(type, id)