Code Monkey home page Code Monkey logo

Comments (23)

nalsai avatar nalsai commented on May 16, 2024 2

Hey guys,
episode metadata is working now. (Is anyone still here?)

There are still some things that could be worked on, but the most important things are here and working so I think we should close this issue.
If someone wants some additional features or has a problem, they should make a new issue.

Here are some things that could still be added:

  • episode rating? (I didn't find one anywhere on AniDB)
  • matching by episode id
  • showing metadata for missing files
  • metadata for OP, ED, PV... (only normal episodes and specials are supported)
  • multi episode files? (not supported by Jellyfin, I think, but we could still make it work)

If you want any of these implemented or have another problem, make a new issue or message me, then we can work on it.
(or just use shoko ^^)

from jellyfin-plugin-anidb.

nalsai avatar nalsai commented on May 16, 2024 2

It's going to be available once #33 gets merged by a maintainer.
If you want it faster, I can give you the compiled dll, which you just have to copy to the plugin folder to install.

from jellyfin-plugin-anidb.

jrb0001 avatar jrb0001 commented on May 16, 2024 1

I gave it a try myself and got the metadata refresh working. I still have to figure out how the GetSearchResults() is used before I can submit a PR.

By default it takes the anime-ID from the series and the episode number from where jellyfin guesses it.

You can override both of them on each episode, for example for specials or to work around other issues. It's not user-friendly though.

TODO list:

  • GetSearchResults()
    • Not used on episodes.
  • Episode metadata (jellyfin-archive/jellyfin-plugin-anime#47):
    • Expose Anime-ID.
      • Make sure Anime-ID+episode type/number still works.
      • Accept episode number without Anime-ID (take it from season/series) for easier special episode overrides.
      • Accept Anime-ID+Episode-ID. This is more convenient if the number/type on the site doesn't match the number/type in the XML.
      • Accept Episode-ID (Anime-ID from season/series).
    • <summary>
    • <rating>
  • Season metadata (jellyfin-archive/jellyfin-plugin-anime#96)
    • Expose Anime-ID.
    • Reuse logic from series.
    • Everything except image gets overwritten from series?!?
    • People
    • Tags (?)
  • Special episodes:
    • Overwrites season number which turns it into a non-special for jellyfin.
    • Should probably set the "before season" or "after season" number? Which one? Is it even possible to do so reliably?
    • AniDB doesn't expose before/after which episode it should come. The response happens to be sorted correctly in my test case, but the API doesn't seem to guarantee it?
    • Sorting between specials.
      • Episode number (including type) as sorting title seems to work as intended, but obviously only within a single season.
    • Specials season ignores sort name for some reason, seems to work for specials shown inside another season.
  • Movies (jellyfin-archive/jellyfin-plugin-anime#66):
    • Can be shown as a dedicated season:
      • Needs dedicated directory.
      • Needs Anime-ID override on season.
      • Might need Episode-ID override on it.
      • Set sorting title to select where it appears.
    • Can be shown as a special episode:
      • Needs Episode-ID override on it.
      • Set season 0 and the before/after numbers to select where it appears.
  • What happens if there are multiple seasons (TVDB directory structure without TVDB).
    • One of the seasons gets selected as the series and then all episodes from all seasons get mapped to that.
    • Manual overrides on all episodes seems to work, but it can be a lot of work.
    • Anime-ID could be taken from the season, but that needs core changes.
  • Interactions with TVDB (there was some (unused?) code).
  • Interactions with other anime metadata plugins.
  • AniDB link on episode page.
    • Episode-ID instead of episode number plus type.
    • Needs big rework, and not sure if it is a good idea.
    • Manual overrides if they include the Episode-ID.
    • After automatic detection.
      • Separate ProviderId for the link and the manual overrides (episode and season level).
      • Exposing the link requires saving the ProviderId.
      • Saving the ProviderId disables the automatic detection for example when the Anime-ID on the series or the season changes. Bad idea because a multi-season setup will require that for all additional seasons.

Usage for a pure AniDB setup:

  • Single season:
    • Season directory isn't needed if there are just normal episodes.
    • Make sure season has a number (can be a dummy value). This is helps with correct sorting.
  • Show special episode inside season:
    • Must be inside the same season directory, even if there is only a single season.
      • If it is inside the series directory directly, then it is also shown inside the specials season where sorting is broken.
    • Before/after season/episode works as expected. Multiple specials in a row can be sorted with SortName.
    • Season requires a number (for sorting, especially when inserting specials between regular episodes).
  • Group related specials in dedicated season:
    • Needs its own season directory.
    • Lock season name so it isn't overwritten with AniDB metadata.
    • Anime-ID is automatically inherited from series, only change it in a multi-season setup.
    • Use filename to set episode number (season number is inherited from directory).
  • Show regular epsiode from another Anime-ID as a normal episode inside season:
    • Put the file into the season directory.
    • Use filename to set episode number (season number is inherited from directory).
    • Set the episode ID override to <aid>#<eid>.
  • Show regular epsiode from another Anime-ID as a special inside season:
    • Put the file into the season directory.
    • Use filename to set episode number (season number is inherited from directory).
    • Set the episode ID override to <aid>#<eid>.

Did I miss anything? Are there any other known bugs/limitations?

from jellyfin-plugin-anidb.

nalsai avatar nalsai commented on May 16, 2024 1

I haven't used episode ids and didn't find docs or an example implementation quickly, so I haven't added it yet. Providing the episode id to jellyfin should be pretty easy, I'll look into it tomorrow.

I believe, you should also be able to input the episode id and the plugin gets the episode metadata from that. Implementing this is more work, and I need to check the AniDB API to find out how to get the metadata for an episode id.

from jellyfin-plugin-anidb.

jrb0001 avatar jrb0001 commented on May 16, 2024 1

Back when I played around with it, I couldn't find a way to do anything with just the episode id. You need the anime id to get data from the API and then you can use the episode id to search within the response.

from jellyfin-plugin-anidb.

rosystain avatar rosystain commented on May 16, 2024

I have the same problem

from jellyfin-plugin-anidb.

testerror404 avatar testerror404 commented on May 16, 2024

I'm glad that someone's working on this - I haven't had the time to take a look at this myself due to work and other ongoing commitments.

For anyone who has this issue and wants to fix it (at least for the time being), I've personally been using Plex as a "backend" to fetch the metadata, and Jellyfin as the frontend. Specifically, I use the HAMA agent to fetch the metadata, and then use the Lambda agent to export this metadata to .nfo files, which Jellyfin reads and prioritizes over other metadata sources. With a little bit of scripting, there shouldn't be too much of a delay between Plex picking up the series and Jellyfin displaying it.

It definitely isn't ideal, and the reason I moved to Jellyfin was to reduce my dependence on closed source applications where possible, but Jellyfin is still growing, and I'm sure that it'll only keep improving.

from jellyfin-plugin-anidb.

jrb0001 avatar jrb0001 commented on May 16, 2024

Unfortunately I ran into some sort of wall regarding season/episode numbering (especially specials) and usability in general. I tried to get it working properly on a small subset of just 3 series, but it is simply impossible to get what I want on all of them simultaneously without renaming/moving most of the files and overriding the provider IDs on most of them too (and even then, not sure how reliable and reproducible it is). I am definitely not going to do that on my whole collection.

At the moment, I am trying to build a tool+plugin to produce the required directory structure and insert at least the provider IDs into the metadata so the existing plugins can do their job. But at that point it is probably easier to let my tool handle everything rather than getting multiple plugins to cooperate.

A pure jellyfin solution would probably require a rewrite of the series stuff to remove all guessing and to make it more flexible in general. And also a completely new UI for an efficient manual classification of all new files (because there is no guessing anymore). The current logic seems to work fine for mainstream series, so it should probably be a dedicated anime category and that is blocked by the db rewrite as far as I understand.

from jellyfin-plugin-anidb.

testerror404 avatar testerror404 commented on May 16, 2024

Having a pure Jellyfin solution would be ideal, especially if we could replicate what HAMA does - in my experience, HAMA does a great job of guessing, matching and fetching when paired with AniDB as a provider. You've mentioned season/episode numbering - do you use TheTVDB as your provider? From my understanding, TheTVDB actually works better with Jellyfin.

You might want to take a look at this custom plugin that might work for your use case - https://github.com/nielsvanvelzen/jellyfin-plugin-resolver. While the author refers to it as "a hack" as it overrides other resolvers, it might be worth a shot.

from jellyfin-plugin-anidb.

GlassedSilver avatar GlassedSilver commented on May 16, 2024

In the best case we'd always have a way to force a specific episode/special by supplying not only an anidb id, but also a uid for a specific episode/special.

Other than that, anidb in general is just the best and most complete source to tap into, it should be the baseline I think.

On top of things, this will be HIGHLY relevant: jellyfin/jellyfin#5732

from jellyfin-plugin-anidb.

testerror404 avatar testerror404 commented on May 16, 2024

I do understand the appeal of that for the odd special, but to implementing something that niche might be far-fetched if it isn't going to be used too often.

As indicated in the issue above, this seems to be a non-priority for most of the developers. Sadly, I am in no position to work on this myself, and have resorted to my workaround of basically disregarding Jellyfin's metadata fetching capabilities and relying on HAMA instead.

I am going to digress on a brief tangent - something that shouldn't be in this issue, but simply is because I don't have a better place to express this.

If you have the resources and willingness to setup a local Plex instance (which doesn't need an account) that merely fetches the metadata and exports those as .nfo files, I would recommend that as a stopgap until someone who's both capable and interested in working on streamlining the anime experience for "us weebs". I say this as having used the official AniDB plugin by itself, using it along with other anime sources, using the custom resolver linked above and even flirting with using TheTVDB as a database.

I understand that this is simply disregarding the issue rather than fixing it, and that people may not want to rely on closed source software, but I am a pragmatist and would always choose something that works reasonably well.

In the future, I do intend on attempting to port HAMA (at least the AniDB specific portions) to Jellyfin as a plugin (edit: I realised that it's not a matter of merely porting a Plex agent to a Jellyfin plugin as the database structures would be entirely different - this should be exmained from the perspective of the server, as expressed below); I am unfamiliar with C# and lack the time to become proficient enough to port it at the moment. In addition, submitting PRs to adjust the way seasons and series are handled to better accommodate AniDB's database structure is also an option, it just depends on people stepping up.

I apologise for the digression - GitHub issues are supposed to be technical in nature. As it happens, I read your comment on the issue above and merely wanted to point out a workaround that, whilst not ideal, does work rather well.

from jellyfin-plugin-anidb.

testerror404 avatar testerror404 commented on May 16, 2024

You might also want to take a look at Shoko Server - it builds a database of your library using hashes that it compares to AniDB's hash database, and then supplies the metadata to Jellyfin using the Shokofin plugin.

from jellyfin-plugin-anidb.

jrb0001 avatar jrb0001 commented on May 16, 2024

In the best case we'd always have a way to force a specific episode/special by supplying not only an anidb id, but also a uid for a specific episode/special.

This isn't really supported by jellyfin. Either you use what it guesses (probably in the resolver? didn't search for that yet) or the plugin needs to overwrite it unconditionally. That's doable in case of normal episodes, but it won't work in the case where AniDB classifies it as a special but you want to have it in its own season. There is no checkbox to lock episode information as far as I can see.

It would be possible to add yet another two provider IDs which then get copied into the season/episode fields, but that's a pretty ugly workaround. Especially if you want to use multiple plugins and they are all fighting each other because the providers don't agree on the structure.

It's also a huge pain to actually use such a feature. At least better than actually renaming files and loosing all metadata in the process, but it still takes a long time if you need to do multiple times and even worse if there are multiple providers.

On top of things, this will be HIGHLY relevant: jellyfin/jellyfin#5732

I am not too sure about the resolver feature tbh. You can already achieve all of that with renaming/linking the files and there are tools for that. In my opinion the bigger issue is how seasons/specials work in jellyfin and anime usually has way too many special cases for mapping it automatically. Grouping related specials into their own jellyfin seasons (instead of a single 100+ epsiode specials category) would be very helpful and the same goes for grouping related "series"/"seasons" into a single jellyfin series (which makes the single shared specials category issue much worse!).

from jellyfin-plugin-anidb.

testerror404 avatar testerror404 commented on May 16, 2024

Grouping related specials into their own jellyfin seasons (instead of a single 100+ epsiode specials category) would be very helpful and the same goes for grouping related "series"/"seasons" into a single jellyfin series

Related OVAs/series/seasons can be automatically fetched from https://github.com/Anime-Lists/anime-lists.

from jellyfin-plugin-anidb.

GlassedSilver avatar GlassedSilver commented on May 16, 2024

I do understand the appeal of that for the odd special, but to implementing something that niche might be far-fetched if it isn't going to be used too often.

The odd special?
A LOT of animes have mutliple seasons (sometimes just with a different title, which almost also begs for a way to group them better, although collections can band-aid this) and if you want to have 2 seasons of the same anime in one "series" view there will be only one Specials folder and that always links to season 1 for lookups in my experience.

It's not niche at all to have different openings, endings and other bonus PER season. o.O

As indicated in the issue above, this seems to be a non-priority for most of the developers. Sadly, I am in no position to work on this myself, and have resorted to my workaround of basically disregarding Jellyfin's metadata fetching capabilities and relying on HAMA instead.

HAMA + Plex is what I'm escaping from.

I also absolutely do not like the outlook of putting all my curation work into a project that is proprietary and locked down by the devs and if it dies, my curation has to be either very portable (and its metadata) or I have to do a lot of work again.

This is why I'm not sitting on the Jellyfin horse. Even if Plex has some ups over Jellyfin here and there, I'd rather know that if Jellyfin devs give up, anyone can pick it up again and probably existing users' metadata along with it.

As for HAMA... Well... no matter how good or not too good it is about looking up info (for specials I found it very lackluster), in the end as it is now both Plex and Jellyfin both have the specials per series, not season constraint and that's quite the kicker.

I am going to digress on a brief tangent - something that shouldn't be in this issue, but simply is because I don't have a better place to express this.

If you have the resources and willingness to setup a local Plex instance (which doesn't need an account) that merely fetches the metadata and exports those as .nfo files, I would recommend that as a stopgap until someone who's both capable and interested in working on streamlining the anime experience for "us weebs". I say this as having used the official AniDB plugin by itself, using it along with other anime sources, using the custom resolver linked above and even flirting with using TheTVDB as a database.

See above. I've not been too happy with it. Could it be we both value specials very differently? LIkely neatly sorted and displayed OPs and EDs along with the anime, etc... a bit of a structured "Blu-Ray" experience, where the specials actually reside next to the actual season?

Also I really like my media manager "guiding" my viewing experience, so I VERY welcome it using all the meta data available reliably to display stuff as orderly as possible.

I'm very much the "anti-filesystem" person for viewing experiences. I guess if you don't mind this and you use JF like a filesystem on stereoids (visually) then having one folder for specials per show is fine I guess? Along with poorly extracted titles that are only based on file names, because the plugin couldn't match it to anything. (without a renaming orgy)

I understand that this is simply disregarding the issue rather than fixing it, and that people may not want to rely on closed source software, but I am a pragmatist and would always choose something that works reasonably well.

Pragmatically I just choose to raise awareness for a complete lack of proper anime support for its intricacies so the issue is tackled for now and the future and ideally for other projects to copy the concept that anime is not "just Japanese media that is kinda like generic media".

In the future, I do intend on attempting to port HAMA (at least the AniDB specific portions) to Jellyfin as a plugin (edit: I realised that it's not a matter of merely porting a Plex agent to a Jellyfin plugin as the database structures would be entirely different - this should be exmained from the perspective of the server, as expressed below); I am unfamiliar with C# and lack the time to become proficient enough to port it at the moment. In addition, submitting PRs to adjust the way seasons and series are handled to better accommodate AniDB's database structure is also an option, it just depends on people stepping up.

The more work is put into good matching media to anidb the better.

from jellyfin-plugin-anidb.

GlassedSilver avatar GlassedSilver commented on May 16, 2024

You might also want to take a look at Shoko Server - it builds a database of your library using hashes that it compares to AniDB's hash database, and then supplies the metadata to Jellyfin using the Shokofin plugin.

Tried it out, I find working with it a bit cumbersome.

I like its approach absolutely, but there doesn't seem to be an easy way to view all unmatched and then manually assigning IDs?
IDK...

IMHO... the lookup is the least of my worries. If I had to use a form view to assign files an anidb ID or something and then hit "apply" I'd be game.
I'm coming from iTunes (I know I know...) where all your metadata work was external and possibly manual.
The upside was that iTunes NEVER messed with the metadata, all your data was always "locked" and no metadata plugin could randomly wander around changing stuff you forgot to lock.

Anyhow... I'd still like to work that way, because I can check and verify everything that comes in and then safely know stuff stays the way I intend it to stay. I know I can do that now with using just local metadata, but then I still need something like Shoko, which I tried and didn't find very easy to work with for myself. Maybe I didn't try enough, because as long as specials are per show not per season I honestly don't REALLY put in the effort, not gonna lie.

from jellyfin-plugin-anidb.

GlassedSilver avatar GlassedSilver commented on May 16, 2024

In the best case we'd always have a way to force a specific episode/special by supplying not only an anidb id, but also a uid for a specific episode/special.

This isn't really supported by jellyfin. Either you use what it guesses (probably in the resolver? didn't search for that yet) or the plugin needs to overwrite it unconditionally. That's doable in case of normal episodes, but it won't work in the case where AniDB classifies it as a special but you want to have it in its own season. There is no checkbox to lock episode information as far as I can see.

It would be possible to add yet another two provider IDs which then get copied into the season/episode fields, but that's a pretty ugly workaround. Especially if you want to use multiple plugins and they are all fighting each other because the providers don't agree on the structure.

It's also a huge pain to actually use such a feature. At least better than actually renaming files and loosing all metadata in the process, but it still takes a long time if you need to do multiple times and even worse if there are multiple providers.

On top of things, this will be HIGHLY relevant: jellyfin/jellyfin#5732

I am not too sure about the resolver feature tbh. You can already achieve all of that with renaming/linking the files and there are tools for that. In my opinion the bigger issue is how seasons/specials work in jellyfin and anime usually has way too many special cases for mapping it automatically. Grouping related specials into their own jellyfin seasons (instead of a single 100+ epsiode specials category) would be very helpful and the same goes for grouping related "series"/"seasons" into a single jellyfin series (which makes the single shared specials category issue much worse!).

I honestly don't want to ever use multiple providers again, it's just headaches all over.

I'd rather stick to whatever anidb structure there is and if I completely hate it have a way to overwrite manually.

from jellyfin-plugin-anidb.

jrb0001 avatar jrb0001 commented on May 16, 2024

I did play around with writing my own plugin for a bit. It works like this at the moment:

  • You enter the desired structure and provider IDs in a set of CLI tools. The last one puts all data into a single JSON file and uploads it to a new Jellyfin plugin.
  • The plugin builds the jellyfin directory structure by symlinking/hardlinking/reflinking the original files into the library directory.
  • The plugin triggers a full rescan in the replace everything mode.
  • During the scan the plugin overwrites all metadata (including locked fields; TBD).

It definitely isn't efficient and not as flexible as I wish, but it works. You can build the following structures:

  • One Jellyfin season per provider season, grouped below a single series if you want.
  • Merge multiple provider seasons into a single Jellyfin season.
  • Specials can be before or after a season, or between two episodes.
  • Specials can also be put into a Jellyfin season as normal episodes.
  • Use season metadata from the provider on an episode (for movies) and the otherway around (no usecase yet).

The main limitations in Jellyfin core I encountered so far:

  • There is no way to put an episode directly into a series without a season (movies don't really need a season, at least not always).
  • There is no way to add another folder-like level below seasons. It would be nice sometimes to put all openings/endings into a single entry below their season.

There are still a few things left to do and I am not sure yet if I really want to go that way or if I should simply keep my anime collection outside Jellyfin.

Regarding AniDB: Their API is a huge pain, seriously.

Finally: Maybe we should move these discussions somewhere else? They are no longer really related to this plugin.

from jellyfin-plugin-anidb.

testerror404 avatar testerror404 commented on May 16, 2024

One Jellyfin season per provider season, grouped below a single series

Could you clarify what those term "Jellyfin season", "provider season" and "series" mean? To my knowledge, AniDB doesn't have seasons - just series entries.

There are still a few things left to do and I am not sure yet if I really want to go that way or if I should simply keep my anime collection outside Jellyfin.

If you don't mind my asking about it, how would you organise your anime collection if you decide to not use Jellyfin?

Finally: Maybe we should move these discussions somewhere else? They are no longer really related to this plugin.

Agreed - I apologise for bringing this up here. I do want to continue discussing this with @GlassedSilver. I've clearly misunderstood some of your statements, and didn't express my views as clearly as I should have. Please let me know if you can think of a suitable forum to talk about this.

from jellyfin-plugin-anidb.

GlassedSilver avatar GlassedSilver commented on May 16, 2024

Hey guys, episode metadata is working now. (Is anyone still here?)

There are still some things that could be worked on, but the most important things are here and working so I think we should close this issue. If someone wants some additional features or has a problem, they should make a new issue.

Here are some things that could still be added:

* episode rating? (I didn't find one anywhere on AniDB)

* matching by episode id

* showing metadata for missing files

* metadata for OP, ED, PV... (only normal episodes and specials are supported)

* multi episode files? (not supported by Jellyfin, I think, but we could still make it work)

If you want any of these implemented or have another problem, make a new issue or message me, then we can work on it. (or just use shoko ^^)

I'm a Shoko user now, but to integrate more than EPs and SPs natively could still be very helpful, even for Shoko users I think. If Shoko OR anidb can pass the type of a media item as OP, ED, then JF could then display them as such and use them accordingly. OPs and EDs right now are set as animated backdrops in the Shoko plugin, which is cool, but to just list them as OPs and EDs and then having a JF-native setting to (anime or not, you could adapt this to work in non-anime libs as well after all!) use those medias as backdrops in ADDITION to having them show in specials, that could be great.

Not covered by Shoko or anidb: BD menu files. I love them, they too would make for very good backdrops, but I'd love to keep them in Extras as well.

Parsing them, probably without metadata scraping if needed, since there's no source for metadata, based on common filenames would be very beneficial as well.

Multi-EP files are an issue outside of anime as well. I've split and remerged endings and openings to an entire season of Spongebob so I could Trakt.tv track them and honestly just enjoy a native feel to the library... Well... It's been QUITE the work. All releases like on DVD always piece together those 11-12 min EPs into a single typical 25min-run combined EP. But metadata agents don't work that way.

from jellyfin-plugin-anidb.

arabcoders avatar arabcoders commented on May 16, 2024

I noticed this plugin does not provide jellyfin with unique episode id for anidb, other providing sources like tvdb/imdb/tvmaze etc provide the ids, is there a reason why anidb plugin cant do the same ? example episode link https://anidb.net/episode/253395

from jellyfin-plugin-anidb.

arabcoders avatar arabcoders commented on May 16, 2024

@nalsai Thank you for your fast response. When can we expect the changes to be publicly avaliable i.e. release channel

from jellyfin-plugin-anidb.

arabcoders avatar arabcoders commented on May 16, 2024

It's going to be available once #33 gets merged by a maintainer. If you want it faster, I can give you the compiled dll, which you just have to copy to the plugin folder to install.

Thanks, i was just wondering,

from jellyfin-plugin-anidb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.