mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 00:05:55 +03:00
[GH-ISSUE #232] TRACK_ID Format ? #159
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rperrot on GitHub (Jun 17, 2018).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/232
Hi,
first of all, I'd like to thanks all dev for their valuable work.
I'm trying to use the --onevent to get information about the currently played track.
To do this I'm using TRACK_ID environment variable in a python script. However, when querying the Spotify API I got an error result indicating that the track id is invalid. I think there's a transformation (encoding ?) between the spotify track ID and the exported environment one.
for example a valid track in spotify (using official app) 5Fhn1eNY4Eexndp9DWHZnn, is exported in the environment variable TRACK_ID value "ba292267a139477c86f108d66f4f9cc5" which is an invalid spotify track id.
I can't find a hint about how to decode the environment variable TRACK_ID. Does anybody can give me a clue to get the correct value ?
@rperrot commented on GitHub (Jun 17, 2018):
Ok, I found it looking into the code. (is it possible to add it in the doc ?)
TRACK_ID is in base16 so I need to decode it then encode it in base62 to use spotify api.
@StopMotionCuber commented on GitHub (Jun 26, 2018):
I guess this is somewhat confusing if spotify uses base62 for its official app.
I would propose to change the TRACK_ID environment variable to base62 in this case.
@rperrot commented on GitHub (Jun 26, 2018):
I don't want to suggest the change (if it's like that, there must be a reason), however I would suggest to document it.
@kingosticks commented on GitHub (Jun 26, 2018):
It sounds wrong, the change sounds good. It's supposed to be a format you can easily use.
@sashahilton00 commented on GitHub (Nov 3, 2018):
Agreed, it should be changed to base62 to bring it inline with the other Spotify clients.