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

feat: map AniDB IDs from Hama agent to tvdb/tmdb/imdb IDs #538

Merged
merged 7 commits into from
Jan 8, 2021
Merged

feat: map AniDB IDs from Hama agent to tvdb/tmdb/imdb IDs #538

merged 7 commits into from
Jan 8, 2021

Conversation

mmozeiko
Copy link
Contributor

Description

This adds hama agent support - maps AniDB IDs to tvdb/tmdb/imdb IDs. So once anime is identified in Plex for hama agent libraries, it will show up available as tv show or movie.

Hama agent stores tvdb or anidb in guid. See Absolute Series Scanner for details how it can be configured: https://github.com/ZeroQI/Absolute-Series-Scanner

If tvdb is detected in guid, then same code as regular tvdb lookups is used to map it to tvshow.
If anidb is detected in guid, then it is remapped using ScudLee mappings xml : https://github.com/ScudLee/anime-lists/ These are same mappings that Hama agent uses for matching metadata to content. XML mappings are downloaded once a day and cached on local disk (config/anime-list.xml file).

Because of way how hama stores movies in Special season of tv show library, there's extra code in processShows to create movies. Either directly or by walking over each episode in Specials/ Season0 to try to map it to tmdb/imdb.

The solution is not ideal, as unknown anidb ids are not mapped at all, just skipped - same as before. But that's basically issue with ScudLee mappings - you need to go to their repo and update mappings, if you want missing/newer stuff to be picked up.

I've tested this on my 500+ anime library, and I see most of the stuff being picked up correctly.

Screenshot (if UI related)

Todos

  • Sucessfully builds yarn build
  • Translation Keys yarn i18n:extract
  • Database migration created (if required)

Issues Fixed or Closed by this PR

@DJScias
Copy link
Contributor

DJScias commented Dec 31, 2020

Hello there,

While I haven't looked over the code, I should mention that HAMA no longer uses Scudlee's repo as it has become stale and inactive.

They've switched to this one which is more active and actually maintained: https://github.com/Anime-Lists/anime-lists

As can be seen here:
ZeroQI/Absolute-Series-Scanner@1a155ab

It might be best to make the same switch.

Kind regards,
DJScias

@mmozeiko
Copy link
Contributor Author

Oh, nice that seems to be more up to date. Will switch to that.

Copy link
Owner

@sct sct left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really great. Thanks so much. I just have a few little nitpicks for you but nothing too major!

server/api/animelist.ts Outdated Show resolved Hide resolved
server/api/animelist.ts Outdated Show resolved Hide resolved
server/api/animelist.ts Outdated Show resolved Hide resolved
server/api/animelist.ts Outdated Show resolved Hide resolved
server/api/animelist.ts Outdated Show resolved Hide resolved
server/job/plexsync/index.ts Outdated Show resolved Hide resolved
server/job/plexsync/index.ts Outdated Show resolved Hide resolved
server/job/plexsync/index.ts Outdated Show resolved Hide resolved
server/job/plexsync/index.ts Outdated Show resolved Hide resolved
server/job/plexsync/index.ts Outdated Show resolved Hide resolved
Copy link
Owner

@sct sct left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are good to try this in develop! Rebase and we can merge!

@sct sct merged commit 0600ac7 into sct:develop Jan 8, 2021
@mmozeiko mmozeiko deleted the hama branch January 8, 2021 10:48
@sct sct mentioned this pull request Jan 10, 2021
@github-actions
Copy link

🎉 This PR is included in version 1.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants