Skip to content

fix: track data handling#5

Open
f1refa11 wants to merge 1 commit intoEpocDotFr:masterfrom
f1refa11:master
Open

fix: track data handling#5
f1refa11 wants to merge 1 commit intoEpocDotFr:masterfrom
f1refa11:master

Conversation

@f1refa11
Copy link

@f1refa11 f1refa11 commented Aug 12, 2025

previously, the library would incorrectly show the data for some tracks because AIMP counted some of the characters as two in its Remote API.

example:

image image

the get_current_track_info() function now handles the track data(album, artist, year, filename, genre and title) as bytes.

previously, the library would incorrectly show the data for some tracks(in my case, tracks with filenames with uncommon characters and titles would make the library read too many bytes for each attribute and basically include parts of attributes next to the filename attribute to it) because AIMP counted some of the characters as two. 

i fixed it by re-encoding the track data as utf-16-le(so no BOM character thus easier to work with bytes) and reading it as bytes using BytesIO instead of StringIO.
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.

1 participant

Comments