Skip to content

Commit

Permalink
[AutoResolution] add 720p25 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima73 authored and WanWizard committed Jul 20, 2024
1 parent e9220ef commit 9ad3f01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions autoresolution/po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ msgstr "Включить режим 2160p30"
msgid "Enable 720p24 Mode"
msgstr "Включить режим 720p24"

msgid "Enable 720p25 Mode"
msgstr "Включить режим 720p25"

msgid "Enable 720p50 Mode"
msgstr "Включить режим 720p50"

Expand Down
11 changes: 7 additions & 4 deletions autoresolution/src/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def readAvailableModes():
('hd_i', _("HD Interlace Mode")),
('hd_p', _("HD Progressive Mode")),
('p720_24', _("Enable 720p24 Mode")),
('p720_25', _("Enable 720p25 Mode")),
('p720_50', _("Enable 720p50 Mode")),
('p1080_24', _("Enable 1080p24 Mode")),
('p1080_25', _("Enable 1080p25 Mode")),
Expand Down Expand Up @@ -299,6 +300,8 @@ def defaultModeChanged(self, configEntry):
choices = ['1080p24', '1080p25', '1080p30'] + preferedmodes
elif mode[0] == 'p720_24':
choices = ['720p24', '1080p24', '2160p24'] + preferedmodes
elif mode[0] == 'p720_25':
choices = ['720p25', '1080p25', '2160p25'] + preferedmodes
elif mode[0] == 'p720_50':
choices = ['720p50', '1080p25', '2160p25'] + preferedmodes
else:
Expand All @@ -308,6 +311,8 @@ def defaultModeChanged(self, configEntry):
choices = ['1080p24', '1080p25', '1080p30'] + preferedmodes
elif mode[0] == 'p720_24':
choices = ['720p24', '1080p24'] + preferedmodes
elif mode[0] == 'p720_25':
choices = ['720p25', '1080p25'] + preferedmodes
elif mode[0] == 'p720_50':
choices = ['720p50', '1080p25'] + preferedmodes
else:
Expand Down Expand Up @@ -426,12 +431,10 @@ def determineContent(self):
new_mode = 'uhd_i' # 2160i content
elif (height >= 900 or width >= 1600) and frate in ('24', '25', '30') and (prog == 'p' or (orig_prog != "p" and frate == '25' and config.plugins.autoresolution.replace_1080i25_1080p25.value)): # 1080p content
new_mode = 'p1080_%s' % frate
elif (576 < height < 900 or 720 < width < 1600) and frate == '24' and prog == 'p': # 720p24 content
new_mode = 'p720_24'
elif (576 < height < 900 or 720 < width < 1600) and frate in ('24', '25', '50') and prog == 'p': # 720p24/25/50 content
new_mode = 'p720_%s' % frate
elif frate in ('24'): # always 1080p24 content
new_mode = 'p1080_24'
elif (576 < height < 900 or 720 < width < 1600) and frate == '50' and prog == 'p': # 720p50 content
new_mode = 'p720_50'
elif (height <= 576) and (width <= 720) and frate in ('25', '50'):
new_mode = 'sd_%s_50' % prog
elif (height <= 480) and (width <= 720) and frate in ('24', '30', '60'):
Expand Down

0 comments on commit 9ad3f01

Please sign in to comment.