Skip to content

Commit

Permalink
release: v1.38.0
Browse files Browse the repository at this point in the history
  • Loading branch information
newt-sc committed Jan 19, 2022
1 parent c9674dd commit da5d671
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
16 changes: 14 additions & 2 deletions a4kStreaming/explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
)

Expand All @@ -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

Expand Down
31 changes: 20 additions & 11 deletions a4kStreaming/lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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'] != '':
Expand Down
5 changes: 4 additions & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.a4kstreaming"
name="a4kStreaming"
version="1.37.0"
version="1.38.0"
provider-name="Unknown">
<requires>
<import addon="script.module.requests"/>
Expand Down Expand Up @@ -32,6 +32,9 @@ Designed for low-end devices and Estuary skin.
<screenshot>screenshot-06.jpg</screenshot>
</assets>
<news>
[v1.38.0]:
* Dolby Vision stream detection and filtering (DV sources disabled by default)

[v1.37.0]:
* .m2ts resolve support for RD

Expand Down
5 changes: 4 additions & 1 deletion packages/addons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<addons>
<addon id="plugin.video.a4kstreaming"
name="a4kStreaming"
version="1.37.0"
version="1.38.0"
provider-name="Unknown">
<requires>
<import addon="script.module.requests"/>
Expand Down Expand Up @@ -35,6 +35,9 @@ Designed for low-end devices and Estuary skin.
<screenshot>screenshot-06.jpg</screenshot>
</assets>
<news>
[v1.38.0]:
* Dolby Vision stream detection and filtering (DV sources disabled by default)

[v1.37.0]:
* .m2ts resolve support for RD

Expand Down
2 changes: 1 addition & 1 deletion packages/addons.xml.crc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7e96aca401e0d44cf508b5240d0657822b176e1d
186da629a1fb84c085a78ab2c0d55c7b84039b1b
4 changes: 4 additions & 0 deletions resources/language/resource.language.en_gb/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<category label="33001">
<setting id="general.max_quality" label="33101" type="enum" default="3" lvalues='33120|33121|33122|33123'/>
<setting id="general.max_movie_size" label="33108" type="slider" default="200" option="int" range="5,200"/>
<setting id="general.dolby_vision_allowed" label="33109" type="bool" default="false"/>
<setting id="general.autoplay" label="33102" type="bool" default="false"/>
<setting id="general.mark_as_watched_rating" label="33103" type="slider" default="7" option="int" range="1,10"/>
<setting id="general.page_size" label="33104" type="slider" default="29" option="int" range="10,100"/>
Expand Down
1 change: 1 addition & 0 deletions tests/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit da5d671

Please sign in to comment.