Skip to content

Commit ca79768

Browse files
authored
[plugin.video.imdb.trailers] 2.1.21 (#4667)
1 parent ebca53b commit ca79768

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

plugin.video.imdb.trailers/addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="plugin.video.imdb.trailers" name="IMDb Trailers" version="2.1.20" provider-name="gujal">
2+
<addon id="plugin.video.imdb.trailers" name="IMDb Trailers" version="2.1.21" provider-name="gujal">
33
<requires>
44
<import addon="xbmc.python" version="3.0.0"/>
55
<import addon="script.module.beautifulsoup4" version="4.0.0"/>

plugin.video.imdb.trailers/changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
plugin.video.imdb.trailers:
22
---------------------------
3+
v2.1.21 (20250513)
4+
[fix] listing when character names not available
5+
[fix] add Trailer to tile to avoid scrobbling by trakt module
6+
37
v2.1.20 (20250209)
48
[fix] listing
59
[new] charcater names in meta

plugin.video.imdb.trailers/resources/lib/imdb_trailers.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -742,17 +742,16 @@ def fetch_video_url(self, video_id):
742742
def play(self):
743743
if DEBUG:
744744
self.log('play()')
745+
title = xbmc.getInfoLabel("ListItem.Title")
745746
if _kodiver < 18.9:
746-
title = xbmc.getInfoLabel("ListItem.Title")
747747
thumbnail = xbmc.getInfoImage("ListItem.Thumb")
748748
plot = xbmc.getInfoLabel("ListItem.Plot")
749749
else:
750750
vtag = xbmc.InfoTagVideo()
751-
title = vtag.getTitle()
752751
thumbnail = vtag.getPictureURL()
753752
plot = vtag.getPlot()
754753
# only need to add label, icon and thumbnail, setInfo() and addSortMethod() takes care of label2
755-
listitem = self.make_plistitem(title, plot)
754+
listitem = self.make_plistitem(title + ' (Trailer)', plot)
756755
listitem.setArt({'thumb': thumbnail})
757756
listitem.setPath(cache.get(self.fetch_video_url, cache_duration, self.parameters('videoid')))
758757
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, listitem=listitem)
@@ -781,7 +780,7 @@ def play_id(self):
781780
plot = plot.get('plotText').get('plainText')
782781
thumbnail = video.get('latestTrailer').get('thumbnail').get('url')
783782
poster = video.get('primaryImage').get('url')
784-
listitem = self.make_plistitem(title, plot, year)
783+
listitem = self.make_plistitem(title + ' (Trailer)', plot, year)
785784
listitem.setArt({'thumb': poster,
786785
'icon': poster,
787786
'poster': poster,
@@ -833,7 +832,7 @@ def make_listitem(self, labels, cast2):
833832
vtag.setWriters(labels.get('writer', []))
834833

835834
if cast2:
836-
cast2 = [xbmc.Actor(p['name'], p['role'], 0, p['thumbnail']) for p in cast2]
835+
cast2 = [xbmc.Actor(p.get('name'), p.get('role'), 0, p.get('thumbnail')) for p in cast2]
837836
vtag.setCast(cast2)
838837

839838
else:

0 commit comments

Comments
 (0)