Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlaylistId URI syntax is different from the one provided by spotify #443

Open
JCGdev opened this issue Jan 4, 2022 · 2 comments
Open

PlaylistId URI syntax is different from the one provided by spotify #443

JCGdev opened this issue Jan 4, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@JCGdev
Copy link

JCGdev commented Jan 4, 2022

Describe the bug
The SpotifyId URI's regex expects a different syntax from the Spotify's provided URI of a Playlist.

To Reproduce
SpotifyId id = PlaylistId.fromUri("spotify:playlist:4tYRZ7mZVEINuvu7ns4rQB");

Expected behavior
The URI's regex should match the Spotify's provided URI.

Screenshots/Stracktraces/Logs

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Not a Spotify playlist ID: spotify:playlist:4tYRZ7mZVEINuvu7ns4rQB
	at xyz.gianlu.librespot.metadata.PlaylistId.fromUri(PlaylistId.java:43)
	at main.java.core.media.Playlist.<init>(Playlist.java:28)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
	at java.desktop/java.awt.Component.processEvent(Component.java:6391)
	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Version/Commit
librespot-api-1.6.1

@JCGdev JCGdev added the bug Something isn't working label Jan 4, 2022
@JCGdev JCGdev changed the title PlaylistId URI is different from the one provided by spotify PlaylistId URI syntax is different from the one provided by spotify Jan 4, 2022
@devgianlu
Copy link
Member

Playlist URI did change, but haven't really looked into the backwards compatibility.

BTW, I don't really like that "main.java.gui.downloader.DownloadButtonListener" wording there. Please consider removing all librespot references in your program.

From the README:

We (the librespot-org organization and me) DO NOT encourage piracy and DO NOT support any form of downloader/recorder designed with the help of this repository and in general anything that goes against the Spotify ToS. If you're brave enough to put at risk this entire project, just don't publish it. This is meant to provide support for all those devices that are not officially supported by Spotify.

@JCGdev
Copy link
Author

JCGdev commented Jan 5, 2022

Don't worry, it's for private use. I'll not release something against Spotify's ToS as will get taken down. Thanks for your time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants