Merge pull request #125 from ErnieNishino/work

当影片没有人评分时,UI界面会显示 分 暂无评分人评,我感觉应该是显示 暂无人评分 即可,可以加个if判断
This commit is contained in:
Shengqiang Zhang 2023-12-25 22:25:23 +08:00 committed by GitHub
commit e5ef533966
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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'])