Jellyfin Forum
Fixing Metadata for an Anime - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Fixing Metadata for an Anime (/t-fixing-metadata-for-an-anime)



Fixing Metadata for an Anime - Zeal514 - 2023-10-11

I have Inuysha on my server and imported the episodes to Sonarr, which created hardlinks, BUT the hardlinks are copying the exact same naming convetion, but in seasonal folders.  So it looks like this.

Code:
zeal@nasus:~/data/media/anime/InuYasha$ ls
backdrop.jpg  folder.jpg  'Season 2'  'Season 4'  'Season 6'
banner.jpg    'Season 1'  'Season 3'  'Season 5'  'Season 7'

Then here is season 1

Code:
zeal@nasus:~/data/media/anime/InuYasha/Season 1$ ls
'[a-s]_inuyasha_-_001__rs2_[F17820E3].mkv'  '[a-s]_inuyasha_-_015__rs2_[395F4702].mkv'
'[a-s]_inuyasha_-_002__rs2_[B9BFF92F].mkv'  '[a-s]_inuyasha_-_016__rs2_[4D2B6E2D].mkv'
'[a-s]_inuyasha_-_003__rs2_[2B067385].mkv'  '[a-s]_inuyasha_-_017__rs2_[B59A3EBD].mkv'
'[a-s]_inuyasha_-_004__rs2_[D567C1D1].mkv'  '[a-s]_inuyasha_-_018__rs2_[84D99CAC].mkv'
'[a-s]_inuyasha_-_005__rs2_[A3972E34].mkv'  '[a-s]_inuyasha_-_019__rs2_[B56E6591].mkv'
'[a-s]_inuyasha_-_006__rs2_[A027878E].mkv'  '[a-s]_inuyasha_-_020__rs2_[DBF52665].mkv'
'[a-s]_inuyasha_-_007__rs2_[1642B07D].mkv'  '[a-s]_inuyasha_-_021__rs2_[9F4C7E9C].mkv'
'[a-s]_inuyasha_-_008__rs2_[E9B1E39C].mkv'  '[a-s]_inuyasha_-_022__rs2_[80E1254E].mkv'
'[a-s]_inuyasha_-_009__rs2_[6907FD31].mkv'  '[a-s]_inuyasha_-_023__rs2_[FD3EAAB7].mkv'
'[a-s]_inuyasha_-_010__rs2_[82A90A96].mkv'  '[a-s]_inuyasha_-_024__rs2_[5628DCFE].mkv'
'[a-s]_inuyasha_-_011__rs2_[9A1AFF41].mkv'  '[a-s]_inuyasha_-_025__rs2_[4FEFD251].mkv'
'[a-s]_inuyasha_-_012__rs2_[103449B0].mkv'  '[a-s]_inuyasha_-_026__rs2_[FCDCF794].mkv'
'[a-s]_inuyasha_-_013__rs2_[6E9B5EC1].mkv'  '[a-s]_inuyasha_-_027__rs2_[301D1372].mkv'
'[a-s]_inuyasha_-_014__rs2_[2B66109A].mkv'  metadata

This leaves me with a few questions.

  1. Can i delete the metadata from jellyfin gui?  It seems that it also deletes the files.  I mean i could delete the file 'metadata' idk if that would work.  My goal is to dictate to jellyfin to try and use a specific metadata db, to maybe fix it?  Like it'd be nice to just right click the series, and say "collect metadata from aniDB" or "AniList" etc.
  2. What is the best way to rename the these files? I kinda got a issue here.  I was thinking of writing a script to rename the files, but not sure if i rename the hardlinked files if it will mess up sonar/hardlinks, but than if i rename the original files, I dont know if a script will work well because i'd have to go in and match each file in the torrent client.  I can't be the first person to have this issue, what is everyone else doing?



RE: Fixing Metadata for an Anime - bitmap - 2023-10-11

For #2: You need to alter your Sonarr config if it's not renaming files to your needs. I'd recommend looking to those communities or to their thorough documentation for information on renaming files on import. This is a basic function of Sonarr and not the focus of this community, so the line we (read: I) walk is to point you towards the resources that exist elsewhere.

On the Jellyfin side of things, you can either have Sonarr store its metadata in a Jellyfin-compatible NFO file (or not) or have Jellyfin store metadata in NFO files (or not). You can also edit the metadata individually (per episode) or in bulk by refreshing and choosing how you'd like to replace the metadata (missing only or replace all). If your naming doesn't match the required conventions of Jellyfin, you'll likely get some outliers you'll have to fix by hand.

To specify a metadata provider, you have to edit the Library, not an individual series. You edit the Library, enable or disable metadata provider(s), and rank them based on preference. For instance, anime libraries tend to benefit from using anime-only metadata providers such as AniDB and image fetchers such as fanart. All of that needs to be configured at the library level, not the series level. Then you can return to the series, click the kebab menu, refresh metadata, replace all metadata, and see what happens.

Jellyfin won't delete your files (unless you placed them inside your transcode directory as we all learned from a special, angry user a few weeks ago). It will delete the existing metadata, but that can be restored by refreshing in Jellyfin or in Sonarr and utilizing the source of your choice.


RE: Fixing Metadata for an Anime - elephantLYFE - 2023-10-11

I'm not familiar with using the family of arr software.
Maybe you can re-explain your specific goal(s)?
Are you trying to maintain file names,
that appease requirements all of Jellyfin, UsersChoiceOfAnimeAPI, & Sonarr? At the same time?

When i have issue with any movie/show, first thing I do is check that file naming convention,
adheres to the documentation. https://jellyfin.org/docs/general/server/media/shows/

I would remove the media to another directory.
Clean up the file names. Delete NFO & Artwork.
Double check folder structure.
After Jellyfin has had time to acknowledge the previous media removal,
Re-import to Jellyfin.

If I still have issue with incorrect metadata,
I double check DB i pull from, and check for DVD/AIR order, JAP vs. USA air order, etc.
(good example often asked is the Cowboy Bebop, which is often resolved by reorder by DVD order)

I could be wrong, but the first thing that jumps out at me is the "[]" at the beginning,
and the many many '-' & '_', and the lack of SXXEXX convention for Season & Episode.
I think in the past i have used "Bulk File Renamer", when cleaning up filenames in mass.
https://www.bulkrenameutility.co.uk/


RE: Fixing Metadata for an Anime - Zeal514 - 2023-10-11

(2023-10-11, 01:32 AM)bitmap Wrote: For #2: You need to alter your Sonarr config if it's not renaming files to your needs.

Welp.  I just went through and renamed all of the hard links, just used ChatGPT to bat h mv commands for me sin e my scripts weren't working right.   Read this afterwards..  i thought I had renaming setup, but it was a issue with anime.  Jusy double checked, and nope, I didn't.  You were right. 

As for the info files. Where are they located in a Jellyfin container? I'm gonna have to track them down. I assume I can just open them in my text editor and edit them that way? I was manually fixing some in the GUI, but just too many clicks.


RE: Fixing Metadata for an Anime - bitmap - 2023-10-11

Don't manually edit NFO files. You can if you REALLY want to bore yourself to death.

I tried to get this in as few screenshots as possible, so there's a bit of missing context but hopefully it makes sense. All of this is Jellyfin, as I said, seek help with Sonarr through their documentation.

First up, I'd enable the AniDB (or your preferred anime DB plugin) via Dashboard > Plugins (you may have to go to Catalog and install it, which will require a restart). Then, go to your anime library/ies and uncheck other sources for METADATA and check only AniDB or your preferred source. You can keep other sources for image fetching, in fact, Fanart has some awesome images for series, episodes, banners, etc. Just make sure you rank them by preference. Set when you prefer for the metadata to be refreshed. I set this to never, but I want to set the metadata once and have it be done with. It will look something like this:

   

From there, you can either go to your entire library (Dashboard > Libraries) or just the series in question and refresh the metadata. For the Library route (careful if you don't have a bunch of items that need fixing), click the kebab -- three vertical dots -- and click Scan Library, choose Replace All Metadata from the drop-down, and check the box if you want new images from the sources you chose.

   

If things still aren't correct, like a series isn't matching up or an episode (like the above) is giving you trouble, use the trusty Metadata Editor. It's hidden. I have to look for it every time. Click the profile icon in the top right (you must be an administrator) and click Metadata.

   

The left column shows your media, the right column will populate the individual metadata for an item when you select it. Remove all IMDB, TMDB, TVDB, etc. IDs when editing this data. Remove everything except correct series name, episode number, season number, and any other information you're 100% sure of. You can find the episode ID if you want to make it easier, but hopefully it'll be able to identify just from the fragments you provide.

Hope this helps!


RE: Fixing Metadata for an Anime - Dex Luther - 2023-10-13

(2023-10-11, 01:42 AM)elephantLYFE Wrote: I could be wrong, but the first thing that jumps out at me is the "[]" at the beginning,
and the many many '-' & '_', and the lack of SXXEXX convention for Season & Episode.
I think in the past i have used "Bulk File Renamer", when cleaning up filenames in mass.
https://www.bulkrenameutility.co.uk/

Rename my TV Series is also a good tool for renaming files for a TV show to whatever naming convention you want. It can even pull the season/episode numbers and titles from a few different sources (TVDB, TVMAZE, and I forget the other).
https://www.tweaking4all.com/home-theatre/rename-my-tv-series-v2/