Clarify the 'missing episode' definition and AniDB_GroupStatus refresh behavior #1418
harshithmohan
started this conversation in
General
Replies: 2 comments 4 replies
|
So, it worked that way for an obvious reason. We had the data.
|
2 replies
|
A problem with group status is that it can be stale, as mentioned. A problem with not using group status is that it's actually not uncommon for an episode to be added when it's announced, such as a special announcement, but then no one ever uploads it. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Background
While investigating a user-facing inconsistency, I found two related questions worth settling as a team. Both revolve around what "missing episode" means and where the release-group data that one definition depends on comes from.
The divergence
/v3/Series→Sizes.Missing.Episodesand/v3/MissingEpisodesreport different numbers for the same series.Example: for a currently-airing series where a recent episode's AniDB air date has passed but no release group has actually produced it yet:
Sizes.Missing.Episodescounts it (non-hidden, aired regular episode, no local file)./v3/MissingEpisodesdoes not list it (it additionally requires a release group to have reached that episode).So a series can show "1 missing episode" in
Sizeswhile the missing-episodes endpoint returns nothing (or fewer) for the same series.Why they differ
The two features encode two different notions of "missing":
/v3/Series→Sizes/v3/MissingEpisodesAniDB_GroupStatus)Sizes.Missing.Episodes(ModelHelper.GenerateSeriesSizes) is computed in-memory: not hidden +EpisodeType == Episode+ no local file +HasAired. It never readsAniDB_GroupStatus./v3/MissingEpisodes(AnimeEpisodeRepository.GetMissing) is a SQL query that adds a group-status gate: an episode counts only if it's aired/unknown and no file exists and (AniDB_GroupStatushas no rows or some group hasCompletionState IN (3,5)orLastEpisodeNumber >=the episode).Second part:
AniDB_GroupStatusgoes stale (this is a defect, not a decision)The "released-but-absent" definition depends on
AniDB_GroupStatus, which is only ever written byGetAniDBReleaseGroupStatusJob. That job is not part of the standard anime-refresh path — it's only triggered from the legacy v1 API (initial-load atShokoServiceImplementation_Entities.cs:1784, "Get Updated" at:1823). There is no recurring job and no v3 trigger.Consequences:
GetAniDBReleaseGroupStatusJob.ShouldSkip()already handles the ended-anime case (skips only when ended > 50 days ago, unlessForceRefresh), so there's no technical reason it can't run on a normal refresh.Decision needed
Which definition of "missing" should be canonical?
Whichever we pick, the
Sizescounter and theMissingEpisodesendpoints should agree (or clearly communicate the distinction).Proposed follow-up (actionable either way)
Run
GetAniDBReleaseGroupStatusJob(force refresh) as part of the anime-refresh pipeline (e.g.GetUpdatedAniDBAnimeJob/ the remote refresh path) soAniDB_GroupStatusstays current without depending on the legacy v1 API.All reactions