This repository was archived by the owner on May 2, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,6 +78,9 @@ def media_actions(ctx: Context, state: State) -> State | InternalDirective:
7878 ctx , state
7979 ),
8080 f"{ '⭐ ' if icons else '' } Score Anime" : _score_anime (ctx , state ),
81+ f"{ '🌐 ' if icons else '' } Open AniList Page" : _open_anilist_page (
82+ ctx , state
83+ ),
8184 f"{ 'ℹ️ ' if icons else '' } View Info" : _view_info (ctx , state ),
8285 f"{ '📀 ' if icons else '' } Change Provider (Current: { ctx .config .general .provider .value .upper ()} )" : _change_provider (
8386 ctx , state
@@ -624,6 +627,26 @@ def action():
624627 return action
625628
626629
630+ def _open_anilist_page (ctx : Context , state : State ) -> MenuAction :
631+ def action ():
632+ media_item = state .media_api .media_item
633+
634+ if not media_item :
635+ return InternalDirective .RELOAD
636+
637+ from .....libs .media_api .types import MediaType
638+
639+ base_type = "anime" if media_item .type == MediaType .ANIME else "manga"
640+ url = f"https://anilist.co/{ base_type } /{ media_item .id } "
641+
642+ from webbrowser import open
643+
644+ open (url )
645+ return InternalDirective .RELOAD
646+
647+ return action
648+
649+
627650def _view_recommendations (ctx : Context , state : State ) -> MenuAction :
628651 def action ():
629652 feedback = ctx .feedback
You can’t perform that action at this time.
0 commit comments