From da5d6714ed23f0762e01239d086be948e2f3c24b Mon Sep 17 00:00:00 2001 From: newt-sc <47229722+newt-sc@users.noreply.github.com> Date: Wed, 19 Jan 2022 16:26:38 +0200 Subject: [PATCH] release: v1.38.0 --- CHANGELOG.md | 3 ++ a4kStreaming/explorer.py | 16 ++++++++-- a4kStreaming/lib/utils.py | 31 ++++++++++++------- addon.xml | 5 ++- packages/addons.xml | 5 ++- packages/addons.xml.crc | 2 +- .../resource.language.en_gb/strings.po | 4 +++ resources/settings.xml | 1 + tests/test_suite.py | 1 + 9 files changed, 52 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ec9747..a908272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* [v1.38.0](https://github.com/newt-sc/a4kStreaming/releases/tag/plugin.video.a4kstreaming%2Fplugin.video.a4kstreaming-1.38.0): + * Dolby Vision stream detection and filtering (DV sources disabled by default) + * [v1.37.0](https://github.com/newt-sc/a4kStreaming/releases/tag/plugin.video.a4kstreaming%2Fplugin.video.a4kstreaming-1.37.0): * .m2ts resolve support for RD diff --git a/a4kStreaming/explorer.py b/a4kStreaming/explorer.py index befc9e5..035bb03 100644 --- a/a4kStreaming/explorer.py +++ b/a4kStreaming/explorer.py @@ -2289,12 +2289,19 @@ def sorter(): not results[x]['quality'] == 'SD', not results[x]['quality'] == 'CAM', -results[x]['size'], - not results[x]['hdr'] == 'HDR', + 'DV' not in results[x]['hdr'], + 'HDR10+' not in results[x]['hdr'], + 'HDR10' not in results[x]['hdr'], + 'HDR' not in results[x]['hdr'], + '12BIT' not in results[x]['hdr'], + '10BIT' not in results[x]['hdr'], + '8BIT' not in results[x]['hdr'], not results[x]['videocodec'] == 'H265', 'TRUEHD' not in results[x]['audiocodec'], - 'DTS' not in results[x]['audiocodec'], 'ATMOS' not in results[x]['audiocodec'], 'HD-MA' not in results[x]['audiocodec'], + 'DTS' not in results[x]['audiocodec'], + 'DD' not in results[x]['audiocodec'], results[x]['release_title'], ) @@ -2318,6 +2325,11 @@ def sorter(): else: core.kodi.notification('No results for specified movie size. Showing all results.') + if not core.kodi.get_bool_setting('general.dolby_vision_allowed'): + results_keys = [key for key in results_keys if results[key]['hdr'] != 'DV'] + else: + results_keys = [key for key in results_keys if not (results[key]['hdr'] == 'DV' and 'mkv' in results[key])] + result_style = '[LIGHT]%s[/LIGHT]' autoplay = core.kodi.get_bool_setting('general.autoplay') and not params.force_sourceselect diff --git a/a4kStreaming/lib/utils.py b/a4kStreaming/lib/utils.py index e3037d5..41a4c79 100644 --- a/a4kStreaming/lib/utils.py +++ b/a4kStreaming/lib/utils.py @@ -226,13 +226,22 @@ def cleanup_result(result, no_meta=False): result['videocodec'] = videocodec hdr = '' - if '12BIT' in title: hdr = 'HDR' if 'HDR' in title: hdr = 'HDR' - if '10BIT' in title: hdr = '10BIT' - if '8BIT' in title: hdr = '8BIT' + if 'HDR10' in title: hdr = 'HDR10' + if 'HDR10+' in title: hdr = 'HDR10+' + if 'DV' in title: hdr = 'DV' + if 'DOLBY VISION' in title: hdr = 'DV' if 'SDR' in title: hdr = 'SDR' - result['hdr'] = hdr + bits = '' + if '12BIT' in title: bits = ' 12BIT' + if '10BIT' in title: bits = ' 10BIT' + if '8BIT' in title: bits = ' 8BIT' + + result['hdr'] = hdr + bits + + if 'MKV' in title: + result['mkv'] = True rip = '' if 'WEBRIP' in title: rip = 'WEBRIP' @@ -247,6 +256,8 @@ def cleanup_result(result, no_meta=False): if 'BD-RIP' in title: rip = 'BLURAY' if 'BD.RIP' in title: rip = 'BLURAY' if 'BDRIP' in title: rip = 'BLURAY' + if 'HDTV' in title: rip = 'HDTV' + if 'UHD' in title: rip = 'UHD' result['rip'] = rip @@ -274,11 +285,12 @@ def cleanup_result(result, no_meta=False): result['audiocodec'] = audiocodec title = re.sub(r'\'|\’', '', title) + title = re.sub(r'COMPLETE|INTERNAL|AUHDTV|SUB', ' ', title) title = re.sub(r'HEVC|X265|X\.265|H265|H\.265|X264|X\.264|H264|H\.264|AVC|XVID|DIVX|WMV|MKV', ' ', title) - title = re.sub(r'12BIT|10BIT|HDR|8BIT|SDR', ' ', title) - title = re.sub(r'WEBRIP|WEB\-DL|WEB\.DL|WEBDL|WEB|DVD\-RIP|DVD\.RIP|DVDRIP|DVD|BLURAY|BD\-RIP|BD\.RIP|BDRIP', ' ', title) + title = re.sub(r'HDR10\+|HDR10|HDR|12BIT|10BIT|8BIT|SDR|DOLBY VISION', ' ', title) + title = re.sub(r'WEBRIP|WEB\-DL|WEB\.DL|WEBDL|WEB|DVD\-RIP|DVD\.RIP|DVDRIP|DVD|BLURAY|BD\-RIP|BD\.RIP|BDRIP|HDTV|UHD|FULLHD', ' ', title) title = re.sub(r'AAC|DTS|HDMA|HD\-MA|HD\.MA|ATMOS|TRUEHD|TRUE\-HD|TRUE\.HD|DD\+|DDP|DD|EAC3|AC3|MP3|WMA', ' ', title) - title = re.sub(r'COMPLETE', ' ', title) + title = re.sub(r'HD|SD|DV', ' ', title) title = re.sub(r'\:|\\|\/|\,|\||\!|\?|\(|\)|\"|\+|\[|\]|\_|\.|\{|\}', ' ', title) if result['ref'].season: @@ -348,11 +360,8 @@ def cleanup_result(result, no_meta=False): result['title'] += ' | %s' % get_color_string(result['quality'], 'white') if not no_meta: - if result['hdr'] == 'HDR': + if result['hdr'] != '': result['title'] += ' %s' % get_color_string(result['hdr'], 'white') - elif result['hdr'] != '': - result['title'] += ' %s' % result['hdr'] - if result['videocodec'] != '': result['title'] += ' | %s' % result['videocodec'] if result['audiocodec'] != '': diff --git a/addon.xml b/addon.xml index 690d436..263cb4f 100644 --- a/addon.xml +++ b/addon.xml @@ -1,7 +1,7 @@ @@ -32,6 +32,9 @@ Designed for low-end devices and Estuary skin. screenshot-06.jpg +[v1.38.0]: + * Dolby Vision stream detection and filtering (DV sources disabled by default) + [v1.37.0]: * .m2ts resolve support for RD diff --git a/packages/addons.xml b/packages/addons.xml index 3bf75b5..db4982c 100644 --- a/packages/addons.xml +++ b/packages/addons.xml @@ -4,7 +4,7 @@ @@ -35,6 +35,9 @@ Designed for low-end devices and Estuary skin. screenshot-06.jpg +[v1.38.0]: + * Dolby Vision stream detection and filtering (DV sources disabled by default) + [v1.37.0]: * .m2ts resolve support for RD diff --git a/packages/addons.xml.crc b/packages/addons.xml.crc index 4ae42ac..efd63d7 100644 --- a/packages/addons.xml.crc +++ b/packages/addons.xml.crc @@ -1 +1 @@ -7e96aca401e0d44cf508b5240d0657822b176e1d \ No newline at end of file +186da629a1fb84c085a78ab2c0d55c7b84039b1b \ No newline at end of file diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index 78c90df..f6d5742 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -64,6 +64,10 @@ msgctxt "#33108" msgid "Max movie size (GB)" msgstr "" +msgctxt "#33109" +msgid "Allow Dolby Vision sources" +msgstr "" + # Season Title Templates msgctxt "#33111" msgid "Season 1 (2020) - 10 Episodes" diff --git a/resources/settings.xml b/resources/settings.xml index 24f7857..309f407 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -4,6 +4,7 @@ + diff --git a/tests/test_suite.py b/tests/test_suite.py index 5f0fa3a..49b6770 100644 --- a/tests/test_suite.py +++ b/tests/test_suite.py @@ -56,6 +56,7 @@ def __invoke(a4kstreaming_api, action, params={}, settings={}, prerun=None, remo fn.settings = { 'general.timeout': '30', 'general.max_quality': '3', + 'general.dolby_vision_allowed': 'false', 'general.autoplay': 'false', 'general.mark_as_watched_rating': '7', 'general.page_size': '29',