Anime-Lists / anime-lists

101 stars 50 forks source link

Add season listings with unknown ending #428

Closed OxyMauron closed 6 months ago

OxyMauron commented 6 months ago

One Piece and Detective Conan. To the best of my knowledge, these are the only two other edge cases where the current season cannot have a defined end point. TVDB is dividing Super Dragon Ball Heroes (Added in #426) and One Piece by arc, and Detective Conan annually. None are really predictable until they're closer to finishing.

AniDB TVDB/TMDB/IMDB Notes
https://anidb.net/anime/69 https://thetvdb.com/index.php?tab=series&id=81797 Seasons 2-22
https://anidb.net/anime/266 https://thetvdb.com/index.php?tab=series&id=72454 Seasons 2-32
BrutuZ commented 6 months ago

I don't really see the point in these with the data available from theTVDB API but it shouldn't cause any troubles. Other than the eventual desync should the TVDB Mods mood strike ¯\_(ツ)_/¯

Guslletas commented 5 months ago

Hello, according to the guideline a mapping-list node must contain the following attributes: "anidbseason", "tvdbseason", "start", "end" and "offset" so skipping the "end" one for shows with unknown ending breaks this format and probably some apps expecting it(it did break my app). The format allows mapping shows with unknown ends but they have to be done in a different way:

You can either not map at all the last season if you want to map using absolute episode numbers or you point to the latest season in the main entry("defaulttvdbseason={lastseason}") with the proper offset and in the mapping-list entries you map the previous seasons. For example, using the second method One Piece would look like this:

    <anime anidbid="69" tvdbid="81797" defaulttvdbseason="22" episodeoffset="-1085" tmdbid="" imdbid="">
        <name>One Piece</name>  
        <mapping-list>  
            <mapping anidbseason="0" tvdbseason="0">;1-27;2-3;3-9;4-10;5-14;6-0;7-0;8-0;9-0;10-0;11-0;12-0;13-0;14-0;15-0;16-31;17-23;18-24;19-28;20-29;21-30;22-0;23-32;24-34;25-0;26-36;27-37;28-40;29-41;30-42;31-43;32-44;33-45</mapping>  
            <mapping anidbseason="1" tvdbseason="1" start="1" end="8" offset="0"/> 
            <mapping anidbseason="1" tvdbseason="2" start="9" end="30" offset="-8"/>  
            <mapping anidbseason="1" tvdbseason="3" start="31" end="47" offset="-30"/>  
            <mapping anidbseason="1" tvdbseason="4" start="48" end="60" offset="-47"/>  
            <mapping anidbseason="1" tvdbseason="5" start="61" end="69" offset="-60"/>  
            <mapping anidbseason="1" tvdbseason="6" start="70" end="91" offset="-69"/>  
            <mapping anidbseason="1" tvdbseason="7" start="92" end="130" offset="-91"/>  
            <mapping anidbseason="1" tvdbseason="8" start="131" end="143" offset="-130"/>  
            <mapping anidbseason="1" tvdbseason="9" start="144" end="195" offset="-143"/>
            <mapping anidbseason="1" tvdbseason="10" start="196" end="226" offset="-195"/>
            <mapping anidbseason="1" tvdbseason="11" start="227" end="325" offset="-226"/>
            <mapping anidbseason="1" tvdbseason="12" start="326" end="381" offset="-325"/>
            <mapping anidbseason="1" tvdbseason="13" start="382" end="481" offset="-381"/>
            <mapping anidbseason="1" tvdbseason="14" start="482" end="516" offset="-481"/>
            <mapping anidbseason="1" tvdbseason="15" start="517" end="578" offset="-516"/>
            <mapping anidbseason="1" tvdbseason="16" start="579" end="628" offset="-578"/>
            <mapping anidbseason="1" tvdbseason="17" start="629" end="746" offset="-628"/>
            <mapping anidbseason="1" tvdbseason="18" start="747" end="779" offset="-746"/>
            <mapping anidbseason="1" tvdbseason="19" start="780" end="877" offset="-779"/>
            <mapping anidbseason="1" tvdbseason="20" start="878" end="891" offset="-877"/>
            <mapping anidbseason="1" tvdbseason="21" start="892" end="1085" offset="-891"/>
        </mapping-list>
    </anime>
BrutuZ commented 5 months ago

If it broke your application there are two options: Implement handling for this case or open a PR to remove the few "endless" mappings so far as they were added as a trial on the condition no one complained it broke something :)

Changing the defaulttvdbseason from absolute to latest + offset is a big nono.

Guslletas commented 5 months ago

I already implemented a handling for this case but I still don't understand why changing the defaulttvdbseason is a big nono, it's just another way to map a show that complies with the guidelines and also allows you to map shows without an end. Why is the absolute mapping so important it can't be changed?

BrutuZ commented 5 months ago

Absolute season means the season mapping is available on TVDB, setting the default to the currently latest is an ugly workaround and just plain wrong. These (arguably redundant) season mappings were only accepted because they don't remove any information, only add. The parser is able to pick which one to use, the built-in possibly outdated one, or make an extra call for the up-to-date mapping directly from TVDB.

Also a small correction: The readme doesn't specify this but not all attributes are mandatory. There are plenty of mapping entries like the first one in your example with only the anidbseason and tvdbseason attributes.

Guslletas commented 5 months ago

Absolute season means the season mapping is available on TVDB, setting the default to the currently latest is an ugly workaround and just plain wrong.

Yet it allows you to completely skip accessing TVDB and exclusively use AniDB because you only need the amount of episodes, I had to ask for an api key from TVDB just for the few absolute mappings there are while AniDB was more than enough for the non-absolute mapped majority.

These (arguably redundant) season mappings were only accepted because they don't remove any information, only add. The parser is able to pick which one to use, the built-in possibly outdated one, or make an extra call for the up-to-date mapping directly from TVDB.

How often a new season is added in TVDB for these shows for this to be a high risk? You already risk having wrong info with most mappings because TVDB might decide to change something.

Also a small correction: The readme doesn't specify this but not all attributes are mandatory. There are plenty of mapping entries like the first one in your example with only the anidbseason and tvdbseason attributes.

I know, but those can only be skipped in the case of mapping individual episodes instead of ranges and since those cases were the later they must have start, end and offset.

BrutuZ commented 2 months ago

Just for the record @OxyMauron, this did break even HAMA per https://github.com/ZeroQI/Hama.bundle/issues/559, luckily it was patched by https://github.com/ZeroQI/Hama.bundle/commit/bb684a2299d06b1377b4d3e1c81dff417ce4e9de