1.0.4 release

- Update version number
- Added check for `skip-event` AKA chapters endpoint for 200 (OK) status code before attempting to get chapters, if not 200, return empty chapters
This commit is contained in:
TPD94 2025-10-06 16:49:41 -04:00
parent c4ceb2fe92
commit b553865ff5

View File

@ -25,7 +25,7 @@ class CR(Service):
""" """
Service code for Crunchyroll Service code for Crunchyroll
Author: TPD94 Author: TPD94
Version: 1.0.3 Version: 1.0.4
Authorization: Cookies for web endpoints, Credentials for TV endpoints, Cookies/Credentials for both. Cookies required. Authorization: Cookies for web endpoints, Credentials for TV endpoints, Cookies/Credentials for both. Cookies required.
Security: FHD@L3 Security: FHD@L3
Use Series ID/URL (for example - https://www.crunchyroll.com/series/GG5H5XQ7D/kaiju-no-8) or Series ID (for example - GG5H5XQ7D). Use Series ID/URL (for example - https://www.crunchyroll.com/series/GG5H5XQ7D/kaiju-no-8) or Series ID (for example - GG5H5XQ7D).
@ -36,7 +36,7 @@ class CR(Service):
help=""" help="""
Service code for Crunchyroll\n Service code for Crunchyroll\n
Author: TPD94\n Author: TPD94\n
Version: 1.0.3\n Version: 1.0.4\n
Authorization: Cookies for web endpoints, Credentials for TV endpoints, Cookies/Credentials for both. Cookies required.\n Authorization: Cookies for web endpoints, Credentials for TV endpoints, Cookies/Credentials for both. Cookies required.\n
Security: FHD@L3\n Security: FHD@L3\n
Use Series ID/URL (for example - https://www.crunchyroll.com/series/GG5H5XQ7D/kaiju-no-8) or Series ID (for example - GG5H5XQ7D). Use Series ID/URL (for example - https://www.crunchyroll.com/series/GG5H5XQ7D/kaiju-no-8) or Series ID (for example - GG5H5XQ7D).
@ -542,8 +542,10 @@ class CR(Service):
# Send GET request for the chapters # Send GET request for the chapters
chapter_response = self.session.get( chapter_response = self.session.get(
url=self.config['endpoints']['chapters'].format(episode=title.id), url=self.config['endpoints']['chapters'].format(episode=title.id),
).json() )
if chapter_response.status_code == 200:
chapter_response = chapter_response.json()
# Check for intro chapter # Check for intro chapter
if chapter_response.get('intro'): if chapter_response.get('intro'):
try: try: