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

Add parsing char 0x1F in artist_mbids #109

Merged
merged 1 commit into from
Dec 7, 2024
Merged

Conversation

moisespr123
Copy link
Contributor

Seems some strings are formed with unicode characters and fails to submit:

Example, where it failed due to \u001f:

[2024-11-11 08:41:26.020 -05:00] [DBG] [20] Jellyfin.Plugin.ListenBrainz.ListenBrainzApi: Got response:
Status: BadRequest
Data: "{\"code\":400,\"error\":\"artist_mbids MBID format invalid.\",\"track_metadata\":{\"additional_info\":{\"artist_mbids\":[\"06d98c74-1861-4717-86b2-00c0a8b863ce\u001f4dc77d86-5ecf-460b-b01d-41e8f1272b6e\"],\"duration_ms\":358000,\"media_player\":\"Jellyfin\",\"recording_mbid\":\"e9c4280a-3665-45b9-80b9-0dada4e68bd3\",\"release_group_mbid\":\"7bfc2d50-d3f2-332e-9956-d706e5a69949\",\"release_mbid\":\"3e380934-aa90-4887-93df-8d8bb7487fe0\",\"submission_client\":\"ListenBrainz plugin for Jellyfin\",\"submission_client_version\":\"5.0.0.2\",\"tags\":[],\"track_mbid\":\"39732df6-5a80-3b36-93b0-1869451e3dd7\",\"tracknumber\":3},\"artist_name\":\"System S.F. feat. Anna\",\"release_name\":\"V-RARE SOUNDTRACK 5 - DDRMAX2 -Dance Dance Revolution 7thMIX-\",\"track_name\":\"Look To The Sky (Trance Extended Mix)\"}}
"

This PR now fixes it.

I'm not really sure why these issues happen, but glad to submit this quick PR fix to solve them.

@lyarenei
Copy link
Owner

Sorry for late reply, lots of stuff going on lately...

I'm not really sure why these issues happen, but glad to submit this quick PR fix to solve them.

I'm not sure if these tag values are saved as Jellyfin reads them or if Jellyfin does some parsing before saving them. Anyway, it'll be probably for the best to make this configurable, so the Jellyfin admins can quickly fix it - instead of waiting for a pull request to be merged.

@lyarenei
Copy link
Owner

lyarenei commented Dec 7, 2024

Created an improvement issue for making this configurable. In the meantime, let's merge this.

@moisespr123 Thank you and sorry it took so long.

@lyarenei lyarenei merged commit e30bc64 into lyarenei:main Dec 7, 2024
3 of 4 checks passed
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.

2 participants