Skip to content

Include next airing episode in anime schedule data - #1705

Merged
IgnisDa merged 2 commits into
mainfrom
IgnisDa/issue1702
Feb 13, 2026
Merged

IgnisDa merged 2 commits into
mainfrom
IgnisDa/issue1702

Conversation

@IgnisDa

@IgnisDa IgnisDa commented Feb 13, 2026

Copy link
Copy Markdown
Owner

Enhance the anime schedule data by merging the next airing episode into the existing airing schedule. This ensures that upcoming episodes are always captured, addressing issues with outdated airing schedule nodes.

Fixes #1702.

Summary by CodeRabbit

Release Notes

  • New Features
    • Added next airing episode details to media pages.
    • Enhanced airing schedule assembly to include predicted/updated upcoming entries.
    • Expanded media retrieval to surface type, genres, studios, trailer, banner, volumes and average score.

AniList default airingSchedule nodes can lag behind and include only older episodes, which leaves anime upcoming entries missing in Ryot calendar updates. Keep the existing airingSchedule payload and merge nextAiringEpisode into anime_specifics.airing_schedule so the immediate upcoming episode is always captured without dropping legacy schedule data.
@coderabbitai

coderabbitai Bot commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Adds a next_airing_episode field to MediaDetails, expands the GraphQL media_details selection with additional fields (genres, volumes, bannerImage, averageScore, trailer, studios, nextAiringEpisode, airingSchedule), and changes airing schedule assembly to merge next airing data into the computed schedule.

Changes

Cohort / File(s) Summary
AniList Provider Data Model & Mapping
crates/providers/anilist/src/models.rs
Added pub next_airing_episode: Option<...> to MediaDetails. Extended GraphQL selection to request type, genres, volumes, bannerImage, averageScore, trailer, studios, nextAiringEpisode, and airingSchedule. Reworked airing schedule construction: build from nodes, default empty schedule, convert next_airing_episode.airing_at to naive UTC date, update matching episode entry or append a new one, and return Some(schedule) or None when empty. Preserved existing transformations for genres, images, staff/studios, recommendations, and trailers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding next airing episode data to anime schedule information, which is the primary objective of the changeset.
Linked Issues check ✅ Passed The pull request successfully addresses issue #1702 by merging nextAiringEpisode into the airing schedule, ensuring upcoming episodes are captured for anime media types.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue objective of displaying anime release schedules by updating the GraphQL query and airing schedule logic.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch IgnisDa/issue1702

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@crates/providers/anilist/src/models.rs`:
- Around line 513-526: The dedupe currently checks both episode and airing_at,
causing duplicates when AniList updates times; change the logic around
media.next_airing_episode and airing_schedule so you deduplicate by episode only
(use any or position on s.episode == data.episode) and, if an entry exists,
update its airing_at to the new airing_at (prefer next_airing_episode as
authoritative) instead of pushing a new AnimeAiringScheduleSpecifics; only push
when no existing episode entry is found.

Comment thread crates/providers/anilist/src/models.rs
@IgnisDa
IgnisDa merged commit a6800fb into main Feb 13, 2026
14 checks passed
@IgnisDa
IgnisDa deleted the IgnisDa/issue1702 branch February 13, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

​[Bug] Release schedule/calendar is missing for Anime (working for Shows)

1 participant