From 8e6c2118225eed7a719fe8e9fd5d8e70c7c3ae16 Mon Sep 17 00:00:00 2001 From: Lovi-0 Date: Wed, 26 Jun 2024 23:16:23 +0200 Subject: [PATCH] Minor fix. --- Src/Api/ddlstreamitaly/series.py | 4 +++- Src/Api/guardaserie/series.py | 6 ++++++ Src/Api/streamingcommunity/site.py | 13 +++++++++---- config.json | 2 +- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Src/Api/ddlstreamitaly/series.py b/Src/Api/ddlstreamitaly/series.py index e778806..ddd86e2 100644 --- a/Src/Api/ddlstreamitaly/series.py +++ b/Src/Api/ddlstreamitaly/series.py @@ -73,7 +73,9 @@ def donwload_video(scape_info_serie: GetSerieInfo, index_episode_selected: int) def download_thread(dict_serie: MediaItem): - """Download all episode of a thread""" + """ + Download all episode of a thread + """ # Start message and set up video source start_message() diff --git a/Src/Api/guardaserie/series.py b/Src/Api/guardaserie/series.py index ed020b5..0224070 100644 --- a/Src/Api/guardaserie/series.py +++ b/Src/Api/guardaserie/series.py @@ -99,6 +99,12 @@ def donwload_episode(scape_info_serie: GetSerieInfo, index_season_selected: int, def download_series(dict_serie: MediaItem) -> None: + """ + Download all episodes of a TV series. + + Parameter: + - dict_serie (MediaItem): obj with url name type and score + """ # Start message and set up video source start_message() diff --git a/Src/Api/streamingcommunity/site.py b/Src/Api/streamingcommunity/site.py index 6cd1d87..4becd3c 100644 --- a/Src/Api/streamingcommunity/site.py +++ b/Src/Api/streamingcommunity/site.py @@ -4,8 +4,6 @@ import sys import json import logging -from typing import Tuple - # External libraries import httpx @@ -34,7 +32,7 @@ table_show_manager = TVShowManager() -def get_version(text: str) -> tuple[str, list]: +def get_version(text: str): """ Extracts the version from the HTML text of a webpage. @@ -75,7 +73,14 @@ def get_version(text: str) -> tuple[str, list]: raise -def get_version_and_domain() -> Tuple[str, str]: +def get_version_and_domain(): + """ + Retrieve the current version and domain of the site. + + This function performs the following steps: + 1. Determines the correct domain to use for the site by searching for a specific meta tag. + 2. Fetches the content of the site to extract the version information. + """ # Find new domain if prev dont work domain_to_use, base_url = search_domain(SITE_NAME, '', f"https://{SITE_NAME}") diff --git a/config.json b/config.json index 3f6c331..d0fdcfd 100644 --- a/config.json +++ b/config.json @@ -57,7 +57,7 @@ }, "SITE": { "streamingcommunity": { - "video_workers": 4, + "video_workers": 2, "audio_workers": 2, "domain": "boston" },