当影片没有人评分时,UI界面会显示 分 暂无评分人评,我感觉应该是显示 暂无人评分 即可,可以加个if判断

This commit is contained in:
Ernie 2023-12-12 20:22:51 +08:00
parent b44a5a0d6d
commit 4304f345d9
1 changed files with 6 additions and 1 deletions

View File

@ -301,7 +301,12 @@ class uiObject:
else:
string_actors = movie['actors']
self.label_movie_actor.config(text=string_actors)
self.label_movie_rating.config(text=str(movie['rating'][0]) + '' + str(movie['vote_count']) + '人评价')
if str(movie['rating'][0]) == "":
self.label_movie_rating.config(
text="暂无人评分")
else:
self.label_movie_rating.config(
text=str(movie['rating'][0]) + '' + str(movie['vote_count']) + '人评价')
self.label_movie_time.config(text=movie['release_date'])
self.label_movie_type.config(text=movie['types'])