74
74
# Show only 2 genres (or one if there is only one)
75
genres = self.movie.get_genres()
77
genre = genres[0] + "/" + genres[1]
75
genres_list = self.movie.get_genres()
76
if len(genres_list) == 0:
77
genres_text = _("Unknown")
79
genres_text = "/".join(genres_list[:2])
81
81
# Runtime and genres
82
82
info_text = _("%(runtime)s min, %(genre)s") % \
83
{'runtime': self.movie.get_runtime(), 'genre': genre}
83
{'runtime': self.movie.get_runtime(), 'genre': genres_text}
84
84
info = Label(0.032, "subtitle", 0.47, 0.24, info_text)
85
85
info.set_ellipsize(pango.ELLIPSIZE_END)
86
86
info.set_size(0.5124, 0.05208)
116
116
self.add(self.scroll_area)
119
act_title = Label(0.032, "title", 0.33, 0.8, _("Starring"))
119
self.add(Label(0.032, "title", 0.33, 0.8, _("Starring")))
122
actors_text = ", ".join(self.movie.get_actors()[:3])
121
actors_list = self.movie.get_actors()
122
if len(actors_list) == 0:
123
actors_text = _("Unknown")
125
actors_text = ", ".join(actors_list[:5])
123
126
actors = Label(0.032, "subtitle", 0.46, 0.8, actors_text)
124
127
actors.set_ellipsize(pango.ELLIPSIZE_END)
125
128
actors.set_size(0.5124, 0.05208)
129
dict_title = Label(0.032, "title", 0.33, 0.86, _("Directed by"))
132
self.add(Label(0.032, "title", 0.33, 0.86, _("Directed by")))
132
dlist = self.movie.get_directors()
134
director = dlist[0] + ", " + dlist[1]
134
directors_list = self.movie.get_directors()
135
if len(directors_list) == 0:
136
directors_text = _("Unknown")
137
directors = Label(0.032, "subtitle", 0.46, 0.86, director)
138
directors_text = ", ".join(directors_list[:2])
139
directors = Label(0.032, "subtitle", 0.46, 0.86, directors_text)
138
140
directors.set_ellipsize(pango.ELLIPSIZE_END)
139
141
directors.set_size(0.5124, 0.05208)
140
142
self.add(directors)
143
wri_title = Label(0.032, "title", 0.33, 0.92, _("Written by"))
145
self.add(Label(0.032, "title", 0.33, 0.92, _("Written by")))
146
wlist = self.movie.get_writers()
148
writer = wlist[0] + ", " + wlist[1]
147
writers_list = self.movie.get_writers()
148
if len(directors_list) == 0:
149
writers_text = _("Unknown")
151
writers = Label(0.032, "subtitle", 0.46, 0.92, writer)
151
writers_text = ", ".join(writers_list[:2])
152
writers = Label(0.032, "subtitle", 0.46, 0.92, writers_text)
152
153
writers.set_ellipsize(pango.ELLIPSIZE_END)
153
154
writers.set_size(0.5124, 0.05208)
154
155
self.add(writers)