Closed yatriks closed 10 months ago
I updated some of the metadata in my library, and that seems to have fixed the first part, i.e. this error is now gone:
---> System.ArgumentException: Audio item does not have a track MBID
at Jellyfin.Plugin.ListenBrainz.Clients.MusicBrainzClient.GetAudioItemMetadata(Audio item)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Jellyfin.Plugin.ListenBrainz.PluginImplementation.GetAdditionalMetadata(EventData data)
However, this error persists:
[2023-08-11 19:04:50.462 -04:00] [DBG] Send playing now failed
System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
at System.Convert.FromBase64String(String s)
at Jellyfin.Plugin.ListenBrainz.Configuration.UserConfig.get_PlaintextApiToken()
at Jellyfin.Plugin.ListenBrainz.Clients.ListenBrainzClient.SendNowPlaying(UserConfig config, Audio item, AudioItemMetadata audioMetadata)
at Jellyfin.Plugin.ListenBrainz.PluginImplementation.OnPlaybackStart(Object sender, PlaybackProgressEventArgs args)
[2023-08-11 19:04:50.651 -04:00] [DBG] Picking up user data save event for item "TRACK"
I figured this out. The first error can simply be dealt with by disabling fetching additional metadata (though I'm sure there's a proper solution). The second, I got around with in a hacky way - I just stored the API token base64-encoded. That seemed to work. Not at all sure how to get to a fix, but hope this helps. Closing this out.
Hi @yatriks, sorry for not noticing this sooner. As for your errors:
The first error can simply be dealt with by disabling fetching additional metadata (though I'm sure there's a proper solution).
This is the proper solution. :) If you don't have track MBIDs in the song/track metadata, then the MusicBrainz integration part cannot fetch any data. Of course, you can also fix this by adding the Track MBID into metadata.
The integration is described in more detail here.
I got around with in a hacky way - I just stored the API token base64-encoded. That seemed to work. Not at all sure how to get to a fix...
This... I forgot to properly encode the token before saving. 🤦 The token should be indeed saved as a base64 string in the config. This should be fixed in version 3.0.2.0
now, thanks for reporting it!
Hi,
First of all, thanks for the excellent plugin.
I have Jellyfin (10.8.10) with the plugin (3.0.1.0) set up on my Raspberry PI.
However, I was noticing no data go through. I enabled debug logs for the plugin, and I see this everytime it tries to send a track (I enabled the alternative event for recognizing listens as it appears to be faster for debugging). Here's the logs I see:
From what I can tell, the token is saved correctly in my
/var/lib/jellyfin/plugins/configurations/Jellyfin.Plugin.ListenBrainz.xml
file. I have the MusicBrainz plugin version 10.8.10.0.Not sure what's going wrong, can anyone help debug? Happy to do any additional diagnoses.
Thanks.