Skip to content

Commit a6fe26e

Browse files
committed
Bump v3.3.2
1 parent 172a5d2 commit a6fe26e

File tree

7 files changed

+13
-30
lines changed

7 files changed

+13
-30
lines changed

StreamingCommunity/Api/Site/raiplay/site.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def determine_media_type(item):
4242

4343
scraper = GetSerieInfo(program_name)
4444
scraper.collect_info_title()
45-
return "tv" if scraper.getNumberSeason() > 0 else "film"
45+
return scraper.prog_tipology, scraper.prog_description, scraper.prog_year
4646

4747
except Exception as e:
4848
console.print(f"[red]Error determining media type: {e}[/red]")
@@ -91,18 +91,20 @@ def title_search(query: str) -> int:
9191
return 0
9292

9393
# Limit to only 15 results for performance
94-
data = response.json().get('agg').get('titoli').get('cards')
95-
data = data[:15] if len(data) > 15 else data
94+
data = response.json().get('agg').get('titoli').get('cards')[:15]
9695

9796
# Process each item and add to media manager
9897
for item in data:
98+
media_type, prog_description, prog_year = determine_media_type(item)
9999
media_search_manager.add_media({
100100
'id': item.get('id', ''),
101101
'name': item.get('titolo', ''),
102-
'type': determine_media_type(item),
102+
'type': media_type,
103103
'path_id': item.get('path_id', ''),
104104
'url': f"https://www.raiplay.it{item.get('url', '')}",
105105
'image': f"https://www.raiplay.it{item.get('immagine', '')}",
106+
'desc': prog_description,
107+
'year': prog_year
106108
})
107109

108110
return media_search_manager.get_length()

StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ def __init__(self, program_name: str):
2323
self.base_url = "https://www.raiplay.it"
2424
self.program_name = program_name
2525
self.series_name = program_name
26+
self.prog_tipology = None
27+
self.prog_description = None
28+
self.prog_year = None
2629
self.seasons_manager = SeasonManager()
2730

2831
def collect_info_title(self) -> None:
@@ -38,6 +41,9 @@ def collect_info_title(self) -> None:
3841

3942
response.raise_for_status()
4043
json_data = response.json()
44+
self.prog_tipology = "tv" if "tv" in json_data.get('track_info').get('typology') else "film"
45+
self.prog_description = json_data.get('program_info', '').get('vanity', '')
46+
self.prog_year = json_data.get('program_info', '').get('year', '')
4147

4248
# Look for seasons in the 'blocks' property
4349
for block in json_data.get('blocks', []):
@@ -59,8 +65,6 @@ def collect_info_title(self) -> None:
5965
for season_set in block.get('sets', []):
6066
self._add_season(season_set, block.get('id'))
6167

62-
except httpx.HTTPError as e:
63-
logging.error(f"Error collecting series info: {e}")
6468
except Exception as e:
6569
logging.error(f"Unexpected error collecting series info: {e}")
6670

StreamingCommunity/Api/Site/streamingcommunity/site.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ def title_search(query: str) -> int:
5959
version = json.loads(soup.find('div', {'id': "app"}).get("data-page"))['version']
6060

6161
except Exception as e:
62-
if "WinError" in str(e) or "Errno" in str(e):
63-
console.print("\n[bold yellow]Please make sure you have enabled and configured a valid proxy.[/bold yellow]")
64-
6562
console.print(f"[red]Site: {site_constant.SITE_NAME} version, request error: {e}")
6663
return 0
6764

StreamingCommunity/Api/Site/streamingwatch/site.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ def title_search(query: str) -> int:
8686
soup = BeautifulSoup(response.text, 'html.parser')
8787

8888
except Exception as e:
89-
if "WinError" in str(e) or "Errno" in str(e):
90-
console.print("\n[bold yellow]Please make sure you have enabled and configured a valid proxy.[/bold yellow]")
91-
9289
console.print(f"[red]Site: {site_constant.SITE_NAME}, request search error: {e}")
9390
return 0
9491

StreamingCommunity/Lib/Downloader/HLS/downloader.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def request(self, url: str, return_content: bool = False) -> Optional[httpx.Resp
6464
Returns:
6565
Response content/text or None if all retries fail
6666
"""
67-
# Use unified HTTP client (inherits timeout/verify/proxy from config)
6867
client = create_client(headers=self.headers)
6968

7069
for attempt in range(RETRY_LIMIT):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__title__ = 'StreamingCommunity'
2-
__version__ = '3.3.1'
2+
__version__ = '3.3.2'
33
__author__ = 'Arrowar'
44
__description__ = 'A command-line program to download film'
55
__copyright__ = 'Copyright 2025'

StreamingCommunity/Util/os.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -360,23 +360,7 @@ def install_library(self, lib_name: str):
360360
console.print(f"Failed to install {lib_name}: {e}", style="bold red")
361361
sys.exit(1)
362362

363-
def check_python_version(self):
364-
"""
365-
Check if the installed Python is the official CPython distribution.
366-
Exits with a message if not the official version.
367-
"""
368-
python_implementation = platform.python_implementation()
369-
python_version = platform.python_version()
370-
371-
if python_implementation != "CPython":
372-
console.print(f"[bold red]Warning: You are using a non-official Python distribution: {python_implementation}.[/bold red]")
373-
console.print("Please install the official Python from [bold blue]https://www.python.org[/bold blue] and try again.", style="bold yellow")
374-
sys.exit(0)
375-
376-
console.print(f"[cyan]Python version: [bold red]{python_version}[/bold red]")
377-
378363
def init(self):
379-
self.check_python_version()
380364

381365
# Initialize binary paths and check for existing binaries
382366
binary_dir = binary_paths.get_binary_directory()

0 commit comments

Comments
 (0)