Skip to content

Commit

Permalink
Version 0.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Paco8 committed Jun 26, 2023
1 parent f59ae7d commit 88e25cb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 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.skyott"
name="Skyott"
version="0.4.3"
version="0.4.4"
provider-name="Paco8">
<requires>
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
Expand Down
3 changes: 2 additions & 1 deletion resources/lib/parsemanifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def extract_tracks(manifest):
t['filename'] = m.group(1)
t['start_number'] = m.group(2)
if t['contentType'] in ['text', 'audio']:
new_lang = t['lang'][:2]
#new_lang = t['lang'][:2]
new_lang = re.sub(r'-[A-Z]{2}', '', t['lang'])
if t['value'] == 'caption': new_lang += '-[CC]'
if t['value'] == 'forced-subtitle': new_lang += '-[Forced]'
t['new_lang'] = new_lang
Expand Down
4 changes: 3 additions & 1 deletion resources/lib/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ def play(params):

preferred_server = addon.getSetting('preferred_server')
enable_uhd = addon.getSettingBool('uhd')
dolbyvision = addon.getSettingBool('dolbyvision')
hdr10 = addon.getSettingBool('hdr10')
enable_hdcp = bool(addon.getSettingBool('hdcp_enabled'))
if slug:
data = sky.get_playback_info(info['content_id'], info['provider_variant_id'], preferred_server, uhd=enable_uhd, hdcpEnabled=enable_hdcp)
data = sky.get_playback_info(info['content_id'], info['provider_variant_id'], preferred_server, uhd=enable_uhd, hdcpEnabled=enable_hdcp, dolbyvision=dolbyvision, hdr10=hdr10)
else:
if params.get('content_id') and params.get('provider_variant_id'):
data = sky.get_playback_info(params['content_id'], params['provider_variant_id'], preferred_server, hdcpEnabled=enable_hdcp)
Expand Down
11 changes: 9 additions & 2 deletions resources/lib/sky.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ def request_playback_tokens(self, url, post_data, content_type, preferred_server
res['license_token'] = data['protection']['licenceToken']
return res

def get_playback_info(self, content_id, provider_variant_id, preferred_server='', uhd=False, hdcpEnabled=False):
def get_playback_info(self, content_id, provider_variant_id, preferred_server='', uhd=False, hdcpEnabled=False, hdr10=False, dolbyvision=False):
url = self.endpoints['playouts']
post_data = {
"device": {
Expand Down Expand Up @@ -662,7 +662,14 @@ def get_playback_info(self, content_id, provider_variant_id, preferred_server=''
{"protection": "WIDEVINE", "container": "ISOBMFF", "transport": "DASH","acodec": "AAC", "vcodec": "H265"}
)
post_data['device']['maxVideoFormat'] = 'UHD'
post_data['device']['supportedColourSpaces'] = ["DolbyVision", "HDR10", "SDR"]

# Order is important
post_data['device']['supportedColourSpaces'] = []
if dolbyvision:
post_data['device']['supportedColourSpaces'].append('DolbyVision')
if hdr10:
post_data['device']['supportedColourSpaces'].append('HDR10')
post_data['device']['supportedColourSpaces'].append('SDR')

#print_json(post_data)
return self.request_playback_tokens(url, post_data, 'application/vnd.playvod.v1+json', preferred_server)
Expand Down
2 changes: 2 additions & 0 deletions resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<setting id="territory" type="text" label="30041" default=""/>
<setting id="preferred_server" type="labelenum" label="30032" values="Auto|Limelight|Cloudfront|Akamai|Level3|Fastly" default='Auto'/>
<setting id="uhd" type="bool" label="30033" default="false"/>
<setting id="dolbyvision" type="bool" label="DolbyVision" default="false" visible="eq(-1,true)" subsetting="true"/>
<setting id="hdr10" type="bool" label="HDR10" default="false" visible="eq(-2,true)" subsetting="true"/>
<setting id="hdcp_enabled" type="bool" label="30037" default="false"/>
<setting id="send_progress" type="bool" label="30025" default="false"/>
<setting id="progress_interval" type="number" label="30026" default="120" enable="eq(-1,true)" subsetting="true"/>
Expand Down

0 comments on commit 88e25cb

Please # to comment.