From 8d7d5c6fe7b8dcd65ebb22ff1adbd6f316a6c14d Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 9 Mar 2018 20:44:03 -0500 Subject: [PATCH] Revert all the 4K changes -- the Bolt doesn't actually accept it (via HMO). --- config.py | 32 +++++++------------------------- plugins/settings/settings.py | 7 ++----- plugins/settings/templates/settings.tmpl | 7 ------- plugins/video/transcode.py | 3 +-- 4 files changed, 10 insertions(+), 39 deletions(-) diff --git a/config.py b/config.py index 821d3da..87b7ef6 100644 --- a/config.py +++ b/config.py @@ -57,11 +57,11 @@ def reset(): for section in config.sections(): if section.startswith('_tivo_'): tsn = section[6:] - if tsn.upper() not in ['SD', 'HD', '4K']: + if tsn.upper() not in ['SD', 'HD']: tivos_found = True tivos[tsn] = Bdict(config.items(section)) - for section in ['Server', '_tivo_SD', '_tivo_HD', '_tivo_4K']: + for section in ['Server', '_tivo_SD', '_tivo_HD']: if not config.has_section(section): config.add_section(section) @@ -247,9 +247,6 @@ def getFFmpegPrams(tsn): def isHDtivo(tsn): # TSNs of High Definition TiVos return bool(tsn and tsn[0] >= '6' and tsn[:3] != '649') -def is4Ktivo(tsn): # TSNs of 4K TiVos - return bool(tsn[:3] in ('849', '8F9')) - def get_ts_flag(): return get_server('ts', 'auto').lower() @@ -282,16 +279,10 @@ def nearestTivoWidth(width): return nearest(width, getValidWidths()) def getTivoHeight(tsn): - if is4Ktivo(tsn): - return 2160 - else: - return [480, 1080][isHDtivo(tsn)] + return [480, 1080][isHDtivo(tsn)] def getTivoWidth(tsn): - if is4Ktivo(tsn): - return 3840 - else: - return [544, 1920][isHDtivo(tsn)] + return [544, 1920][isHDtivo(tsn)] def _trunc64(i): return max(int(strtod(i)) / 64000, 1) * 64 @@ -311,10 +302,7 @@ def getVideoBR(tsn=None): rate = get_tsn('video_br', tsn) if rate: return _k(rate) - if is4Ktivo(tsn): - return getMaxVideoBR(tsn) - else: - return ['4096K', '16384K'][isHDtivo(tsn)] + return ['4096K', '16384K'][isHDtivo(tsn)] def getMaxVideoBR(tsn=None): rate = get_tsn('max_video_br', tsn) @@ -326,10 +314,7 @@ def getBuffSize(tsn=None): size = get_tsn('bufsize', tsn) if size: return _k(size) - if is4Ktivo(tsn): - return '8192k' - else: - return ['1024k', '4096k'][isHDtivo(tsn)] + return ['1024k', '4096k'][isHDtivo(tsn)] def getMaxAudioBR(tsn=None): rate = get_tsn('max_audio_br', tsn) @@ -339,10 +324,7 @@ def getMaxAudioBR(tsn=None): return 448 def get_section(tsn): - if is4Ktivo(tsn): - return '_tivo_4K' - else: - return ['_tivo_SD', '_tivo_HD'][isHDtivo(tsn)] + return ['_tivo_SD', '_tivo_HD'][isHDtivo(tsn)] def get_tsn(name, tsn=None, raw=False): try: diff --git a/plugins/settings/settings.py b/plugins/settings/settings.py index 42244ba..a520609 100644 --- a/plugins/settings/settings.py +++ b/plugins/settings/settings.py @@ -82,8 +82,6 @@ class Settings(Plugin): t.quote = quote t.server_data = dict(config.config.items('Server', raw=True)) t.server_known = buildhelp.getknown('server') - t.fk_tivos_data = dict(config.config.items('_tivo_4K', raw=True)) - t.fk_tivos_known = buildhelp.getknown('fk_tivos') t.hd_tivos_data = dict(config.config.items('_tivo_HD', raw=True)) t.hd_tivos_known = buildhelp.getknown('hd_tivos') t.sd_tivos_data = dict(config.config.items('_tivo_SD', raw=True)) @@ -93,8 +91,7 @@ class Settings(Plugin): t.tivos_data = [(section, dict(config.config.items(section, raw=True))) for section in config.config.sections() if section.startswith('_tivo_') - and not section.startswith(('_tivo_SD', '_tivo_HD', - '_tivo_4K'))] + and not section.startswith(('_tivo_SD', '_tivo_HD'))] t.tivos_known = buildhelp.getknown('tivos') t.help_list = buildhelp.gethelp() t.has_shutdown = hasattr(handler.server, 'shutdown') @@ -124,7 +121,7 @@ class Settings(Plugin): def UpdateSettings(self, handler, query): config.reset() - for section in ['Server', '_tivo_SD', '_tivo_HD', '_tivo_4K']: + for section in ['Server', '_tivo_SD', '_tivo_HD']: self.each_section(query, section, section) sections = query['Section_Map'][0].split(']')[:-1] diff --git a/plugins/settings/templates/settings.tmpl b/plugins/settings/templates/settings.tmpl index 305628e..430c7e6 100644 --- a/plugins/settings/templates/settings.tmpl +++ b/plugins/settings/templates/settings.tmpl @@ -124,7 +124,6 @@ onchange="switchDiv(options[selectedIndex].value, 'set-'); return true;"> - #for $name, $data in $shares_data @@ -177,12 +176,6 @@ $add_setting('server', 'Server') -
- 4K TiVo Settings
- $rows('_tivo_4K', $fk_tivos_data, $fk_tivos_known) - $add_setting('fk_tivos', '_tivo_4K') -
-
HD TiVo Settings
$rows('_tivo_HD', $hd_tivos_data, $hd_tivos_known) diff --git a/plugins/video/transcode.py b/plugins/video/transcode.py index e61ec40..63586cb 100644 --- a/plugins/video/transcode.py +++ b/plugins/video/transcode.py @@ -529,9 +529,8 @@ def tivo_compatible_video(vInfo, tsn, mime=''): message = (True, '') while True: codec = vInfo.get('vCodec', '') - is4k = config.is4Ktivo(tsn) and codec == 'hevc' if mime == 'video/x-tivo-mpeg-ts': - if not (is4k or codec in ('h264', 'mpeg2video')): + if not (codec in ('h264', 'mpeg2video')): message = (False, 'vCodec %s not compatible' % codec) break -- 2.11.4.GIT