jellyfin / jellyfin-plugin-anidb Goto Github PK
View Code? Open in Web Editor NEWThis plugin adds the metadata provider for aniDB to Jellyfin
License: GNU General Public License v2.0
This plugin adds the metadata provider for aniDB to Jellyfin
License: GNU General Public License v2.0
Background is this jellyfin issue. TL;DR: Combining the anidb plugin with TheTVDB can cause some watched-state woes between seasons.
The primary reason I want to enable the tvdb-plugin is so that I can get the pretty banners/backdrops/logos etc. that it can fetch for the series. If this plugin could be updated to fetch images from the same sources (thetvdb.com and fanart.tv) there would be no need to enable TheTVDB. I'm guessing it should be fairly easy to implement using the anime-lists as a mapping.
When following the common naming scheme (Series (year)) the titles aren't searched.
Example:
Canaan (2009) - returns empty result
Canaan - works
The last version that didn't have this issue was 5.0.0.0.
Hello
First off, thanks for the great work. It helps to have plugins dedicated for retrieving anime metadata.
One thing I've noticed is that the documentation does not mention how to add the AniDB ID to the name the folder in a way that the plugin can pick it up automatically.
This feature is already provided by Jellyfin for movies and TV shows
It would be great if you could add that as part of the documentation.
Thanks again
Steps:
Result: Metadata (title, images, description, etc) for "Lost Universe" are loaded, and the external links for the show are:
Expected result: Metadata for the selected show ("Lost") loaded, and AniDB does not have an ID linked because the show isn't listed there.
More details:
The equality check in the series provider passes the same value into both sides, so they can never not be equal. This results in whatever show first matches the search being selected and tagged with an AniDB id.
I prefer going into things blind and view ratings as as something that spoil the initial impression. So, would it be possible to add a setting that disables fetching these?
Also see: jellyfin-archive/jellyfin-plugin-anime#47
I am on Jellyfin 10.7 with the old anime plugin deactivated.
I somehow get this error with the plugin from your unstable repo.
Seems something is wrong.
[2021-01-28 22:08:31.052 +01:00] [ERR] Error in "AniDB"
System.Xml.XmlException: Root element is missing.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseDocumentContentAsync_ReadData(Boolean needMoreChars)
at System.Xml.AsyncHelper.CallBoolTaskFuncWhenFinishCoreAsync[TArg](Task task, Func`2 func, TArg arg)
at System.Xml.XmlReader.MoveToContentAsync()
at Jellyfin.Plugin.AniDB.Providers.AniDB.Metadata.AniDbSeriesProvider.FetchSeriesInfo(MetadataResult`1 result, String seriesDataPath, String preferredMetadataLangauge)
at Jellyfin.Plugin.AniDB.Providers.AniDB.Metadata.AniDbSeriesProvider.GetMetadata(SeriesInfo info, CancellationToken cancellationToken)
at MediaBrowser.Providers.Manager.MetadataService`2.ExecuteRemoteProviders(MetadataResult`1 temp, String logName, TIdType id, IEnumerable`1 providers, CancellationToken cancellationToken)
Also, what is the best Anime scraper?
I already tried modified build.yml
, then build the plugin.
But obviously it doesn't work.
Could you provide plugin build for Jellyfin 10.6.4 ?
Or how can I build it myself?
I'd really love to have support for specials like openings and endings. @nalsai in #6 said
If you want any of these implemented or have another problem, make a new issue or message me, then we can work on it.
Originally posted by @nalsai in #6 (comment)
and so here's the issue.
It could also be good idea to support use of anidb episode prefixes:
S
OP
(sometimes it can be sth like OP1b
)ED
(sometimes it can be sth like ED1b
)T
Alternatively the prefixes could also be:
E
, EP
or Episode
- for regular episodesSP
or Special
- for specialsPV
, P
, AD
, PR
(not necessarily) or Promo
(not necessarily) - for trailer/promo/adsThere could be more types of episodes, but I haven't come across any.
And of course padded episode numbers (EP1
, EP01
or EP0001
) should also be supported, but I guess it's already implemented.
The AniDB API is heavily rate-limited and will ban any IP that requests more than maybe a few hundred series. Some of us data hoarders have far more series than that, meaning we can never do a full metadata refresh without getting banned.
I can think of three different scenarios when this causes problems:
A bit of brainstorming follows ๐
When I added my library I manually kept track in the xml cache directory for when I started getting banned messages. At that point I:
Not the most smooth sailing possible. I guess PR #42 may have helped me to detect the bans which would be an improvement, but unless it also prevents the plugin from making more requests it might also have made the bans longer (I understand the AniDB API adds ban-time for each "unsolicited" request).
A possible high-level solution (which I don't know if it's possible) would be to limit the plugin to maybe 200 requests during a sliding window of 24 hours. When asked for more the plugin should just respond that it currently has no metadata and maybe schedule a new refresh for that series in 24/48/possible more hours. Same if a ban is detected: refuse to send any more requests for at least 24 hours. It will still take very long time for a large library to be refreshed; but it would be populated eventually and without any cumbersome user interaction.
As for library metadata refresh I think there can be some improvements to the xml-file caching. At the moment it looks like the xml files are cached for 7 days. One idea would be to make a daily scheduled task that updates the 50 (or 100 or something) oldest xml files for series that are present in the library and raise the cache time to 30, 60 or 90 days. This would keep the xml files fairly fresh even for larger collections and you wouldn't run in to trouble if you configure the libraries to refresh periodically.
I realize that this is a quite big change, and maybe the problem is rare enough that not many more than I find this troublesome. Unfortunately I cannot help with the code myself, but I'd like to put it up here as an idea, and maybe someone else finds it to be a fun challenge. Anyway; Thank you for an awesome plugin ๐
When using the plugin as well as the TVDB plugin if you manually specify an andb episode entry and refresh metadata on an entry the manually entered id will be reset and it will pull the wrong info again.
Steps:
Result: A single show (Lost Universe) shows up.
Expected result: Multiple shows are listed, goal is probably this list filtered to fit library type (show here, movie for movie type library, both for other type) so that the correctly identified show can be selected.
More details:
The series provider search function simply calls GetMetadata
instead of hitting a search endpoint:
Hello,
Is it possible to choose the id only for the season ?
anidb don't provide a show id, only a season.
Thank you,
Best !
It would be nice to have an option to limit the number of cast and crew names pulled from the provider.
Many entries on AniDB have an absurd number of "Staff" entries, when all I really want are the several lead character's VAs. Like the TMDB plugin, an option to limit cast to a certain number
It would be nice to map the 18 restricted
tag to the Parental Rating value of NC-17
Currently manually having to lock the field and set it myself, it would be nice if it was somehow automatically mapped.
It seems that this plugin likes to match the longest title containing the search words.
Some examples:
and so on. I think the matching logic would get much better if it first attempted to find an exact match before attempting current logic.
Some episodes are not properly added to a show or a season, even when placed in the correct folder with a similar filename to other episodes.
For instance, this episode of Goblin Slayer (S02E02):
Does not appear in the Season:
The filename is the same format as the S02E01 which was properly identified:
Contents of the .nfo generated:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<episodedetails>
<plot />
<lockdata>false</lockdata>
<dateadded>2023-10-07 01:42:47</dateadded>
<title>An Ordinary Spring Day</title>
<rating>0</rating>
<year>2023</year>
<imdbid>tt20896366</imdbid>
<tvdbid>9040106</tvdbid>
<runtime>24</runtime>
<art>
<poster>/home/multimedia/Downloads/Animes/Goblin Slayer/Season 2/metadata/[SubsPlease] Goblin Slayer S2 - 01 (1080p) [23637EF6].jpg</poster>
</art>
<actor>
<name>Yuuichirou Umehara</name>
<role>Goblin Slayer (voice)</role>
<type>Actor</type>
<sortorder>0</sortorder>
<thumb>/var/lib/jellyfin/metadata/People/Y/Yuuichirou Umehara/folder.jpg</thumb>
</actor>
<actor>
<name>Yui Ogura</name>
<role>Priestess (voice)</role>
<type>Actor</type>
<sortorder>1</sortorder>
<thumb>/var/lib/jellyfin/metadata/People/Y/Yui Ogura/folder.jpg</thumb>
</actor>
<actor>
<name>Nao Toyama</name>
<role>High Elf Archer (voice)</role>
<type>Actor</type>
<sortorder>2</sortorder>
<thumb>/var/lib/jellyfin/metadata/People/N/Nao Toyama/folder.jpg</thumb>
</actor>
<actor>
<name>Yuka Iguchi</name>
<role>Cow Girl (voice)</role>
<type>Actor</type>
<sortorder>3</sortorder>
<thumb>/var/lib/jellyfin/metadata/People/Y/Yuka Iguchi/folder.jpg</thumb>
</actor>
<actor>
<name>Maaya Uchida</name>
<role>Guild Girl (voice)</role>
<type>Actor</type>
<sortorder>4</sortorder>
<thumb>/var/lib/jellyfin/metadata/People/M/Maaya Uchida/folder.jpg</thumb>
</actor>
<actor>
<name>Yuichi Nakamura</name>
<role>Dwarf Shaman (voice)</role>
<type>Actor</type>
<sortorder>5</sortorder>
<thumb>/var/lib/jellyfin/metadata/People/Y/Yuichi Nakamura/folder.jpg</thumb>
</actor>
<actor>
<name>Tomokazu Sugita</name>
<role>Lizard Priest (voice)</role>
<type>Actor</type>
<sortorder>6</sortorder>
<thumb>/var/lib/jellyfin/metadata/People/T/Tomokazu Sugita/folder.jpg</thumb>
</actor>
<actor>
<name>Yoko Hikasa</name>
<role>Witch (voice)</role>
<type>Actor</type>
<sortorder>7</sortorder>
<thumb>/var/lib/jellyfin/metadata/People/Y/Yoko Hikasa/folder.jpg</thumb>
</actor>
<actor>
<name>Yoshitsugu Matsuoka</name>
<role>Spearman (voice)</role>
<type>Actor</type>
<sortorder>8</sortorder>
<thumb>/var/lib/jellyfin/metadata/People/Y/Yoshitsugu Matsuoka/folder.jpg</thumb>
</actor>
<actor>
<name>Aya Endo</name>
<role>Sword Maiden (voice)</role>
<type>Actor</type>
<sortorder>9</sortorder>
<thumb>/var/lib/jellyfin/metadata/People/A/Aya Endo/folder.jpg</thumb>
</actor>
<showtitle>Goblin Slayer</showtitle>
<episode>1</episode>
<season>2</season>
<aired>2023-10-06</aired>
<fileinfo>
<streamdetails>
<video>
<codec>h264</codec>
<micodec>h264</micodec>
<bitrate>8153005</bitrate>
<width>1920</width>
<height>1080</height>
<aspect>16:9</aspect>
<aspectratio>16:9</aspectratio>
<framerate>23.976025</framerate>
<scantype>progressive</scantype>
<default>True</default>
<forced>False</forced>
<duration>23</duration>
<durationinseconds>1420</durationinseconds>
</video>
<audio>
<codec>aac</codec>
<micodec>aac</micodec>
<bitrate>127999</bitrate>
<language>jpn</language>
<scantype>progressive</scantype>
<channels>2</channels>
<samplingrate>44100</samplingrate>
<default>True</default>
<forced>False</forced>
</audio>
<subtitle>
<codec>ass</codec>
<micodec>ass</micodec>
<language>eng</language>
<scantype>progressive</scantype>
<default>True</default>
<forced>False</forced>
</subtitle>
</streamdetails>
</fileinfo>
</episodedetails>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<episodedetails>
<plot />
<lockdata>false</lockdata>
<dateadded>2023-10-13 19:06:16</dateadded>
<title>Goblin Slayer S2</title>
<language>en</language>
<art />
<showtitle />
<fileinfo>
<streamdetails>
<video>
<codec>h264</codec>
<micodec>h264</micodec>
<bitrate>8151020</bitrate>
<width>1920</width>
<height>1080</height>
<aspect>16:9</aspect>
<aspectratio>16:9</aspectratio>
<framerate>23.976025</framerate>
<scantype>progressive</scantype>
<default>True</default>
<forced>False</forced>
</video>
<audio>
<codec>aac</codec>
<micodec>aac</micodec>
<bitrate>128000</bitrate>
<language>jpn</language>
<scantype>progressive</scantype>
<channels>2</channels>
<samplingrate>44100</samplingrate>
<default>True</default>
<forced>False</forced>
</audio>
<subtitle>
<codec>ass</codec>
<micodec>ass</micodec>
<language>eng</language>
<scantype>progressive</scantype>
<default>True</default>
<forced>False</forced>
</subtitle>
</streamdetails>
</fileinfo>
</episodedetails>
I see to remember that identification and categorization in Shows/Seasons was based on the path and the filename, so why is Jellyfin properly identifying the first episode but not the second ?
My current folder structure looks like the following:
Series Name > Series Season Name [anidbid-12345] > Name - 01 - [some][info].ext
As AniDB does not support traditional seasons, a nice alternative would be to group series inside a folder and then have that folder be scanned in as a collection. This would greatly aid in adding new series to a library, and it would keep the main library directory more organized.
An example of this structure would look something this:
Anime Library >
Initial D > Initial D First Stage [anidbid-135] > Initial D First Stage - 01.mkv
Initial D > Initial D First Stage [anidbid-135] > Initial D First Stage - 02.mkv
Initial D > Initial D Second Stage [anidbid-145] > Initial D Second Stage - 01.mkv
Initial D > Initial D Second Stage [anidbid-145] > Initial D Second Stage - 02.mkv
Initial D > Initial D Third Stage [anidbid-625] > Initial D Third Stage Full Movie (2001).mkv
Initial D > ...
The base Initial D
folder would be located in the root of the library. When scanned, Jellyfin should check within the folder and create a collection titled Initial D
and then add the contained series to that collection.
please add the ability to login to anidb and track to mylist directly from the plugin. Its annoying to have to manually update mylist on anidb.
And provide options to do the following
ignore entires that dont have an anidb page number (if you have an anime in your library, and it couldnt find the anidb id for metadata, completely ignore it so it doesnt mess up mylist)
a history feature with ability to revert recent changes (failsafe in case it adds an anime with wrong metadata, accidentally marks the wrong anime/bunch of episodes as watched, etc.)
Some shows return only "undefined" when trying to identify them. The link to the entry from AniDB gets added but other information and images are missing.
[23:54:53] [INF] [64] Jellyfin.Api.Controllers.ItemLookupController: Setting provider id's to item fa6b9ec1-4251-3557-2d02-533b6866a756-JK Genkai Koubi Goui Sounyuu de Bachibachi Niku Anaka: {"AniDB":"17316"} [matroska,webm @ 0x563aa4a74700] Could not find codec parameters for stream 3 (Attachment: none): unknown codec Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (5000000) options [matroska,webm @ 0x563aa4a74700] Could not find codec parameters for stream 4 (Attachment: none): unknown codec Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (5000000) options [matroska,webm @ 0x563aa4a74700] Could not find codec parameters for stream 5 (Attachment: none): unknown codec Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (5000000) options [matroska,webm @ 0x563aa4a74700] Could not find codec parameters for stream 6 (Attachment: none): unknown codec Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (5000000) options [matroska,webm @ 0x563aa4a74700] Could not find codec parameters for stream 7 (Attachment: none): unknown codec Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (5000000) options [matroska,webm @ 0x563aa4a74700] Could not find codec parameters for stream 8 (Attachment: none): unknown codec Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (5000000) options [matroska,webm @ 0x563aa4a74700] Could not find codec parameters for stream 9 (Attachment: none): unknown codec Consider increasing the value for the 'analyzeduration' (200000000) and 'probesize' (5000000) options Unsupported codec with id 0 for input stream 3 Unsupported codec with id 0 for input stream 4 Unsupported codec with id 0 for input stream 5 Unsupported codec with id 0 for input stream 6 Unsupported codec with id 0 for input stream 7 Unsupported codec with id 0 for input stream 8 Unsupported codec with id 0 for input stream 9 [23:54:54] [INF] [3] MediaBrowser.Providers.TV.SeriesMetadataService: Removing virtual season 1 in series JK Genkai Koubi Goui Sounyuu de Bachibachi Niku Anaka [23:54:54] [INF] [3] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: Season, Name: Season 1, Path: , Id: ae9a5af0-91c2-cc0b-8e12-9210f800531b [23:54:54] [INF] [3] Jellyfin.Plugin.Tvdb.Providers.TvdbMissingEpisodeProvider: Creating Season Season 1 entry for JK Genkai Koubi Goui Sounyuu de Bachibachi Niku Anaka [23:54:54] [INF] [3] MediaBrowser.Providers.TV.SeriesMetadataService: Creating Season Season Unknown entry for JK Genkai Koubi Goui Sounyuu de Bachibachi Niku Anaka [23:54:54] [INF] [3] Emby.Server.Implementations.Library.LibraryManager: Removing item, Type: Season, Name: Season 1, Path: , Id: ae9a5af0-91c2-cc0b-8e12-9210f800531b [23:54:54] [WRN] [3] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from http://192.168.178.31:8096/Items/RemoteSearch/Apply/fa6b9ec1425135572d02533b6866a756?ReplaceAllImages=true to 192.168.178.24 in 0:00:01.7740956 with Status Code 204
Jellyfin version: 1.8.0
AniDB plugin version: 6.0.0.0
Steps to reproduce:
Result: No metadata is found for the movies.
Other notes:
I have had a difficult time having Jellyfin detect episode information/names properly when there is information located near the end of filenames. This could potentially be related to #6 I am not sure.
Just for example:
In my folder: /Videos/Anime/Fate Stay Night/Fate Stay Night - S01E01 - The First Day - [76C77486] [Moby JJ].mkv
In Jellyfin it shows up as: Fate Stay/Night - 1. Fate Stay Night - S01E01 - The First Day - [76C77486] [Moby JJ]
I would expect it to ignore the ending [76C77486] [Moby JJ]
. Often I also place codec and similar information in the filenames such as Fate Stay/Night - 1. Fate Stay Night - S01E01 - The First Day - [BluRay MKV FLAC 2.0] [76C77486] [Moby JJ]
. I would expect it to match the former lines and ignore everything it doesn't recognize (So everything after S01E01 or the episode name).
Now I am not entirely sure if this is an issue with Jellyfin, or an issue with this plugin. I state this because I have also had issues with this with Music. While I understand this plugin doesn't handle music, just for clarity, an example with Music:
/Music/Artists/Zuill Bailey/Zuill Bailey - Bach Cello Suites Volume 2 - [192k 24bit] [WAV] (Octave Records)/01 - Zuill Bailey - BWV 1008 Suite No. 2 in D minor - Prelude.wav
; /Music/Artists/Zuill Bailey/Zuill Bailey - Bach Cello Suites Volume 2 - [DSD] (Octave Records)/01 - Zuill Bailey - BWV 1008 Suite No. 2 in D minor - Prelude.dsf
. While not exactly the same folder/file structure, these show up in Jellyfin without proper metadata, and show up as the folder names (Zuill Bailey - Bach Cello Suites Volume 2 - [DSD] (Octave Records)
) instead of simply displaying Zuill Bailey - Bach Cello Suites Volume 2
as I would expect.
My Movies on the other hand, are labeled similarly and detect majority of the time properly, which is creating even more confusion for me. This makes me think this may be a plugin independent issue, and not Jellyfin? But I am not entirely sure anymore.
/Videos/Movies/Out of the Past (1947)/Out of the Past (1947) - BluRay Remux 1080p AVC FLAC 2.0 [HiFi].mkv
is an example. Detects no problems.
TV Shows also seem to generally detect without issues, although I have run into one or two here or there.
/Videos/TV Shows/SpongeBob SquarePants/Season 01/SpongeBob SquarePants - S01E01-E03 - Help Wanted, Reef Blower, Tea at the Treedome - 1080p AMZN WEB-DL DDP2.0 x264 [TVSmash]
I only provide the latter for redundancy and clarity, to help further explain my issue with the anime detection. It seems to be a bit random, as I can have some things named exactly the same, yet one would have issues detecting whilist the other detects fine. My files are generally pretty consistent from one another as far as the local naming schemes go. It would also not be the easiest thing to go in and rename terabytes of data.
I have heard others complain about detection issues as well, whilist Plex detects no issues according to them. Again I am unsure if this is a Jellyfin issue, or a plugin independent issue. I can move this issue over to the Jellyfin repository if desired.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.