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

[Feature Request] Additional Data/Endpoints in API #393

Closed
ThatGravyBoat opened this issue May 2, 2024 · 4 comments
Closed

[Feature Request] Additional Data/Endpoints in API #393

ThatGravyBoat opened this issue May 2, 2024 · 4 comments
Assignees
Labels

Comments

@ThatGravyBoat
Copy link
Contributor

As it currently stands the API endpoints do not give all the information something that wants to interface with it may need.
Here are a few that I currently need as I want to add support in a Minecraft mod I work on called Craftify where several requests for Tidal support have been requested.

The following are what I need but cant find in the API as it currently is:

  • In data returned by current the current state of the player ie. shuffle, repeat, and volume
  • In endpoints
    = Setting shuffle state
    = Setting repeat state
    = Changing volume

There are also some problems with the data is not reliable in the sense of durations and artists being strings when they should be a number and a list respectively. Currently for me to get the actual duration as I need it for a progress bar I need to parse the current and duration fields

@Mastermindzh
Copy link
Owner

I can implement most of this pretty easily in the coming days.

  • Changing the volume might not be possible for now, probably part of a bigger feature that involves volume control in general.
  • Tidal Reports the artist as a single field, not a list of collaborators. We are just sending whatever TIDAL says is the Artist.

Will be available soon.

@ThatGravyBoat
Copy link
Contributor Author

  • Tidal Reports the artist as a single field, not a list of collaborators. We are just sending whatever TIDAL says is the Artist.

Ahh okay that makes sense, not that big of a deal 👍

@Mastermindzh
Copy link
Owner

I rewrote the entire API to be a bit clearer (and the code much cleaner) and also to use the correct HTTP verbs as well now.
The old (now: legacy) endpoints still work and I have no plans of removing them.

New POST endpoints:

  • /player/play
  • /player/favorite/toggle
  • /player/pause
  • /player/next
  • /player/previous
  • /player/playpause
  • /player/shuffle/toggle
  • /player/repeat/toggle

Also 1 new GET endpoint:

  • '/current/image'`

I also updated the mediaInfo with most of what you wanted, durationInSeconds & currentInSeconds are now available as integers as well:
image

@Mastermindzh
Copy link
Owner

Fixed in 5.11.0.

If you want to promote your mod you can make a PR adding it to the README if you wish :)

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

No branches or pull requests

2 participants