@@ -116,8 +116,8 @@ def collect_season(self) -> None:
116116 # Sort by number then title
117117 season_rows .sort (key = lambda r : (r ["raw_number" ], r ["title" ] or "" ))
118118
119- # Add to manager
120- for row in season_rows :
119+ # Add to manager with sequential indexing
120+ for idx , row in enumerate ( season_rows ) :
121121 self .seasons_manager .add_season ({
122122 'number' : row ["raw_number" ],
123123 'name' : row ["title" ],
@@ -127,7 +127,7 @@ def collect_season(self) -> None:
127127
128128 def _fetch_episodes_for_season (self , season_index : int ) -> List [Dict ]:
129129 """Fetch and cache episodes for a season - SINGLE API CALL per season."""
130- season = self .seasons_manager .get_season_by_number ( season_index )
130+ season = self .seasons_manager .seasons [ season_index ]
131131 response = _fetch_api_episodes (season .id , self .client , self .params )
132132
133133 # Get response json
@@ -236,7 +236,7 @@ def selectEpisode(self, season_index: int, episode_index: int) -> Optional[Dict]
236236 if not episode_id :
237237 return episode
238238
239- # Update URL to preferred language if available
239+ # Update URL to preferred language if available
240240 audio_locales , urls_by_locale , main_guid = self ._get_episode_audio_locales (episode_id )
241241
242242 # Store main_guid for complete subtitles access
0 commit comments