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

Plugin does not work anymore #1

Open
uzunix opened this issue Oct 3, 2023 · 6 comments
Open

Plugin does not work anymore #1

uzunix opened this issue Oct 3, 2023 · 6 comments

Comments

@uzunix
Copy link

uzunix commented Oct 3, 2023

The plugin does not work anymore. The categories, songs and cover art is being loaded properly, however when a song is selected for playback, the player is stuck on loading forever...
I tried on couple different devices with the same result. Of course I tried clear data cache re-installing and so on, with no result.

@0xf4b1
Copy link
Member

0xf4b1 commented Oct 3, 2023

Hey, I assume you are trying this with an account with active subscription, unfortunately I don't have one right now and can not test it to check if something in the api changed, playing the free samples at least still works

@uzunix
Copy link
Author

uzunix commented Oct 4, 2023

Hi,
Yes I am using the plugin with active subscription. However I have my doubts about changes in the API, unless they have more than one API, here's why: I am using that same subscription with other applications (DJing software) and there are no problems there, but also there were no updates. The logic behind API changes is: when the platform changes something, a application update will probably follow shortly after that and I did not received any app updates in my other applications...
I am thinking perhaps it is something Android related, perhaps some library being updated, something which is used by SoundCrowd..?
Perhaps I should mention the Android versions on which I am using the app: First and most important device for me is Android TV 9, then I have two tablets with android 6.0.1. As it's turns out SoundCrowd is the best way to enjoy some Beatport tracks on these devices... at least I did not find other way...
Let me know if I can help any other way... by doing some testing perhaps...

@0xf4b1
Copy link
Member

0xf4b1 commented Oct 4, 2023

Hey, yeah I don't meant huge changes in the api, but if I remember correctly I took the auth flow from the dj.beatport.com webapp and when checking this now it seems to have changed. (Otherwise idk where I got this api requests from)

I'm guessing that the client id that the dj webapp was using has been disabled for accessing full tracks and I'm pretty sure that this problem is not Android related.

One thing we can try is the following:
If you visit this in the browser while being logged in, it shows you your session including your accessToken

https://www.beatport.com/api/auth/session

Then in terminal, you can try to list some tracks using your token:

curl 'https://api.beatport.com/v4/catalog/genres/11/top/20/?per_page=5' -H 'authorization: Bearer <accessToken>' -v

For accessing a track, the following should work (where 18119105 is a track id):

curl 'https://api.beatport.com/v4/catalog/tracks/18119105/download/' -H 'authorization: Bearer <accessToken>' -v

With the last command, I get the following, but this is expected without having a subscription

{"detail":"You do not have permission to perform this action."}

@uzunix
Copy link
Author

uzunix commented Oct 8, 2023

Hi!
Something is off here... I tried to do the test you described, but got nowhere. When I opened https://www.beatport.com/api/auth/session in browser, already logged in (in dj.beatport.com and/or just beatport.com) I've got just {}...
I've looked the API docs at https://api.beatport.com/v4/docs/, but there is no explanation how to get the access token. Also very strange is the API request page get's you to 404... I suppose the client_id is something they provide after api access is requested...
Anyway they are definitely up to something...
If you have other ideas for testing - let me know.
EDIT: Not true for the access token: there is a example https://api.beatport.com/v4/auth/o/authorize/?client_id=<CLIENT_ID>&response_type=code&redirect_uri=<REDIRECT_URI>, but I don't know what to use for client_id...

@uzunix
Copy link
Author

uzunix commented Oct 8, 2023

Ok, so I manage to do the test, without https://www.beatport.com/api/auth/session, just using my browser console and copied the access_token from there, the results are:

  • For curl 'https://api.beatport.com/v4/catalog/genres/11/top/20/?per_page=5' -H 'authorization: Bearer <accessToken>' -v I've got the catalog listing in JSON format.
  • For curl 'https://api.beatport.com/v4/catalog/tracks/18119105/download/' -H 'authorization: Bearer <accessToken>' -v I've got * Connection #0 to host api.beatport.com left intact {"detail":"You do not have permission to perform this action."}
    This is done with my paid subscription account.
    EDIT: I've got the same error while tried this in my browser.

@0xf4b1
Copy link
Member

0xf4b1 commented Oct 9, 2023

hey, this is interesting, thank you for checking. I compared the requests with the dj app I'm using and it also gets the error {"detail":"You do not have permission to perform this action."} without subscription. If they really haven't changed anything, it should still work with another client id. Please try this rebuild of the plugin beatport-debug.zip, the apk is in a zip because apk cannot be attached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants