jellyfin / jellyfin-plugin-anidb

This plugin adds the metadata provider for aniDB to Jellyfin
GNU General Public License v2.0
33 stars 13 forks source link

GetMetadata always returns the first search result, regardless if it matches the request #18

Open 1337joe opened 2 years ago

1337joe commented 2 years ago

Steps:

  1. Install the AniDB plugin.
  2. Create a library of type show with at least one show in it.
    • Ensure the AniDB metadata downloader is enabled as the first metadata downloader in the library (for each category), and also enable TheMovieDb as a secondary downloader.
  3. Open the library, select the show, and select "Identify"
  4. Enter name "Lost", hit "Search"
  5. Select the second entry ("Lost", from TheMovieDb) and hit "Ok"

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. https://github.com/jellyfin/jellyfin-plugin-anidb/blob/f954e9f71b94fad8aee76266d35b5e2e99256b9a/Jellyfin.Plugin.AniDB/Providers/AniDB/Metadata/AniDbSeriesProvider.cs#L67