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

[Request]: Support for Jellyfin 10.9.0 #92

Closed
rigrig opened this issue Mar 27, 2024 · 11 comments · Fixed by #93
Closed

[Request]: Support for Jellyfin 10.9.0 #92

rigrig opened this issue Mar 27, 2024 · 11 comments · Fixed by #93
Labels
enhancement New feature or request

Comments

@rigrig
Copy link
Contributor

rigrig commented Mar 27, 2024

Description

According to https://jellyfin.org/posts/testing-10.9.0/ :
Jellyfin 10.9.0 is scheduled for release during the weekend of April 26th-28th

It would be neat if this plugin worked right away after upgrading.

Additional context

I'm running 10.9.0 from the unstable docker image and would be happy to test stuff.

Right now 3.4.1.0 gives this error in the Jellyfin 10.9.0 log:

[16:39:57] [ERR] Failed to load assembly /config/plugins/ListenBrainz_3.4.1.0/Jellyfin.Plugin.ListenBrainz.dll. This error occurs when a plugin references an incompatible version of one of the shared libraries. Disabling plugin
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load type 'MediaBrowser.Controller.Plugins.IServerEntryPoint' from assembly 'MediaBrowser.Controller, Version=10.9.0.0, Culture=neutral, PublicKeyToken=null'.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at Emby.Server.Implementations.Plugins.PluginManager.LoadAssemblies()+MoveNext()
System.TypeLoadException: Could not load type 'MediaBrowser.Controller.Plugins.IServerEntryPoint' from assembly 'MediaBrowser.Controller, Version=10.9.0.0, Culture=neutral, PublicKeyToken=null'.
@rigrig rigrig added the enhancement New feature or request label Mar 27, 2024
@lyarenei
Copy link
Owner

Hi, thanks for the heads up. I'll have this updated over the weekend. But last time I had a look, there was a bug which effectively breaks almost all plugin functionality (jellyfin/jellyfin#11020).

So in general, I'd advise against upgrading to 10.9. - at least until the bug is fixed or a workaround for that bug is implemented in the plugin (which I am not a fan of).

@rigrig
Copy link
Contributor Author

rigrig commented Mar 27, 2024

Oh, nasty. Thanks for pointing it out.
Do you know whether that means it'll scrobble the wrong tracks, or just not any at all? (I don't mind missing some, but random tracks popping up in my history would be annoying, so I'd have to be a bit more careful about testing, to avoid manually deleting hundreds of scrobbles 😉)

Putting a workaround in the plugin doesn't seem like a great idea, but I'm happy to test if the plugin loads/tries to scrobble.

@lyarenei
Copy link
Owner

lyarenei commented Mar 28, 2024

Do you know whether that means it'll scrobble the wrong tracks, or just not any at all?

No, this won't happen - that's why I wrote almost all. :)

The scrobbles will still be correct, but the plugin will effectively work in a "bare minimum" mode. All the additional useful features in this plugin rely on the recording MBID, which is obtained through the track MBID field. And that will be set incorrectly after you do a metadata refresh in JF 10.9.

Technically, you can use JF 10.9 with this plugin (when it's compatible), but then you would have to make sure to never do a metadata refresh or add anything new to the libraries. But this is not feasible for most users, so it's better to just not recommend it for now.

On the other hand, the track MBID field will hold the recording MBID value, which is what the plugin needs in most cases. So from a certain perspective, this is also a blessing for some plugin features as there would be no need for lookups. But the ultimate issue with a workaround is how to detect if the value is a track MBID or a recording MBID. And the only way I know is to check with MusicBrainz, which only leads to a lot more requests than necessary and slowing down the plugin even more.

@lyarenei
Copy link
Owner

@rigrig Just started working on this, unfortunately the Jellyfin team have not released the packages for 10.9.x yet, not even in preview - see https://www.nuget.org/packages?q=jellyfin&prerel=true&sortby=relevance.

I believe this will not take long, but as of right now, there's nothing I can do. :)

@rigrig
Copy link
Contributor Author

rigrig commented Mar 30, 2024

I was worried mixing up recording/track IDs meant it would scrobble essentially random IDs, but I see now it's all UUIDs, so I guess there's no chance of that happening. (Too bad they didn't include a type in those)

My plan is to just keep running unstable 10.9 for now, and restore my 10.8 backup and remigrate once (hopefully) all the bugs are fixed.

I have no idea how dotnet development works, but thanks for the update! 😉

@lyarenei lyarenei pinned this issue Apr 1, 2024
@lyarenei
Copy link
Owner

lyarenei commented Apr 17, 2024

Okay, the good news is that the fix for track MBID has been merged, so the plugin should work with 10.9.x without any (known) issues.

Now the last blocker is the availability of updated packages so the plugin could be actually compiled to support JF 10.9.

@rasmuslos
Copy link

I may be wrong, but I think the 10.9 packages are only available through the GitHub package registry: https://github.com/orgs/jellyfin/packages

@lyarenei
Copy link
Owner

lyarenei commented Apr 19, 2024

@rasmuslos Well, actually no. On github it looks like the packages are publicly available, but you have to be a member of the organization in order to be able to download the packages.

But that gave me an idea - get the packages from the artifacts in azure builds: https://dev.azure.com/jellyfin-project/jellyfin/_artifacts/feed/unstable


So, the first build is available: #93 (comment)

Please note I only made the necessary changes in the code to get the plugin to compile, so I have actually no idea if this (first) build even works or not - it would be actually really surprising if it works right away, so do not expect much.

I'll look into it tomorrow.

Edit: Does not work. Plugin loads but does not react on events.

@lyarenei
Copy link
Owner

Updated #93 (comment) with a new build (4.0.0.1), now the plugin should at least react on the server events. At this point, I have not observed any other issues with the plugin.


Please note that for local builds, the plugin will report as version 1.0.0.0, so it is necessary to name the plugin folder accordingly - as described in manual installation steps.

@rigrig
Copy link
Contributor Author

rigrig commented Apr 20, 2024

Thanks!
4.0.0.1 works for me (with #94): both "now playing" and the listen being submitted after the song finished.

@lyarenei
Copy link
Owner

Plugin version 4.0.0.2 is now available in the repository.


If you are still running Jellyfin 10.8 - and plan to for some time (like me), you can switch to a specific 10.8 repo (https://repo.xkrivo.net/jellyfin-10-8/manifest.json) to avoid plugin breakage on server restarts, caused by the server automatically installing the latest version in repository, even if not compatible.

@lyarenei lyarenei unpinned this issue Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants