Skip to content

Commit d503729

Browse files
Ximer612github-actions[bot]
authored andcommitted
If no TMDB_API_KEY skip show trending part (Arrowar#439)
Before it crashes if no TMDB_API_KEY is found
1 parent 8fd1966 commit d503729

File tree

2 files changed

+31
-21
lines changed

2 files changed

+31
-21
lines changed

.github/.domain/domains.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"cb01new": {
3-
"domain": "cam",
4-
"full_url": "https://cb01net.cam/",
5-
"old_domain": "monster",
6-
"time_change": "2025-11-11 07:20:50"
3+
"domain": "blog",
4+
"full_url": "https://cb01net.blog/",
5+
"old_domain": "cfd",
6+
"time_change": "2025-11-24 16:27:47"
77
},
88
"animeunity": {
99
"domain": "so",
@@ -18,10 +18,10 @@
1818
"time_change": "2025-03-21 12:20:27"
1919
},
2020
"guardaserie": {
21-
"domain": "wiki",
22-
"full_url": "https://guardaserietv.wiki/",
23-
"old_domain": "xyz",
24-
"time_change": "2025-11-10 18:30:49"
21+
"domain": "cfd",
22+
"full_url": "https://guardaserietv.cfd/",
23+
"old_domain": "wtf",
24+
"time_change": "2025-11-25 07:23:46"
2525
},
2626
"streamingwatch": {
2727
"domain": "org",
@@ -30,21 +30,21 @@
3030
"time_change": "2025-04-29 12:30:30"
3131
},
3232
"altadefinizione": {
33-
"domain": "news",
34-
"full_url": "https://altadefinizionegratis.news/",
35-
"old_domain": "ist",
36-
"time_change": "2025-11-11 15:23:05"
33+
"domain": "lol",
34+
"full_url": "https://altadefinizionegratis.lol/",
35+
"old_domain": "shop",
36+
"time_change": "2025-11-25 07:23:47"
3737
},
3838
"streamingcommunity": {
39-
"domain": "bet",
40-
"full_url": "https://streamingcommunityz.bet/",
41-
"old_domain": "center",
42-
"time_change": "2025-11-13 17:20:18"
39+
"domain": "lat",
40+
"full_url": "https://streamingcommunityz.lat/",
41+
"old_domain": "lol",
42+
"time_change": "2025-11-24 16:28:00"
4343
},
4444
"altadefinizionegratis": {
45-
"domain": "news",
46-
"full_url": "https://altadefinizionegratis.news/",
47-
"old_domain": "ist",
48-
"time_change": "2025-11-11 15:23:08"
45+
"domain": "lol",
46+
"full_url": "https://altadefinizionegratis.lol/",
47+
"old_domain": "shop",
48+
"time_change": "2025-11-25 07:23:49"
4949
}
5050
}

StreamingCommunity/Lib/TMBD/tmdb.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
api_key = os.environ.get("TMDB_API_KEY")
2525

2626
if not api_key and show_trending:
27-
raise ValueError("TMDB_API_KEY non trovata nel file .env")
27+
show_trending = False
28+
print("TMDB_API_KEY non trovata nel file .env")
29+
#raise ValueError("TMDB_API_KEY non trovata nel file .env")
2830

2931

3032
def get_select_title(table_show_manager, generic_obj):
@@ -155,6 +157,10 @@ def display_trending_tv_shows(self):
155157
Fetch and display the top 5 trending TV shows of the week.
156158
Uses cached data if available, otherwise makes a new request.
157159
"""
160+
161+
if not show_trending:
162+
return
163+
158164
if self._cached_trending_tv is None:
159165
self._cached_trending_tv = self._make_request("trending/tv/week").get("results", [])
160166

@@ -172,6 +178,10 @@ def display_trending_films(self):
172178
Fetch and display the top 5 trending films of the week.
173179
Uses cached data if available, otherwise makes a new request.
174180
"""
181+
182+
if not show_trending:
183+
return
184+
175185
if self._cached_trending_movies is None:
176186
self._cached_trending_movies = self._make_request("trending/movie/week").get("results", [])
177187

0 commit comments

Comments
 (0)