Anime-Lists / anime-lists

107 stars 52 forks source link

Mapping half-length episodes #339

Closed winterbird-code closed 1 year ago

winterbird-code commented 1 year ago

I noticed that some episodes are mapped one-to-many using the syntax ;1-1+2;; for example Gera Gera Booth Monogatari for which thetvdb has half lenght episodes. I couldn't find any many-to-one mapping though. I noticed this when I wanted to map Ling Qi, which has half-length episodes in anidb, but full length in thetvdb. Would this be a correct mapping, or would it break stuff horribly:

  <anime anidbid="12656" tvdbid="321503" defaulttvdbseason="1" episodeoffset="" tmdbid="" imdbid="">
    <name>Ling Qi</name>
    <mapping-list>
      <mapping anidbseason="1" tvdbseason="1">;1+2-1;3+4-2;5+6-3;7+8-4;9+10-5;11+12-6;13+14-7;15+16-8;17+18-9;19+20-10;</mapping>
    </mapping-list>
  </anime>

Maybe this syntax should be mentioned in the README as well?

BrutuZ commented 1 year ago

I don't think that syntax is supported by any client and I'm not sure it wouldn't break any of them either. On the [very] few instances I encountered this, I either pick a single episode to map (;1-1;3-2;5-3;...) or map them all to the same (;1-1;2-1;3-2;4-2;5-3;6-3;...), whichever compromise worked best for the situation.

winterbird-code commented 1 year ago

Hmm, I like the second, more explicit, mapping better since you otherwise wouldn't know how to map episode 2 and 4 and so on. I'll prepare a PR for readme and the Ling Qi mapping.