Support custom resolvers #5732
Replies: 12 comments 20 replies
|
Sounds good to me 👍 |
|
I think I prefer the second method to the first. We could just add a new plugin category for resolvers and you could have the first entry. Then you just need to implement a page somewhere to select active resolvers. |
|
Example for a custom resolver plugin: https://github.com/nielsvanvelzen/jellyfin-plugin-resolver I need to to some more work before I can call it stable. This PR is the one thing that is needed from the Jellyfin side to finish it. |
You mean the configuration option listed above? |
|
I meant "issue" instead of "PR"... it was late. Without proper support a custom resolver needs to use some hacks to get it working at the moment. |
|
This is most certainly needed for anime for example. |
|
I still don't understand why this is a discussion now. Look, activity on this topic has dwindled and this is just how the issue is gonna slowly fade whilst the tracked issue ticket collects dust... :/ Or maybe I'm missing some recent developments on this front happening elsewhere? |
|
I'm right now filling my JellyFin server with music from Steam. Soundtracks does not quite follow the traditional music structure, and for some games the meta data is garbage, and I don't really have the energy to go through many hundreds of soundtracks to fix things up. A custom resolver as mentioned here would be able to solve my problem. I need one that simply put everything after a certain folder depth or for folders with cover art in an album, and that's it. Now I instead get some soundtracks that split up into multiple albums due to meta data inconsistencies. I need folder superiority! |
|
What is needed to move forward on this? |
|
I took a stab at this, if anyone is interested in testing it out, I hardly have done any. |
|
I agree with @rklrkl under post https://github.com/orgs/jellyfin/discussions/5732#discussioncomment-3727578. A media server should not impose a folder format. It should be able to work with whatever folder format the user already has. A way to do this is to not use the folder names to glean off media information. Instead, go straight to each file's metadata. Then, in the media server database, save the actual full path to the media file. The metadata can supply all other aspects of the media identifying information. If the metadata is dirty, then the user should push their media library though something like Picard to do the standardizing. |
Uh oh!
There was an error while loading. Please reload this page.
Currently all library types (tv shows, movies, music etc.) have their own "resolver" to import media. They all have a certain folder structure the user should follow, and when the users does just that nothing will go wrong (mostly).
But what if the user is stubborn and has his own folder structure and doesn't want to change that?
I made some custom resolvers for myself and they work excellent, I can not import my custom structure to Jellyfin with almost no problems. But the way I did this is not officially supported and does cause some problems because the Jellyfin resolvers still work.
What I did
I made multiple resolvers but for this issue I'll use the simplest I made
I made a class
MusicResolverin my own plugin that implements theIItemResolverandIMultiItemResolverinterfaces. It sets theResolverPrioritytoFirstso it will get called before most default resolvers. TheResolveMultiplefunction always returns null so it isn't actually implemented. TheResolvePathfunction checks if theCollectionTypeis non-null and if it equals theMusictype.Next it just does some basic stuff checking what kind of file it is resolving and returns a class extending BaseItem.
This works great! Except for the fact that files my resolver ignores will be imported by the next resolver found.
What I'd like to see changed
As Jellyfin already supports this functionality quite well I'd like to extend it with some customization. Firstly; I'd like to change the resolver(s) used from the user interface. My suggestion would be to have this work the same as metadata downloaders: The user can choose per library which resolver to use. I'd suggest to only support one per library instead of multiple.
Possible implementation
This can be implemented in 2 ways:
Additional properties should be added to the resolver/scanner for identification. Just like providers a Name should be added. Additionally in some way we should define for which library types the scanner/resolver works. Providers do this using a generic.
Jellyfin should have a way to determine which scanner/resolver is the "official" default and use that. When multiple scanners/resolvers are found for a certain library type the user can change the one used in the library settings. (option is hidden by default, or a disabled input or something like that)
Use-cases
TL;DR: Improve support for customized resolvers in plugins.
All reactions