Anime-Lists / anime-lists

115 stars 52 forks source link

Feature request: Mapping individual episodes to other ID #356

Closed winterbird-code closed 1 year ago

winterbird-code commented 1 year ago

I'm currently working on remapping Prince of Tennis, and encountered this interesting problem with Tennis no Ouji-sama: Best Games!!.

The "series" is in fact three movies that is not present as specials in TVDB, and reading the guidelines for specials in TVDB it doesn't look likely they will ever be added. But at least two of them has TMDB-entries.

I think it would be nice to be able to map these specific episodes to their tmdb entries, so I'm proposing adding something like this:

  <anime anidbid="12484" tvdbid="movie" defaulttvdbseason="" episodeoffset="" tmdbid="" imdbid="">
    <name>Tennis no Ouji-sama: Best Games!!</name>
    <mapping-list>
      <mapping anidbseason="1" start="1" end="1" tmdbid="747979" />
      <mapping anidbseason="1" start="3" end="3" tmdbid="747977" />
    </mapping-list>
  </anime>

This syntax could also allow certain episodes to be mapped to a different tvdbid than the main series (by adding tvdbid, tvdbseason and optional offset attributes). I have no examples of that use case as of yet, but I don't think it's completely unlikely for that scenario to exist... For movies it's a bit verbose with having to define both start and end; but it's a rare issue so I think the flexibility is more important.

BrutuZ commented 1 year ago

You can specify multiple TMDBID and IMDBID, just separate them with a comma. https://github.com/Anime-Lists/anime-lists/blob/4c4b2d11d23e2a82b97b3baa022dd0b91e853940/anime-list-full.xml#L28030

winterbird-code commented 1 year ago

Ah, another thing to think about in my parser then :slightly_smiling_face:

I assume that means that position in the list maps to the episode number? So in this case if there is no tmdbid for the second movie (I couldn't find one at least) there will be two commas separating the ID of the first and third movie:

  <anime anidbid="12484" tvdbid="movie" defaulttvdbseason="" episodeoffset="" tmdbid="747979,,747977" imdbid="tt9108390,tt10276074,tt11575566">
    <name>Tennis no Ouji-sama: Best Games!!</name>
  </anime>

It's not as flexible as my proposed solution (there is still no way to map a special to another ID for example), but it works in this case at least.

BrutuZ commented 1 year ago

I'd go with a 0 or some other invalid value instead of two commas in a row. If not for the consistency of integer values, at least to make it clearer it wasn't a typo.

BrutuZ commented 1 year ago

Speaking of consistency, don't forget to set the tvdbseason to 1 when assigning a media type value to tvdbid.

Don't ask me why that is, previous entries were already like that when I started submitting PRs so I just try to keep it somewhat consistent 😜

winterbird-code commented 1 year ago

Right; I'm closing this since the immediate problem is solved and there is no need for this until a real-life-scenario appears.