File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 2424api_key = os .environ .get ("TMDB_API_KEY" )
2525
2626if 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
3032def 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
You can’t perform that action at this time.
0 commit comments