Skip to content

Commit

Permalink
Version 0.5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Paco8 committed Jul 2, 2024
1 parent f138e27 commit 31fe6a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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.5.8"
version="0.5.9"
provider-name="Paco8">
<requires>
<!--- <import addon="xbmc.python" version="2.25.0"/> -->
Expand Down
13 changes: 11 additions & 2 deletions resources/lib/ads.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@

import json
import requests
from urllib.parse import urlparse, urlunparse, parse_qs, urlencode
try:
# Python 3
from urllib.parse import urlparse, urlunparse, parse_qs, urlencode
except ImportError:
# Python 2
from urlparse import urlparse, urlunparse, parse_qs
from urllib import urlencode

def get_fw_data(profile_id, playback_info, account, territory, headers, platform):
freewheel = playback_info['response']['thirdParties']['FREEWHEEL']
Expand Down Expand Up @@ -91,6 +97,9 @@ def get_ad_url(video_url, fw_data, headers, platform):
url = parsed_url.scheme + '://mt.ssai.peacocktv.com' + parsed_url.path
#print(url)

ads_params = fw_data['globalParameters'].copy()
ads_params.update(fw_data['keyValues'])

post_data = {
"reportingMode":"client",
"availSuppression":{
Expand All @@ -100,7 +109,7 @@ def get_ad_url(video_url, fw_data, headers, platform):
"playerParams":{
"origin_domain": original_host
},
"adsParams": {**fw_data['globalParameters'], **fw_data['keyValues']}
"adsParams": ads_params
}
#print(json.dumps(post_data, indent=4))
#print(json.dumps(query_params, indent=4))
Expand Down

0 comments on commit 31fe6a8

Please sign in to comment.