StreamingCommunity 2.9.9__tar.gz → 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of StreamingCommunity might be problematic. Click here for more details.

Files changed (98) hide show
  1. {streamingcommunity-2.9.9/StreamingCommunity.egg-info → streamingcommunity-3.0.0}/PKG-INFO +1 -1
  2. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/1337xx/__init__.py +1 -2
  3. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/1337xx/site.py +6 -1
  4. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/altadefinizione/__init__.py +1 -2
  5. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/altadefinizione/site.py +6 -1
  6. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/__init__.py +1 -2
  7. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/site.py +63 -35
  8. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/util/ScrapeSerie.py +28 -24
  9. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/__init__.py +1 -2
  10. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/site.py +6 -1
  11. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/cb01new/__init__.py +1 -2
  12. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/cb01new/site.py +7 -1
  13. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/ddlstreamitaly/__init__.py +1 -2
  14. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/ddlstreamitaly/site.py +6 -1
  15. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/guardaserie/__init__.py +1 -2
  16. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/guardaserie/site.py +7 -1
  17. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/__init__.py +1 -2
  18. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/film.py +1 -1
  19. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/series.py +1 -1
  20. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/site.py +9 -2
  21. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/raiplay/util/ScrapeSerie.py +1 -1
  22. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/streamingcommunity/__init__.py +1 -2
  23. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/streamingcommunity/site.py +7 -1
  24. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/Downloader/HLS/segments.py +7 -15
  25. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/Downloader/TOR/downloader.py +7 -14
  26. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/FFmpeg/capture.py +1 -5
  27. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/FFmpeg/util.py +48 -40
  28. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/M3U8/estimator.py +20 -33
  29. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Upload/version.py +1 -1
  30. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/ffmpeg_installer.py +26 -1
  31. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/os.py +13 -15
  32. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/global_search.py +1 -4
  33. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/run.py +1 -4
  34. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0/StreamingCommunity.egg-info}/PKG-INFO +1 -1
  35. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/setup.py +1 -1
  36. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/LICENSE +0 -0
  37. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/MANIFEST.in +0 -0
  38. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/README.md +0 -0
  39. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/Helper/Vixcloud/js_parser.py +0 -0
  40. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/Helper/Vixcloud/util.py +0 -0
  41. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/ddl.py +0 -0
  42. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/maxstream.py +0 -0
  43. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/mediapolisvod.py +0 -0
  44. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/supervideo.py +0 -0
  45. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/sweetpixel.py +0 -0
  46. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Player/vixcloud.py +0 -0
  47. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/1337xx/title.py +0 -0
  48. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/altadefinizione/film.py +0 -0
  49. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/altadefinizione/series.py +0 -0
  50. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/altadefinizione/util/ScrapeSerie.py +0 -0
  51. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/film.py +0 -0
  52. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeunity/serie.py +0 -0
  53. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/film.py +0 -0
  54. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/serie.py +0 -0
  55. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/animeworld/util/ScrapeSerie.py +0 -0
  56. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/cb01new/film.py +0 -0
  57. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/ddlstreamitaly/series.py +0 -0
  58. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/ddlstreamitaly/util/ScrapeSerie.py +0 -0
  59. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/guardaserie/series.py +0 -0
  60. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/guardaserie/util/ScrapeSerie.py +0 -0
  61. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/streamingcommunity/film.py +0 -0
  62. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/streamingcommunity/series.py +0 -0
  63. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Site/streamingcommunity/util/ScrapeSerie.py +0 -0
  64. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/Class/SearchType.py +0 -0
  65. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/Util/__init__.py +0 -0
  66. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/Util/manage_ep.py +0 -0
  67. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/__init__.py +0 -0
  68. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/config_loader.py +0 -0
  69. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Api/Template/site.py +0 -0
  70. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/Downloader/HLS/downloader.py +0 -0
  71. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/Downloader/MP4/downloader.py +0 -0
  72. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/Downloader/__init__.py +0 -0
  73. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/FFmpeg/__init__.py +0 -0
  74. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/FFmpeg/command.py +0 -0
  75. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/M3U8/__init__.py +0 -0
  76. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/M3U8/decryptor.py +0 -0
  77. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/M3U8/parser.py +0 -0
  78. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/M3U8/url_fixer.py +0 -0
  79. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/TMBD/__init__.py +0 -0
  80. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/TMBD/obj_tmbd.py +0 -0
  81. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Lib/TMBD/tmdb.py +0 -0
  82. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/TelegramHelp/__init__.py +0 -0
  83. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/TelegramHelp/telegram_bot.py +0 -0
  84. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Upload/update.py +0 -0
  85. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/color.py +0 -0
  86. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/config_json.py +0 -0
  87. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/headers.py +0 -0
  88. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/logger.py +0 -0
  89. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/message.py +0 -0
  90. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/Util/table.py +0 -0
  91. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity/__init__.py +0 -0
  92. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity.egg-info/SOURCES.txt +0 -0
  93. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity.egg-info/dependency_links.txt +0 -0
  94. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity.egg-info/entry_points.txt +0 -0
  95. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity.egg-info/requires.txt +0 -0
  96. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/StreamingCommunity.egg-info/top_level.txt +0 -0
  97. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/requirements.txt +0 -0
  98. {streamingcommunity-2.9.9 → streamingcommunity-3.0.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: StreamingCommunity
3
- Version: 2.9.9
3
+ Version: 3.0.0
4
4
  Home-page: https://github.com/Lovi-0/StreamingCommunity
5
5
  Author: Lovi-0
6
6
  Project-URL: Bug Reports, https://github.com/Lovi-0/StreamingCommunity/issues
@@ -22,8 +22,7 @@ from .title import download_title
22
22
  # Variable
23
23
  indice = 3
24
24
  _useFor = "film_serie"
25
- _deprecate = False
26
- _priority = 2
25
+ _priority = 0
27
26
  _engineDownload = "tor"
28
27
 
29
28
  console = Console()
@@ -43,7 +43,12 @@ def title_search(query: str) -> int:
43
43
  console.print(f"[cyan]Search url: [yellow]{search_url}")
44
44
 
45
45
  try:
46
- response = httpx.get(search_url, headers={'user-agent': get_userAgent()}, timeout=max_timeout, follow_redirects=True)
46
+ response = httpx.get(
47
+ search_url,
48
+ headers={'user-agent': get_userAgent()},
49
+ timeout=max_timeout,
50
+ follow_redirects=True
51
+ )
47
52
  response.raise_for_status()
48
53
 
49
54
  except Exception as e:
@@ -25,8 +25,7 @@ from .series import download_series
25
25
  # Variable
26
26
  indice = 2
27
27
  _useFor = "film_serie"
28
- _deprecate = False
29
- _priority = 1
28
+ _priority = 0
30
29
  _engineDownload = "hls"
31
30
 
32
31
  msg = Prompt()
@@ -46,7 +46,12 @@ def title_search(query: str) -> int:
46
46
  console.print(f"[cyan]Search url: [yellow]{search_url}")
47
47
 
48
48
  try:
49
- response = httpx.post(search_url, headers={'user-agent': get_userAgent()}, timeout=max_timeout, follow_redirects=True)
49
+ response = httpx.post(
50
+ search_url,
51
+ headers={'user-agent': get_userAgent()},
52
+ timeout=max_timeout,
53
+ follow_redirects=True
54
+ )
50
55
  response.raise_for_status()
51
56
 
52
57
  except Exception as e:
@@ -25,8 +25,7 @@ from .serie import download_series
25
25
  # Variable
26
26
  indice = 1
27
27
  _useFor = "anime"
28
- _deprecate = False
29
- _priority = 2
28
+ _priority = 0
30
29
  _engineDownload = "mp4"
31
30
 
32
31
  msg = Prompt()
@@ -51,10 +51,8 @@ def get_token() -> dict:
51
51
 
52
52
  for html_meta in soup.find_all("meta"):
53
53
  if html_meta.get('name') == "csrf-token":
54
-
55
54
  find_csrf_token = html_meta.get('content')
56
55
 
57
- logging.info(f"Extract: ('animeunity_session': {response.cookies['animeunity_session']}, 'csrf_token': {find_csrf_token})")
58
56
  return {
59
57
  'animeunity_session': response.cookies['animeunity_session'],
60
58
  'csrf_token': find_csrf_token
@@ -64,9 +62,6 @@ def get_token() -> dict:
64
62
  def get_real_title(record):
65
63
  """
66
64
  Get the real title from a record.
67
-
68
- This function takes a record, which is assumed to be a dictionary representing a row of JSON data.
69
- It looks for a title in the record, prioritizing English over Italian titles if available.
70
65
 
71
66
  Parameters:
72
67
  - record (dict): A dictionary representing a row of JSON data.
@@ -84,7 +79,7 @@ def get_real_title(record):
84
79
 
85
80
  def title_search(query: str) -> int:
86
81
  """
87
- Function to perform an anime search using a provided query.
82
+ Function to perform an anime search using both APIs and combine results.
88
83
 
89
84
  Parameters:
90
85
  - query (str): The query to search for.
@@ -97,43 +92,85 @@ def title_search(query: str) -> int:
97
92
 
98
93
  media_search_manager.clear()
99
94
  table_show_manager.clear()
95
+ seen_titles = set()
96
+ choices = [] if site_constant.TELEGRAM_BOT else None
100
97
 
101
98
  # Create parameter for request
102
99
  data = get_token()
103
- cookies = {'animeunity_session': data.get('animeunity_session')}
100
+ cookies = {
101
+ 'animeunity_session': data.get('animeunity_session')
102
+ }
104
103
  headers = {
105
104
  'user-agent': get_userAgent(),
106
105
  'x-csrf-token': data.get('csrf_token')
107
106
  }
108
- json_data = {'title': query}
109
107
 
110
- # Send a POST request to the API endpoint for live search
108
+ # First API call - livesearch
109
+ try:
110
+ response1 = httpx.post(
111
+ f'{site_constant.FULL_URL}/livesearch',
112
+ cookies=cookies,
113
+ headers=headers,
114
+ json={'title': query},
115
+ timeout=max_timeout
116
+ )
117
+
118
+ response1.raise_for_status()
119
+ process_results(response1.json()['records'], seen_titles, media_search_manager, choices)
120
+
121
+ except Exception as e:
122
+ console.print(f"Site: {site_constant.SITE_NAME}, livesearch error: {e}")
123
+
124
+ # Second API call - archivio
111
125
  try:
112
- response = httpx.post(
113
- f'{site_constant.FULL_URL}/livesearch',
114
- cookies=cookies,
115
- headers=headers,
126
+ json_data = {
127
+ 'title': query,
128
+ 'type': False,
129
+ 'year': False,
130
+ 'order': 'Lista A-Z',
131
+ 'status': False,
132
+ 'genres': False,
133
+ 'offset': 0,
134
+ 'dubbed': False,
135
+ 'season': False
136
+ }
137
+
138
+ response2 = httpx.post(
139
+ f'{site_constant.FULL_URL}/archivio/get-animes',
140
+ cookies=cookies,
141
+ headers=headers,
116
142
  json=json_data,
117
143
  timeout=max_timeout
118
144
  )
119
- response.raise_for_status()
145
+
146
+ response2.raise_for_status()
147
+ process_results(response2.json()['records'], seen_titles, media_search_manager, choices)
120
148
 
121
149
  except Exception as e:
122
- console.print(f"Site: {site_constant.SITE_NAME}, request search error: {e}")
123
- return 0
150
+ console.print(f"Site: {site_constant.SITE_NAME}, archivio search error: {e}")
124
151
 
125
- # Inizializza la lista delle scelte
126
- if site_constant.TELEGRAM_BOT:
127
- choices = []
152
+ if site_constant.TELEGRAM_BOT and choices and len(choices) > 0:
153
+ bot.send_message(f"Lista dei risultati:", choices)
154
+
155
+ result_count = media_search_manager.get_length()
156
+ if result_count == 0:
157
+ console.print(f"Nothing matching was found for: {query}")
158
+
159
+ return result_count
128
160
 
129
- for dict_title in response.json()['records']:
161
+ def process_results(records: list, seen_titles: set, media_manager: MediaManager, choices: list = None) -> None:
162
+ """Helper function to process search results and add unique entries."""
163
+ for dict_title in records:
130
164
  try:
131
-
132
- # Rename keys for consistency
165
+ title_id = dict_title.get('id')
166
+ if title_id in seen_titles:
167
+ continue
168
+
169
+ seen_titles.add(title_id)
133
170
  dict_title['name'] = get_real_title(dict_title)
134
171
 
135
- media_search_manager.add_media({
136
- 'id': dict_title.get('id'),
172
+ media_manager.add_media({
173
+ 'id': title_id,
137
174
  'slug': dict_title.get('slug'),
138
175
  'name': dict_title.get('name'),
139
176
  'type': dict_title.get('type'),
@@ -142,18 +179,9 @@ def title_search(query: str) -> int:
142
179
  'image': dict_title.get('imageurl')
143
180
  })
144
181
 
145
- if site_constant.TELEGRAM_BOT:
146
-
147
- # Crea una stringa formattata per ogni scelta con numero
182
+ if choices is not None:
148
183
  choice_text = f"{len(choices)} - {dict_title.get('name')} ({dict_title.get('type')}) - Episodi: {dict_title.get('episodes_count')}"
149
184
  choices.append(choice_text)
150
185
 
151
186
  except Exception as e:
152
- print(f"Error parsing a film entry: {e}")
153
-
154
- if site_constant.TELEGRAM_BOT:
155
- if choices:
156
- bot.send_message(f"Lista dei risultati:", choices)
157
-
158
- # Return the length of media search manager
159
- return media_search_manager.get_length()
187
+ print(f"Error parsing a title entry: {e}")
@@ -29,6 +29,7 @@ class ScrapeSerieAnime:
29
29
  self.is_series = False
30
30
  self.headers = {'user-agent': get_userAgent()}
31
31
  self.url = url
32
+ self.episodes_cache = None
32
33
 
33
34
  def setup(self, version: str = None, media_id: int = None, series_name: str = None):
34
35
  self.version = version
@@ -62,38 +63,41 @@ class ScrapeSerieAnime:
62
63
  logging.error(f"Error fetching episode count: {e}")
63
64
  return None
64
65
 
65
- def get_info_episode(self, index_ep: int) -> Episode:
66
+ def _fetch_all_episodes(self):
66
67
  """
67
- Fetch detailed information for a specific episode.
68
-
69
- Args:
70
- index_ep (int): Zero-based index of the target episode
71
-
72
- Returns:
73
- Episode: Detailed episode information
68
+ Fetch all episodes data at once and cache it
74
69
  """
75
70
  try:
76
-
77
- params = {
78
- "start_range": index_ep,
79
- "end_range": index_ep + 1
80
- }
71
+ count = self.get_count_episodes()
72
+ if not count:
73
+ return
81
74
 
82
75
  response = httpx.get(
83
- url=f"{self.url}/info_api/{self.media_id}/{index_ep}",
84
- headers=self.headers,
85
- params=params,
76
+ url=f"{self.url}/info_api/{self.media_id}/1",
77
+ params={
78
+ "start_range": 1,
79
+ "end_range": count
80
+ },
81
+ headers=self.headers,
86
82
  timeout=max_timeout
87
83
  )
88
84
  response.raise_for_status()
89
-
90
- # Return information about the episode
91
- json_data = response.json()["episodes"][-1]
92
- return Episode(json_data)
93
-
85
+
86
+ self.episodes_cache = response.json()["episodes"]
94
87
  except Exception as e:
95
- logging.error(f"Error fetching episode information: {e}")
96
- return None
88
+ logging.error(f"Error fetching all episodes: {e}")
89
+ self.episodes_cache = None
90
+
91
+ def get_info_episode(self, index_ep: int) -> Episode:
92
+ """
93
+ Get episode info from cache
94
+ """
95
+ if self.episodes_cache is None:
96
+ self._fetch_all_episodes()
97
+
98
+ if self.episodes_cache and 0 <= index_ep < len(self.episodes_cache):
99
+ return Episode(self.episodes_cache[index_ep])
100
+ return None
97
101
 
98
102
 
99
103
  # ------------- FOR GUI -------------
@@ -108,4 +112,4 @@ class ScrapeSerieAnime:
108
112
  """
109
113
  Get information for a specific episode.
110
114
  """
111
- return self.get_info_episode(episode_index)
115
+ return self.get_info_episode(episode_index)
@@ -20,8 +20,7 @@ from .film import download_film
20
20
  # Variable
21
21
  indice = 8
22
22
  _useFor = "anime"
23
- _deprecate = False
24
- _priority = 2
23
+ _priority = 0
25
24
  _engineDownload = "mp4"
26
25
 
27
26
  msg = Prompt()
@@ -70,7 +70,12 @@ def title_search(query: str) -> int:
70
70
 
71
71
  # Make the GET request
72
72
  try:
73
- response = httpx.get(search_url, headers={'User-Agent': get_userAgent()})
73
+ response = httpx.get(
74
+ search_url,
75
+ headers={'User-Agent': get_userAgent()},
76
+ timeout=max_timeout,
77
+ verify=False
78
+ )
74
79
 
75
80
  except Exception as e:
76
81
  console.print(f"Site: {site_constant.SITE_NAME}, request search error: {e}")
@@ -22,8 +22,7 @@ from .film import download_film
22
22
  # Variable
23
23
  indice = 4
24
24
  _useFor = "film"
25
- _deprecate = False
26
- _priority = 2
25
+ _priority = 0
27
26
  _engineDownload = "mp4"
28
27
 
29
28
  msg = Prompt()
@@ -44,7 +44,13 @@ def title_search(query: str) -> int:
44
44
  console.print(f"[cyan]Search url: [yellow]{search_url}")
45
45
 
46
46
  try:
47
- response = httpx.get(url=search_url, headers={'user-agent': get_userAgent()}, timeout=max_timeout, follow_redirects=True)
47
+ response = httpx.get(
48
+ search_url,
49
+ headers={'user-agent': get_userAgent()},
50
+ timeout=max_timeout,
51
+ follow_redirects=True,
52
+ verify=False
53
+ )
48
54
  response.raise_for_status()
49
55
 
50
56
  except Exception as e:
@@ -23,8 +23,7 @@ from .series import download_thread
23
23
  # Variable
24
24
  indice = 6
25
25
  _useFor = "serie"
26
- _deprecate = False
27
- _priority = 2
26
+ _priority = 0
28
27
  _engineDownload = "mp4"
29
28
 
30
29
  msg = Prompt()
@@ -44,7 +44,12 @@ def title_search(query: str) -> int:
44
44
  console.print(f"[cyan]Search url: [yellow]{search_url}")
45
45
 
46
46
  try:
47
- response = httpx.get(search_url, headers={'user-agent': get_userAgent()}, timeout=max_timeout, follow_redirects=True)
47
+ response = httpx.get(
48
+ search_url,
49
+ headers={'user-agent': get_userAgent()},
50
+ timeout=max_timeout,
51
+ follow_redirects=True
52
+ )
48
53
  response.raise_for_status()
49
54
 
50
55
  except Exception as e:
@@ -22,8 +22,7 @@ from .series import download_series
22
22
  # Variable
23
23
  indice = 5
24
24
  _useFor = "serie"
25
- _deprecate = False
26
- _priority = 2
25
+ _priority = 0
27
26
  _engineDownload = "hls"
28
27
 
29
28
  msg = Prompt()
@@ -44,7 +44,13 @@ def title_search(query: str) -> int:
44
44
  console.print(f"[cyan]Search url: [yellow]{search_url}")
45
45
 
46
46
  try:
47
- response = httpx.get(search_url, headers={'user-agent': get_userAgent()}, timeout=max_timeout, follow_redirects=True)
47
+ response = httpx.get(
48
+ search_url,
49
+ headers={'user-agent': get_userAgent()},
50
+ timeout=max_timeout,
51
+ follow_redirects=True,
52
+ verify=False
53
+ )
48
54
  response.raise_for_status()
49
55
 
50
56
  except Exception as e:
@@ -21,8 +21,7 @@ from .film import download_film
21
21
  # Variable
22
22
  indice = 8
23
23
  _useFor = "film_serie"
24
- _deprecate = False
25
- _priority = 3
24
+ _priority = 1 # NOTE: Site search need the use of tmbd obj
26
25
  _engineDownload = "hls"
27
26
 
28
27
  msg = Prompt()
@@ -1,4 +1,4 @@
1
- # 3.12.23
1
+ # 21.05.24
2
2
 
3
3
  import os
4
4
  from typing import Tuple
@@ -1,4 +1,4 @@
1
- # 3.12.23
1
+ # 21.05.24
2
2
 
3
3
  import os
4
4
  from typing import Tuple
@@ -1,8 +1,9 @@
1
- # 10.12.23
1
+ # 21.05.24
2
2
 
3
3
  import threading
4
4
  import queue
5
5
 
6
+
6
7
  # External libraries
7
8
  import httpx
8
9
  from rich.console import Console
@@ -123,7 +124,13 @@ def title_search(query: str) -> int:
123
124
  }
124
125
 
125
126
  try:
126
- response = httpx.post(search_url, headers={'user-agent': get_userAgent()}, json=json_data, timeout=max_timeout, follow_redirects=True)
127
+ response = httpx.post(
128
+ search_url,
129
+ headers={'user-agent': get_userAgent()},
130
+ json=json_data,
131
+ timeout=max_timeout,
132
+ follow_redirects=True
133
+ )
127
134
  response.raise_for_status()
128
135
 
129
136
  except Exception as e:
@@ -1,4 +1,4 @@
1
- # 01.03.24
1
+ # 21.05.24
2
2
 
3
3
  import logging
4
4
 
@@ -26,8 +26,7 @@ from .series import download_series
26
26
  # Variable
27
27
  indice = 0
28
28
  _useFor = "film_serie"
29
- _deprecate = False
30
- _priority = 1
29
+ _priority = 0
31
30
  _engineDownload = "hls"
32
31
 
33
32
  msg = Prompt()
@@ -45,7 +45,13 @@ def title_search(query: str) -> int:
45
45
  console.print(f"[cyan]Search url: [yellow]{search_url}")
46
46
 
47
47
  try:
48
- response = httpx.get(search_url, headers={'user-agent': get_userAgent()}, timeout=max_timeout, follow_redirects=True)
48
+ response = httpx.get(
49
+ search_url,
50
+ headers={'user-agent': get_userAgent()},
51
+ timeout=max_timeout,
52
+ follow_redirects=True,
53
+ verify=False
54
+ )
49
55
  response.raise_for_status()
50
56
 
51
57
  except Exception as e:
@@ -23,7 +23,7 @@ from rich.console import Console
23
23
  # Internal utilities
24
24
  from StreamingCommunity.Util.color import Colors
25
25
  from StreamingCommunity.Util.headers import get_userAgent
26
- from StreamingCommunity.Util.config_json import config_manager, get_use_large_bar
26
+ from StreamingCommunity.Util.config_json import config_manager
27
27
 
28
28
 
29
29
  # Logic class
@@ -407,20 +407,12 @@ class M3U8_Segments:
407
407
  """
408
408
  Generate platform-appropriate progress bar format.
409
409
  """
410
- if not get_use_large_bar():
411
- return (
412
- f"{Colors.YELLOW}Proc{Colors.WHITE}: "
413
- f"{Colors.RED}{{percentage:.2f}}% "
414
- f"{Colors.CYAN}{{remaining}}{{postfix}} {Colors.WHITE}]"
415
- )
416
-
417
- else:
418
- return (
419
- f"{Colors.YELLOW}[HLS] {Colors.WHITE}({Colors.CYAN}{description}{Colors.WHITE}): "
420
- f"{Colors.RED}{{percentage:.2f}}% "
421
- f"{Colors.MAGENTA}{{bar}} "
422
- f"{Colors.YELLOW}{{elapsed}}{Colors.WHITE} < {Colors.CYAN}{{remaining}}{Colors.WHITE}{{postfix}}{Colors.WHITE}"
423
- )
410
+ return (
411
+ f"{Colors.YELLOW}[HLS] {Colors.WHITE}({Colors.CYAN}{description}{Colors.WHITE}): "
412
+ f"{Colors.RED}{{percentage:.2f}}% "
413
+ f"{Colors.MAGENTA}{{bar}} "
414
+ f"{Colors.YELLOW}{{elapsed}}{Colors.WHITE} < {Colors.CYAN}{{remaining}}{Colors.WHITE}{{postfix}}{Colors.WHITE}"
415
+ )
424
416
 
425
417
  def _get_worker_count(self, stream_type: str) -> int:
426
418
  """
@@ -18,7 +18,7 @@ import qbittorrentapi
18
18
  # Internal utilities
19
19
  from StreamingCommunity.Util.color import Colors
20
20
  from StreamingCommunity.Util.os import internet_manager
21
- from StreamingCommunity.Util.config_json import config_manager, get_use_large_bar
21
+ from StreamingCommunity.Util.config_json import config_manager
22
22
 
23
23
 
24
24
  # Configuration
@@ -316,19 +316,12 @@ class TOR_downloader:
316
316
  # Ensure the torrent is started
317
317
  self.qb.torrents_resume(torrent_hashes=self.latest_torrent_hash)
318
318
 
319
- # Configure progress bar display format based on device
320
- if get_use_large_bar():
321
- bar_format = (
322
- f"{Colors.YELLOW}[TOR] {Colors.WHITE}({Colors.CYAN}video{Colors.WHITE}): "
323
- f"{Colors.RED}{{percentage:.2f}}% {Colors.MAGENTA}{{bar}} {Colors.WHITE}[ "
324
- f"{Colors.YELLOW}{{elapsed}} {Colors.WHITE}< {Colors.CYAN}{{remaining}}{{postfix}} {Colors.WHITE}]"
325
- )
326
- else:
327
- bar_format = (
328
- f"{Colors.YELLOW}Proc{Colors.WHITE}: "
329
- f"{Colors.RED}{{percentage:.2f}}% {Colors.WHITE}| "
330
- f"{Colors.CYAN}{{remaining}}{{postfix}} {Colors.WHITE}]"
331
- )
319
+ # Configure progress bar display format
320
+ bar_format = (
321
+ f"{Colors.YELLOW}[TOR] {Colors.WHITE}({Colors.CYAN}video{Colors.WHITE}): "
322
+ f"{Colors.RED}{{percentage:.2f}}% {Colors.MAGENTA}{{bar}} {Colors.WHITE}[ "
323
+ f"{Colors.YELLOW}{{elapsed}} {Colors.WHITE}< {Colors.CYAN}{{remaining}}{{postfix}} {Colors.WHITE}]"
324
+ )
332
325
 
333
326
  # Initialize progress bar
334
327
  with tqdm(
@@ -36,11 +36,7 @@ def capture_output(process: subprocess.Popen, description: str) -> None:
36
36
  if not line:
37
37
  continue
38
38
 
39
- logging.info(f"FFMPEG line: {line}")
40
-
41
- # Capture only error
42
- if "rror" in str(line):
43
- console.log(f"[red]FFMPEG: {str(line).strip()}")
39
+ logging.info(f"CAPTURE ffmpeg line: {line}")
44
40
 
45
41
  # Check if termination is requested
46
42
  if terminate_flag.is_set():