Skip to content

Commit

Permalink
[autoresolution"] add option "Use 'seek' for stream/video content"
Browse files Browse the repository at this point in the history
-In some cases, using 'seek'  leads to sound problems

https://forums.openpli.org/topic/96082-no-sound-on-any-other-resolution-than-2160p-zgemma-h9s/
-Disabled by default
  • Loading branch information
Dima73 authored and littlesat committed Sep 17, 2023
1 parent 91e5003 commit 2ceca88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion autoresolution/po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,13 @@ msgid "default"
msgstr "дефолт"

msgid "no"
msgstr ""
msgstr "нет"

msgid "second"
msgstr "сек."

msgid "seconds"
msgstr "сек."

msgid "Use 'seek' for stream/video content"
msgstr "Использовать 'seek' для стрима/видео"
8 changes: 5 additions & 3 deletions autoresolution/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def readAvailableModes():
config.plugins.autoresolution.manual_resolution_ext_menu = ConfigYesNo(default=False)
config.plugins.autoresolution.manual_resolution_ask = ConfigYesNo(default=True)
config.plugins.autoresolution.force_progressive_mode = ConfigYesNo(default=False)
config.plugins.autoresolution.seek_video_stream_service = ConfigYesNo(default=False)


def setDeinterlacer(mode):
Expand Down Expand Up @@ -478,7 +479,7 @@ def changeVideomode(self):
v.write("%s\n" % mode)
v.close()
print("[AutoRes] switching to", mode)
if self.video_stream_service:
if self.video_stream_service and config.plugins.autoresolution.seek_video_stream_service.value:
self.doSeekRelative(2 * 9000)
except:
print("[AutoRes] failed switching to", mode)
Expand Down Expand Up @@ -518,7 +519,7 @@ def setMode(self, mode, set=True):
resolutionlabel.show()
try:
video_hw.setMode(port, mode, rate)
if self.video_stream_service:
if self.video_stream_service and config.plugins.autoresolution.seek_video_stream_service.value:
self.doSeekRelative(2 * 9000)
except:
print("[AutoRes] Videomode: failed switching to", mode)
Expand Down Expand Up @@ -620,7 +621,8 @@ def createSetup(self):
getConfigListEntry(_("Running in testmode"), config.plugins.autoresolution.testmode),
getConfigListEntry(_("Deinterlacer mode for interlaced content"), config.plugins.autoresolution.deinterlacer),
getConfigListEntry(_("Deinterlacer mode for progressive content"), config.plugins.autoresolution.deinterlacer_progressive),
getConfigListEntry(_("Force set progressive for stream/video content"), config.plugins.autoresolution.force_progressive_mode)
getConfigListEntry(_("Force set progressive for stream/video content"), config.plugins.autoresolution.force_progressive_mode),
getConfigListEntry(_("Use 'seek' for stream/video content"), config.plugins.autoresolution.seek_video_stream_service)
))
if SystemInfo["HasHdrType"]:
self.list.append(getConfigListEntry(_("Smart HDR type (set 'auto' HDMI HDR type)"), config.plugins.autoresolution.hdmihdrtype))
Expand Down

0 comments on commit 2ceca88

Please sign in to comment.