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

WIP: Create legacy audioscrobbler API #37

Merged
merged 7 commits into from
Oct 29, 2020
Merged

Conversation

ICTman1076
Copy link
Contributor

@ICTman1076 ICTman1076 commented Oct 1, 2020

Do not merge, work in progress. Will resolve #35

return 200, "OK\n" +
sessionkey + "\n" +
protocol + "://"+domain+":"+port+"/apis/legacyaudioscrobbler/nowplaying" + "\n" +
protocol + "://"+domain+":"+port+"/apis/legacyaudioscrobbler/scrobble" + "\n"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite sure how to get the protocol, domain and port of requests from nimrodel, so I placed placeholder variables to show where they are supposed to go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One idea I had is getting all this information through the otherwise redundant username, but a more elegant and hidden solution would be nice

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't have time to test it now, but I added a line to get the host from the HTTP header, check if you can use that

Copy link
Contributor

@p182 p182 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix typo in filename legacy_audioscrobbler (letter "l" after "bb")

@krateng
Copy link
Owner

krateng commented Oct 2, 2020

Since the use case for this protocol is gonna be very limited, I think it would be an acceptable option to just have the user specify their public url in the settings - but the Host header should be available as part of the keys that are passed to the function (the second argument of self.handle).

@ICTman1076
Copy link
Contributor Author

Thanks - I'm having trouble getting it set up for testing since I don't currently have access to a Linux machine (maloja tries to find Linux environment variables that don't exist on windows) but I'll push my code as soon as i can

@krateng krateng marked this pull request as ready for review October 29, 2020 16:14
@krateng krateng merged commit 1940f62 into krateng:master Oct 29, 2020
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

Successfully merging this pull request may close these issues.

Legacy Audioscrobbler protocol
3 participants