Fix range season

This commit is contained in:
Ghost 2024-04-21 17:43:01 +02:00
parent 8fc33f5eac
commit 651f8a7e3c
2 changed files with 5 additions and 3 deletions

View File

@ -118,7 +118,7 @@ class VideoSource:
# Make a request to collect information about a specific season # Make a request to collect information about a specific season
response = requests.get(f'https://{self.base_name}.{self.domain}/titles/{self.media_id}-{self.series_name}/stagione-{number_season}', headers=self.headers) response = requests.get(f'https://{self.base_name}.{self.domain}/titles/{self.media_id}-{self.series_name}/stagione-{number_season}', headers=self.headers)
response.raise_for_status() # Raise exception for non-200 status codes response.raise_for_status()
if response.ok: if response.ok:

View File

@ -146,12 +146,14 @@ def donwload_episode(tv_name: str, index_season_selected: int, donwload_all: boo
donwload_all (bool): Donwload all seasons episodes donwload_all (bool): Donwload all seasons episodes
""" """
# Clean memory of all episodes # Clean memory of all episodes and get the number of the season (some dont follow rule of [1,2,3,4,5] but [1,2,3,145,5,6,7]).
video_source.obj_episode_manager.clear() video_source.obj_episode_manager.clear()
season_number = (video_source.obj_title_manager.titles[index_season_selected-1].number)
# Start message and collect information about episodes # Start message and collect information about episodes
start_message() start_message()
video_source.collect_title_season(index_season_selected)
video_source.collect_title_season(season_number)
episodes_count = video_source.obj_episode_manager.get_length() episodes_count = video_source.obj_episode_manager.get_length()
# Download all episodes wihtout ask # Download all episodes wihtout ask