Skip to content

Commit ad06ecb

Browse files
committed
Player/Seekdialog: Show Video Preview Thumbnails when seeking on timeline with OSD open (was disabled before if chapters were found)
1 parent 63a3425 commit ad06ecb

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

lib/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757

5858
DEF_THEME = "modern-colored"
59-
THEME_VERSION = 30
59+
THEME_VERSION = 31
6060

6161
xbmc.log('script.plex: Kodi {0}.{1} (build {2})'.format(KODI_VERSION_MAJOR, KODI_VERSION_MINOR, KODI_BUILD_NUMBER),
6262
xbmc.LOGINFO)

lib/windows/seekdialog.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,8 @@ def setup(self, duration, meta, offset=0, bif_url=None, title='', title2='', cha
529529
self.timeFmtKodi = self.timeFmtKodi.replace("hh:", "")
530530
self._ignoreTick = False
531531
self._ignoreInput = False
532-
if not self.showChapters:
533-
self.bifURL = bif_url
534-
self.hasBif = bool(self.bifURL)
532+
self.bifURL = bif_url
533+
self.hasBif = bool(self.bifURL)
535534

536535
if self.hasBif:
537536
self.baseURL = re.sub(r'/\d+\?', '/{0}?', self.bifURL)
@@ -636,11 +635,13 @@ def onAction(self, action):
636635
# we're seeking from the timeline with the OSD open - do an actual timeline seek
637636

638637
if action in (xbmcgui.ACTION_MOVE_RIGHT, xbmcgui.ACTION_STEP_FORWARD):
638+
self.setProperty('show.chapters', '')
639639
if self.useDynamicStepsForTimeline:
640640
return self.skipForward()
641641
return self.seekByOffset(10000, auto_seek=self.useAutoSeek)
642642

643643
elif action in (xbmcgui.ACTION_MOVE_LEFT, xbmcgui.ACTION_STEP_BACK):
644+
self.setProperty('show.chapters', '')
644645
if self.useDynamicStepsForTimeline:
645646
return self.skipBack()
646647
return self.seekByOffset(-10000, auto_seek=self.useAutoSeek)
@@ -1822,7 +1823,12 @@ def updateProgress(self, set_to_current=True, offset=None, onlyTimeIndicator=Fal
18221823
return
18231824

18241825
if self.hasBif:
1825-
self.setProperty('bif.image', self.handler.player.playerObject.getBifUrl(offset))
1826+
bifUrl = self.handler.player.playerObject.getBifUrl(offset)
1827+
if "blur_chapters" in self.no_spoilers:
1828+
bifUrl = self.player.video.server.getImageTranscodeURL(bifUrl,
1829+
*PlaylistDialog.LI_AR16X9_THUMB_DIM,
1830+
**{"blur": util.addonSettings.episodeNoSpoilerBlur})
1831+
self.setProperty('bif.image', bifUrl)
18261832
self.bifImageControl.setPosition(bifx, 752)
18271833

18281834
self.seekbarControl.setPosition(0, self.seekbarControl.getPosition()[1])

resources/skins/Main/1080i/templates/script-plex-seek_dialog.xml.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@
432432
<visible>!String.IsEmpty(Window.Property(show.OSD)) + !Window.IsVisible(osdvideosettings) + !Window.IsVisible(osdaudiosettings) + !Window.IsVisible(osdsubtitlesettings) + !Window.IsVisible(subtitlesearch) + !Window.IsActive(playerprocessinfo) + !Window.IsActive(selectdialog) + !Window.IsVisible(osdcmssettings)</visible>
433433
<animation effect="fade" time="200" delay="200" end="0">Hidden</animation>
434434
<control type="group" id="300">
435-
<visible>!String.IsEmpty(Window.Property(has.bif)) + [Control.HasFocus(100) | Control.HasFocus(501) | !String.IsEmpty(Window.Property(button.seek))]</visible>
435+
<visible>!String.IsEmpty(Window.Property(has.bif)) + String.IsEmpty(Window.Property(show.chapters) + [Control.HasFocus(100) | Control.HasFocus(501) | !String.IsEmpty(Window.Property(button.seek))]</visible>
436436
<animation effect="fade" time="100" delay="100" end="100">Visible</animation>
437437
<posx>0</posx>
438438
<posy>752</posy>

0 commit comments

Comments
 (0)