Skip to content

feat: Add new "Recently Aired Shows" menu for tracking latest anime episodes - #417

Open
Alqatrony wants to merge 9 commits into
Goldenfreddy0703:mainfrom
Alqatrony:feature/recently-aired-shows
Open

feat: Add new "Recently Aired Shows" menu for tracking latest anime episodes#417
Alqatrony wants to merge 9 commits into
Goldenfreddy0703:mainfrom
Alqatrony:feature/recently-aired-shows

Conversation

@Alqatrony

@Alqatrony Alqatrony commented Sep 13, 2025

Copy link
Copy Markdown

🎯 Summary

This PR introduces a brand new feature: "Recently Aired Shows" - a dedicated menu that displays all anime episodes that aired in the last 7 days.

✨ What's New

  • New main menu item "Recently Aired Shows"
  • Shows all anime episodes from the past 7 days
  • Pagination support (24 items per page)
  • Quality filtering to show only relevant content

📝 Implementation

New Methods in AniListBrowser.py:

  • get_recently_aired_shows() - Main entry point
  • get_recently_aired_shows_res() - GraphQL query for airing schedules
  • process_recently_aired_view() - Processes and filters results

New Route in Main.py:

  • RECENTLY_AIRED_SHOWS() - Route handler
  • Added menu item to main navigation

🚀 Features

  • 7-Day Coverage: Shows all episodes from past week
  • Quality Filtering: Score ≥65 OR popularity ≥10,000
  • Pagination: 24 items per page with Next Page button
  • Chronological: Most recent episodes first

🐛 Bug Fix

  • Fixed TypeError in database_update_show() date handling

🧪 Testing

  • ✅ Menu appears in main navigation
  • ✅ Shows 24 items per page
  • ✅ Pagination works correctly
  • ✅ Quality filtering working
  • ✅ Episode numbers display properly

📸 Screenshots

Screenshot 2025-09-13 213950

@Goldenfreddy0703

Goldenfreddy0703 commented Sep 13, 2025

Copy link
Copy Markdown
Owner

Hey thank you so much for making this pr but we also need to apply this to Mal browser as well so that the mal people could have this. Also just a quick question, i did read into your pr but i have to ask, what is the point of this menu item if we have an airing anime calendar of course?

Reason why i ask is cause this menu items kinda operates the same as the calendar right?

Edit: Forget about that last question i asked. I looked more into your code and i like how you did it so i may merge very soon on this, if you can also do the same with the MalBrowser, that would be amazing. Thank you

@Alqatrony

Copy link
Copy Markdown
Author

Hey! Really excited to contribute this feature enhancement. Otaku has become my favorite addon, so thanks for building such an awesome project and letting me help improve it! 🙌

🔧 What's Implemented

I've extended the Recently Aired Shows feature to work seamlessly with MAL users:

  • ✅ Unified Route: Uses the same recently_aired_shows endpoint - respects the existing provider switch automatically
  • ✅ Consistent Logic: Same 7-day rolling window (today + last 6 days), TIME_DESC sorting
  • ✅ Smart Routing: When provider = MAL, items open MAL Browser show menus using idMal where available
  • ✅ Graceful Fallback: Handles missing MAL IDs without breaking
  • ✅ Widget Compatible: Maintains clean TV-shows directory structure for skin widgets

🧪 Testing

Verified by toggling the provider setting - both AniList and MAL work perfectly and remain widget-friendly.

🤝 Ready for Review

If you'd like any tweaks to the mapping logic, fallback behavior, or naming conventions, I'm happy to adjust. Looking forward to your feedback!

Thanks again for maintaining such a fantastic project!

@Goldenfreddy0703

Copy link
Copy Markdown
Owner

Hey so i looked at your code on the mal stuff and its great but its utilizing the anilist browser and converting to mal which is ok but i would like you to utilize the jikan api for mal. Is that possible by anychance?

https://docs.api.jikan.moe/#tag/anime/operation/getAnimeStreaming

I wanna keep mal and anilist separated cause there is a small possibility that one or the other may go down in the future. If that could be possible that would be amazing. Thanks.

on jikan api, you can utilize score, max sore, min score, and status, sort. Again, if we can make that happen, that would be amazing.

Thanks

@Alqatrony

Copy link
Copy Markdown
Author

🔄 Updated Implementation - Now with Native Jikan API

Thanks for the feedback! I've updated the MAL implementation to use Jikan API directly instead of converting AniList data.

What Changed:

  • Complete API Separation: MAL now uses pure Jikan API, AniList uses GraphQL
  • Native Jikan Filtering: Uses status=airing, min_score=6.5, order_by=popularity
  • Better Reliability: If one API goes down, the other works independently
  • Same UX: Still 24 items per page with pagination

📊 Result:

Shows currently airing popular anime (score ≥6.5) for MAL users - actually more useful for discovering quality ongoing shows!

Ready for review! 🚀

@Goldenfreddy0703

Copy link
Copy Markdown
Owner

Perfect, thank you very much, once I get home, will review and most likely merge and release.

Thank you

@Goldenfreddy0703

Goldenfreddy0703 commented Sep 14, 2025

Copy link
Copy Markdown
Owner

Hey so im traveling at the moment but I took a look through your code and its great, I am going to do some edits to make this work for all formats and stuff. There is probably some code that may need to be done but shouldn't be too hard when i get home.

@Goldenfreddy0703

Copy link
Copy Markdown
Owner

Hey @Alqatrony ,so been looking at your code for hours and made some changes here and there but I'm having a very hard time understanding Recently Aired Shows and I'm not sure why. I know it's like aired episodes from the past 7 days or week but again I'm having a hard time figuring that out on Mal.

On Anilist I think I see what you did but on mal, I'm quite confused. If you could explain this to me tomorrow on mostly discord or keybase. That would be great.
Thanks

📬 Contact

@Alqatrony

Copy link
Copy Markdown
Author

Hey I just sent you a friend request on Discord.

@Alqatrony
Alqatrony force-pushed the feature/recently-aired-shows branch from 419dc37 to 8581583 Compare October 31, 2025 22:08
Alqatrony and others added 7 commits November 1, 2025 00:32
- Create new menu item for tracking recently aired anime episodes
- Implement 7-day window coverage (shows from past week)
- Add pagination support (24 items per page)
- Include quality filtering (score >= 65 OR popularity >= 10000)
- Fix TypeError bug in database_update_show date handling
- Create new menu item for tracking recently aired anime episodes
- Implement 7-day window coverage (shows from past week)
- Add pagination support (24 items per page)
- Include quality filtering (score >= 65 OR popularity >= 10000)
- Fix TypeError bug in database_update_show date handling
- Replace AniList dependency with pure Jikan API implementation
- Use Jikan's native filtering: status=airing, min_score=6.5
- Sort by popularity (most popular airing shows)
…monthly calendars

- Add monthly calendar JSON fetch methods to Simkl class (fetch_month_json, get_calendar_range)
- Update MalBrowser.get_recently_aired() to use monthly archives for month boundary support
- Add deduplication logic for raw entries across monthly calendar files
- Maintain existing MAL artwork pipeline and pagination
- Fix logging calls to use correct 'debug' level syntax
- Minor code cleanup and formatting improvements

Fixes issue where recently_aired missed episodes when 7-day window crossed month boundaries.
Unified and renamed 'recently_aired_shows' to 'recently_aired' across codebase, including routes, menu items, and settings for all media types. Updated browser methods and removed legacy handler to streamline access and improve consistency for 'Recently Aired' content.
@Alqatrony
Alqatrony force-pushed the feature/recently-aired-shows branch from 8581583 to 3eb3af5 Compare October 31, 2025 23:56
Alqatrony and others added 2 commits November 1, 2025 01:51
Updated type annotations to be compatible with Python 3.8.15, improved API token loading to handle multiple database response formats, and added more detailed logging for token loading errors. Also replaced type hints with standard Python syntax for broader compatibility.
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.

2 participants