summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreracknaphobia <eracknaphobia@hotmail.com>2017-12-12 15:52:57 -0500
committerMartijn Kaijser <martijn@xbmc.org>2017-12-12 20:52:57 +0000
commit00398e86e99cff029890531548017c23cb1e0dc3 (patch)
treecb47d2508db22e660dcafd04a2d3039e04e994db
parent829765ddb449618af47ce6743ebb3c58ee52dac8 (diff)
[plugin.video.psvue] 2017.11.21 (#1547)
[plugin.video.psvue] 2017.11.21
-rw-r--r--plugin.video.psvue/addon.xml9
-rw-r--r--plugin.video.psvue/resources/language/resource.language.en_gb/strings.po2
-rw-r--r--plugin.video.psvue/resources/language/resource.language.he_il/strings.po181
-rw-r--r--plugin.video.psvue/resources/lib/ps_vue.py134
-rw-r--r--plugin.video.psvue/resources/lib/sony.py51
5 files changed, 308 insertions, 69 deletions
diff --git a/plugin.video.psvue/addon.xml b/plugin.video.psvue/addon.xml
index e467072..507335f 100644
--- a/plugin.video.psvue/addon.xml
+++ b/plugin.video.psvue/addon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.psvue" name="PS Vue" version="2017.10.10" provider-name="eracknaphobia">
+<addon id="plugin.video.psvue" name="PS Vue" version="2017.11.21" provider-name="eracknaphobia">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.requests" version="2.9.1"/>
@@ -13,7 +13,12 @@
<description lang="en_GB">PlayStation™Vue is a TV service that streams live TV, movies, and sports on a variety of your favorite devices without a cable or satellite subscription. With powerful features that allow you to save thousands of hours of your favorite shows without recording conflicts, and Premium channels that can be purchased individually or with a multi-channel plan, TV has never been the same. No annual contracts, no conflicts, no problems.</description>
<disclaimer lang="en_GB">Requires a valid subscription to PS Vue which is currently only available in the US</disclaimer>
<news>
-- Fix Login Errors
+- Thanks to snoopyjoe for the following updates / fixes!
+- Timeline section now available with episode availability detail
+- Fix add/remove show and channel ability
+- Watched live or on demand shows available in Recently Watched
+- VideoPlayer display info updated
+- LiveTV menu updated with live show info
</news>
<language>en</language>
<platform>all</platform>
diff --git a/plugin.video.psvue/resources/language/resource.language.en_gb/strings.po b/plugin.video.psvue/resources/language/resource.language.en_gb/strings.po
index a39fc08..e4cca51 100644
--- a/plugin.video.psvue/resources/language/resource.language.en_gb/strings.po
+++ b/plugin.video.psvue/resources/language/resource.language.en_gb/strings.po
@@ -138,7 +138,7 @@ msgid "Always Ask Profile"
msgstr ""
msgctxt "#30214"
-msgid "Timeline"
+msgid "Choose Date"
msgstr ""
msgctxt "#30215"
diff --git a/plugin.video.psvue/resources/language/resource.language.he_il/strings.po b/plugin.video.psvue/resources/language/resource.language.he_il/strings.po
new file mode 100644
index 0000000..87624d5
--- /dev/null
+++ b/plugin.video.psvue/resources/language/resource.language.he_il/strings.po
@@ -0,0 +1,181 @@
+# Kodi Media Center language file
+# Addon Name: PS Vue
+# Addon id: plugin.video.psvue
+# Addon Provider: eracknaphobia
+msgid ""
+msgstr ""
+"Project-Id-Version: Kodi Addons\n"
+"Report-Msgid-Bugs-To: alanwww1@xbmc.org\n"
+"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"PO-Revision-Date: 2017-11-02 09:03+0200\n"
+"Last-Translator: A. Dambledore\n"
+"Language-Team: Eng2Heb\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: he_IL\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+msgctxt "#30000"
+msgid "Account Info"
+msgstr "פרטי חשבון"
+
+msgctxt "#30001"
+msgid "Username"
+msgstr "שם משתמש"
+
+msgctxt "#30002"
+msgid "Password"
+msgstr "סיסמה"
+
+msgctxt "#30003"
+msgid "Logout"
+msgstr "ניתוק חשבון"
+
+msgctxt "#30004"
+msgid "Set Default Profile"
+msgstr "הגדר פרופיל ברירת מחדל"
+
+msgctxt "#30005"
+msgid "Reset Device ID"
+msgstr "איפוס מזהה התקן"
+
+msgctxt "#30006"
+msgid "Logout Succesful"
+msgstr "התנתקות בהצלחה"
+
+msgctxt "#30007"
+msgid "You have been successfully logged out."
+msgstr "אתה התנתקת בהצלחה."
+
+msgctxt "#30100"
+msgid "Timeline"
+msgstr "ציר זמן"
+
+msgctxt "#30101"
+msgid "My Shows"
+msgstr "הסדרות שלי"
+
+msgctxt "#30102"
+msgid "Favorite Channels"
+msgstr "ערוצים מועדפים"
+
+msgctxt "#30103"
+msgid "Live TV"
+msgstr "‎טלוויזיה"
+
+msgctxt "#30104"
+msgid "Sports"
+msgstr "ספורט"
+
+msgctxt "#30105"
+msgid "Kids"
+msgstr "ילדים"
+
+msgctxt "#30106"
+msgid "Recently Watched"
+msgstr "נצפה לאחרונה"
+
+msgctxt "#30107"
+msgid "Featured"
+msgstr "מוצגים"
+
+msgctxt "#30200"
+msgid "Login Failed"
+msgstr "הכניסה נכשלה"
+
+msgctxt "#30201"
+msgid "Something went wrong during login"
+msgstr "משהו השתבש בתהליך ההתחברות"
+
+msgctxt "#30202"
+msgid "Please enter your username"
+msgstr "נא להזין את שם המשתמש שלך"
+
+msgctxt "#30203"
+msgid "Please enter your password"
+msgstr "אנא הזן את הסיסמה שלך"
+
+msgctxt "#30204"
+msgid "Please enter your verification code"
+msgstr "אנא הזן את קוד האימות שלך"
+
+msgctxt "#30205"
+msgid "Profile Not Found"
+msgstr "הפרופיל לא נמצא"
+
+msgctxt "#30206"
+msgid "Your profile list could not be retrieved"
+msgstr "לא היתה אפשרות לאחזר את רשימת הפרופיל שלך"
+
+msgctxt "#30207"
+msgid "Authorization Failed"
+msgstr "האימות נכשל"
+
+msgctxt "#30208"
+msgid "Could not retrieve grant code"
+msgstr "לא הייתה אפשרות לאחזר את קוד grant"
+
+msgctxt "#30209"
+msgid "Could not retrieve the reqpayload"
+msgstr "לא היתה אפשרות לאחזר את reqpayload"
+
+msgctxt "#30210"
+msgid "Choose Profile"
+msgstr "בחר פרופיל"
+
+msgctxt "#30211"
+msgid "Search"
+msgstr "חיפוש"
+
+msgctxt "#30212"
+msgid "Profile"
+msgstr "משתמש"
+
+msgctxt "#30213"
+msgid "Always Ask Profile"
+msgstr "תמיד בקש פרופיל"
+
+msgctxt "#30214"
+msgid "Timeline"
+msgstr "ציר זמן"
+
+msgctxt "#30215"
+msgid "My Shows"
+msgstr "הסדרות שלי"
+
+msgctxt "#30216"
+msgid "Favorite Channels"
+msgstr "ערוצים מועדפים"
+
+msgctxt "#30217"
+msgid "Live TV"
+msgstr "טלוויזיה"
+
+msgctxt "#30218"
+msgid "Sports"
+msgstr "ספורט"
+
+msgctxt "#30219"
+msgid "Kids"
+msgstr "ילדים"
+
+msgctxt "#30220"
+msgid "Recently Watched"
+msgstr "נצפה לאחרונה"
+
+msgctxt "#30221"
+msgid "Featured"
+msgstr "מוצגים"
+
+msgctxt "#30222"
+msgid "Search"
+msgstr "חיפוש"
+
+msgctxt "#30223"
+msgid "Main Menu"
+msgstr "תפריט ראשי"
+
+msgctxt "#30224"
+msgid "All Channels"
+msgstr "כל הערוצים"
diff --git a/plugin.video.psvue/resources/lib/ps_vue.py b/plugin.video.psvue/resources/lib/ps_vue.py
index 280406b..d384473 100644
--- a/plugin.video.psvue/resources/lib/ps_vue.py
+++ b/plugin.video.psvue/resources/lib/ps_vue.py
@@ -21,7 +21,6 @@ def main_menu():
if ADDON.getSetting(id='featured_visible') == 'true': addDir(LOCAL_STRING(30107), 700, ICON)
if ADDON.getSetting(id='search_visible') == 'true': addDir(LOCAL_STRING(30211), 750, ICON)
-
def all_channels():
json_source = get_json(EPG_URL + '/browse/items/channels/filter/all/sort/channeltype/offset/0/size/500')
list_channels(json_source['body']['items'])
@@ -43,7 +42,7 @@ def favorite_channels():
def live_tv():
json_source = get_json(EPG_URL + '/browse/items/now_playing/filter/all/sort/channel/offset/0/size/500')
- list_channels(json_source['body']['items'])
+ list_shows(json_source['body']['items'])
def on_demand(channel_id):
json_source = get_json(EPG_URL + '/details/channel/'+channel_id+'/popular/offset/0/size/500')
@@ -79,27 +78,36 @@ def search():
def list_timeline():
- url = 'https://sentv-user-ext.totsuko.tv/sentv_user_ext/ws/v2/profile/ids'
- json_source = get_json(url)
- try:
- airing_id = json_source['body']['launch_program']['airing_id']
- except:
+ url = 'https://sentv-user-ext.totsuko.tv/sentv_user_ext/ws/v2/profile/'
+
+ json_source = get_json(url + PROF_ID)
+
+ if 'body' in json_source and 'watch_history' in json_source['body']:
+ watch_history = json_source['body']['watch_history']
+ air_dict = {}
+ air_list = []
+ for airing in watch_history:
+ xbmc.log(str(airing['airing_id']) + ' ' + str(airing['last_watch_date']))
+ air_dict[str(airing['last_watch_date'])] = str(airing['airing_id'])
+ air_list.append(str(airing['last_watch_date']))
+
+ else:
+ dialog.notification('No airing ID found', msg, xbmcgui.NOTIFICATION_INFO, 9000)
sys.exit()
- json_source = get_json(EPG_URL + '/timeline/' + str(airing_id))
+ json_source = get_json(EPG_URL + '/timeline/' + air_dict[air_list[0]])
for strand in json_source['body']['strands']:
if strand['id'] == 'now_playing':
addDir('[B][I][COLOR=FFFFFF66]Now Playing[/COLOR][/B][/I]', 998, ICON)
for program in strand['programs']:
- #list_channel(program)
list_episode(program)
elif strand['id'] == 'watched_episodes':
addDir('[B][I][COLOR=FFFFFF66]Watched Episodes[/COLOR][/B][/I]', 998, ICON)
for program in reversed(strand['programs']):
list_episode(program)
elif strand['id'] == 'coming_up':
- addDir('[B][I][COLOR=FFFFFF66]Coming Up[/COLOR][/B][/I]', 998, ICON)
+ addDir('[B][I][COLOR=FFFFFF66]Coming Up On Channel:[/COLOR][/B][/I]'+' '+strand['programs'][0]['channel']['name_short'], 998, ICON)
for program in strand['programs']:
list_episode(program)
@@ -120,9 +128,9 @@ def list_show(show):
title = show['title']
airing_id = 'null'
- if 'airing_id' in show: airing_id = str(show['airing_id'])
+ if 'airing_id' in show: airing_id = str(show['airings']['airing_id'])
channel_id = 'null'
- if 'channel_id' in show: channel_id = str(show['channel_id'])
+ if 'channel_id' in show: channel_id = str(show['airings']['channel_id'])
program_id = str(show['id'])
series_id = 'null'
if 'series_id' in show: series_id = str(show['series_id'])
@@ -181,14 +189,16 @@ def list_episode(show):
show_title = show['title']
title = show['display_episode_title']
airing_id = str(show['airings'][0]['airing_id'])
+ channel_name = str(show['channel']['name'])
- #airing_id = 'null'
- #if 'airing_id' in show: airing_id = str(show['airings'][0]['airing_id'])
channel_id = 'null'
if 'channel_id' in show['channel']: channel_id = str(show['channel']['channel_id'])
+
program_id = str(show['id'])
+
series_id = 'null'
if 'series_id' in show: series_id = str(show['series_id'])
+
tms_id = str(show['tms_id'])
airing_date = show['airing_date']
@@ -214,8 +224,20 @@ def list_episode(show):
plot = get_dict_item('synopsis', show)
if str(show['playable']).upper() == 'FALSE':
- # Add airing date/time to title
- title = title + ' ' + airing_date.strftime('%m/%d/%y') + ' ' + airing_date.strftime('%I:%M %p').lstrip('0')
+ # Add airing date/time to title for upcoming shows
+ title = title + ' ' + '[B][I][COLOR=FFFFFF66]Available On[/COLOR][/I][/B]' + ' ' + airing_date.strftime('%m/%d/%y') + ' @' + airing_date.strftime('%I:%M %p').lstrip('0')
+
+ # Sort Live shows and episodes no longer available to watch
+ if str(show['airings'][0]['badge']) == 'live':
+ title = title + ' ' + '[B][I][COLOR=FFFFFF66]Live Episode[/COLOR][/I][/B]'
+ channel_name = channel_name + ' ' + '[B][I][COLOR=FFFFFF66]Live[/COLOR][/I][/B]'
+
+ elif str(show['airings'][0]['badge']) == 'no_longer_available':
+ title = title + ' ' + '[B][I][COLOR=FFde0000]Episode Not Available[/COLOR][/I][/B]'
+
+ else:
+ channel_name = show['title'] + ' ' + '[B][I][COLOR=FFFFFF66]On Demand[/COLOR][/I][/B]'
+ show_title = show['display_episode_title']
# Add resumetime if applicable
resumetime=''
@@ -233,7 +255,7 @@ def list_episode(show):
info = {
'plot': plot,
'tvshowtitle': show_title,
- 'title': title,
+ 'title': channel_name,
'originaltitle': title,
'mediatype': 'episode',
'genre': genre,
@@ -273,6 +295,24 @@ def list_channel(channel):
if image['width'] == 600 or image['width'] == 440: icon = image['src']
if image['width'] == 1920: fanart = image['src']
if icon != ICON and fanart != FANART: break
+
+ airing_id = ''
+ if 'id' in channel and 'airings' in channel['sub_item']:
+ AID = channel['sub_item']['airings']
+ air_dict = {}
+ air_list = []
+ for airing in AID:
+ xbmc.log(str(airing['airing_id']) + ' ' + str(airing['type']))
+ air_dict[str(airing['type'])] = str(airing['airing_id'])
+ air_list.append(str(airing['type']))
+ airing_id = air_dict[air_list[0]]
+
+ program_id = ''
+ if 'id' in channel['sub_item']: program_id = str(channel['sub_item']['id'])
+ series_id = ''
+ if 'series_id' in channel['sub_item']: series_id = str(channel['sub_item']['series_id'])
+ tms_id = str(channel['sub_item']['tms_id'])
+ tvshowtitle = str(channel['sub_item']['title'])
if 'channel' in channel:
title = channel['channel']['name']
@@ -281,15 +321,14 @@ def list_channel(channel):
title = channel['title']
channel_id = str(channel['id'])
-
genre = ''
for item in channel['genres']:
if genre != '': genre += ', '
genre += item['genre']
- plot = get_dict_item('synopsis', channel)
- season = get_dict_item('season_num', channel)
- episode = get_dict_item('episode_num', channel)
+ plot = get_dict_item('synopsis', channel['sub_item'])
+ season = get_dict_item('season_num', channel['sub_item'])
+ episode = get_dict_item('episode_num', channel['sub_item'])
channel_url = CHANNEL_URL + '/' + channel_id
@@ -297,8 +336,8 @@ def list_channel(channel):
'season':season,
'episode':episode,
'plot': plot,
- 'tvshowtitle': title,
- 'title': title,
+ 'tvshowtitle': tvshowtitle, #Does not display for some reason(normally would be blue dialog on VideoPlayer
+ 'title': title + ' ' + '[B][I][COLOR=FFFFFF66]Live[/COLOR][/I][/B]',
'originaltitle': title,
'genre': genre
}
@@ -308,7 +347,11 @@ def list_channel(channel):
}
show_info = {
- 'channel_id': channel_id
+ 'airing_id': airing_id,
+ 'channel_id': channel_id,
+ 'program_id': program_id,
+ 'series_id': series_id,
+ 'tms_id': tms_id
}
if 'channel_type' in channel:
@@ -328,16 +371,17 @@ def get_dict_item(key, dictionary):
def get_stream(url, airing_id, channel_id, program_id, series_id, tms_id):
- headers = {"Accept": "*/*",
- "Content-type": "application/x-www-form-urlencoded",
- "Origin": "https://vue.playstation.com",
- "Accept-Language": "en-US,en;q=0.8",
- "Referer": "https://vue.playstation.com/watch/live",
- "Accept-Encoding": "deflate",
- "User-Agent": UA_ANDROID_TV,
- "Connection": "Keep-Alive",
- 'reqPayload': ADDON.getSetting(id='reqPayload'),
- "X-Requested-With": "com.snei.vue.atv"
+ headers = {'Accept': '*/*',
+ 'Content-type': 'application/x-www-form-urlencoded',
+ 'Origin': 'https://vue.playstation.com',
+ 'Accept-Language': 'en-US,en;q=0.8',
+ 'Referer': 'https://vue.playstation.com/watch/live',
+ 'Accept-Encoding': 'gzip, deflate, br',
+ 'User-Agent': UA_ANDROID_TV,
+ 'Connection': 'Keep-Alive',
+ 'Host': 'media-framework.totsuko.tv',
+ 'reqPayload': ADDON.getSetting(id='EPGreqPayload'),
+ 'X-Requested-With': 'com.snei.vue.android'
}
r = requests.get(url, headers=headers, cookies=load_cookies(), verify=VERIFY)
@@ -345,7 +389,7 @@ def get_stream(url, airing_id, channel_id, program_id, series_id, tms_id):
stream_url = json_source['body']['video']
headers = '|User-Agent='
headers += 'Adobe Primetime/1.4 Dalvik/2.1.0 (Linux; U; Android 6.0.1 Build/MOB31H)'
- headers += '&Cookie=reqPayload=' + urllib.quote('"' + ADDON.getSetting(id='reqPayload') + '"')
+ headers += '&Cookie=reqPayload=' + urllib.quote('"' + ADDON.getSetting(id='EPGreqPayload') + '"')
listitem = xbmcgui.ListItem()
listitem.setMimeType("application/x-mpegURL")
@@ -354,19 +398,17 @@ def get_stream(url, airing_id, channel_id, program_id, series_id, tms_id):
listitem.setProperty('inputstream.adaptive.manifest_type', 'hls')
listitem.setProperty('inputstream.adaptive.stream_headers', headers)
listitem.setProperty('inputstream.adaptive.license_key', headers)
+
else:
stream_url += headers
-
listitem.setPath(stream_url)
-
xbmcplugin.setResolvedUrl(addon_handle, True, listitem)
-
# Seek to time
#Give the stream sometime to start before checking
- '''
+
monitor = xbmc.Monitor()
monitor.waitForAbort(10)
xbmc.log("Is playing video? " + str(xbmc.Player().isPlayingVideo()))
@@ -377,17 +419,16 @@ def get_stream(url, airing_id, channel_id, program_id, series_id, tms_id):
xbmc.log("We're done, write info back to ps servers!!!")
sony = SONY()
sony.put_resume_time(airing_id, channel_id, program_id, series_id, tms_id)
- '''
-
def get_json(url):
headers = {'Accept': '*/*',
- 'reqPayload': ADDON.getSetting(id='reqPayload'),
+ 'reqPayload': ADDON.getSetting(id='EPGreqPayload'),
'User-Agent': UA_ANDROID_TV,
- 'Accept-Encoding': 'gzip, deflate',
- 'Accept-Language': 'en-US',
- 'X-Requested-With': 'com.snei.vue.android'
+ 'Accept-Encoding': 'gzip, deflate, br',
+ 'Accept-Language': 'en-US,en;q=0.5',
+ 'X-Requested-With': 'com.snei.vue.android',
+ 'Connection': 'keep-alive'
}
r = requests.get(url, headers=headers, cookies=load_cookies(), verify=VERIFY)
@@ -400,7 +441,7 @@ def get_json(url):
msg = json_source['header']['error']['message']
except:
pass
- dialog.notification('Error '+str(r.status_code), msg, xbmcgui.NOTIFICATION_INFO, 5000)
+ dialog.notification('Error '+str(r.status_code), msg, xbmcgui.NOTIFICATION_INFO, 9000)
sys.exit()
return r.json()
@@ -558,4 +599,5 @@ UA_ANDROID = 'Mozilla/5.0 (Linux; Android 6.0.1; Build/MOB31H; wv) AppleWebKit/5
UA_ANDROID_TV = 'Mozilla/5.0 (Linux; Android 6.0.1; Hub Build/MHC19J; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Safari/537.36'
CHANNEL_URL = 'https://media-framework.totsuko.tv/media-framework/media/v2.1/stream/channel'
EPG_URL = 'https://epg-service.totsuko.tv/epg_service_sony/service/v2'
+PROF_ID = ADDON.getSetting(id='default_profile')
VERIFY = True
diff --git a/plugin.video.psvue/resources/lib/sony.py b/plugin.video.psvue/resources/lib/sony.py
index 3088aed..845e0ba 100644
--- a/plugin.video.psvue/resources/lib/sony.py
+++ b/plugin.video.psvue/resources/lib/sony.py
@@ -152,6 +152,7 @@ class SONY():
r = requests.delete(url, headers=headers, cookies=self.load_cookies(), verify=self.verify)
self.save_cookies(r.cookies)
# Clear addon settings
+ self.addon.setSetting(id='EPGreqPayload', value='')
self.addon.setSetting(id='reqPayload', value='')
self.addon.setSetting(id='last_auth', value='')
self.addon.setSetting(id='npsso', value='')
@@ -210,12 +211,21 @@ class SONY():
'Accept-Encoding': 'gzip',
"X-Requested-With": "com.snei.vue.atv"
}
+ r = requests.get(url, headers=headers, verify=self.verify)
+ device_status = str(r.json()['body']['status'])
+
if self.addon.getSetting(id='reqPayload') != '':
headers['reauth'] = '1'
headers['reqPayload'] = self.addon.getSetting(id='reqPayload')
- r = requests.get(url, headers=headers, verify=self.verify)
- if 'reqPayload' in r.headers:
+ if device_status == "UNAUTHORIZED":
+ auth_error = str(r.json()['header']['error']['message'])
+ error_code = str(r.json()['header']['error']['code'])
+ self.notification_msg("Error Code: "+error_code, auth_error)
+ sys.exit()
+
+
+ elif 'reqPayload' in r.headers:
req_payload = str(r.headers['reqPayload'])
self.addon.setSetting(id='reqPayload', value=req_payload)
auth_time = r.json()['header']['time_stamp']
@@ -272,8 +282,8 @@ class SONY():
}
r = requests.get(url, headers=headers, verify=self.verify)
- req_payload = str(r.headers['reqPayload'])
- self.addon.setSetting(id='reqPayload', value=req_payload)
+ EPGreqPayload = str(r.headers['reqPayload'])
+ self.addon.setSetting(id='EPGreqPayload', value=EPGreqPayload)
auth_time = r.json()['header']['time_stamp']
self.addon.setSetting(id='last_auth', value=auth_time)
self.addon.setSetting(id='default_profile', value=profile_id)
@@ -289,7 +299,7 @@ class SONY():
"Accept-Encoding": "gzip, deflate, br",
"User-Agent": self.ua_android_tv,
"Connection": "Keep-Alive",
- "reqPayload": self.addon.getSetting(id='reqPayload'),
+ "reqPayload": self.addon.getSetting(id='EPGreqPayload'),
"X-Requested-With": "com.snei.vue.atv"
}
@@ -318,7 +328,7 @@ class SONY():
"Accept-Encoding": "gzip, deflate, br",
"User-Agent": self.ua_android_tv,
"Connection": "Keep-Alive",
- "reqPayload": self.addon.getSetting(id='reqPayload'),
+ "reqPayload": self.addon.getSetting(id='EPGreqPayload'),
"X-Requested-With": "com.snei.vue.atv"
}
@@ -343,15 +353,16 @@ class SONY():
def put_resume_time(self, airing_id, channel_id, program_id, series_id, tms_id):
url = self.user_action_url+'/watch_history'
- headers = {"Accept": "*/*",
- "Content-type": "application/json",
- "Origin": "https://themis.dl.playstation.net",
- "Accept-Language": "en-US",
- "Referer": "https://themis.dl.playstation.net/themis/destro/4-4-5a/",
- "Accept-Encoding": "gzip, deflate",
- "User-Agent": self.ua_android_tv,
- "Connection": "Keep-Alive",
- 'reqPayload': self.addon.getSetting(id='reqPayload'),
+ headers = {'Accept': '*/*',
+ 'Content-type': 'application/json',
+ 'Origin': 'https://vue.playstation.com',
+ 'Accept-Language': 'en-US,en;q-0.5',
+ 'Referer': 'https://vue.playstation.com/watch/my-vue',
+ 'Accept-Encoding': 'gzip, deflate, br',
+ 'User-Agent': self.ua_android_tv,
+ 'Connection': 'Keep-Alive',
+ 'Host': 'sentv-user-action.totsuko.tv',
+ 'reqPayload': self.addon.getSetting(id='EPGreqPayload'),
'X-Requested-With': 'com.snei.vue.android'
}
@@ -360,13 +371,13 @@ class SONY():
payload += '"channel_id":'+channel_id+','
payload += '"tms_id":"'+tms_id+'",'
payload += '"airing_id":'+airing_id+','
- payload += '"last_watch_date":"2017-08-11T00:40:43Z",'
- payload += '"last_timecode":"00:01:46",'
+ payload += '"last_watch_date":"2017-11-13T06:54:419Z",'
+ payload += '"last_timecode":"00:00:00",'
payload += '"start_timecode":"00:00:00:00",'
payload += '"fully_watched":false,'
- payload += '"stream_type":"dvr"}'
+ payload += '"stream_type":"null"}'
- #xbmc.log(payload)
+ #xbmc.log("The Payload is: " + payload)
r = requests.put(url, headers=headers, data=payload, verify=self.verify)
@@ -401,4 +412,4 @@ class SONY():
def notification_msg(self, title, msg):
dialog = xbmcgui.Dialog()
- dialog.notification(title, msg, xbmcgui.NOTIFICATION_INFO, 5000)
+ dialog.notification(title, msg, xbmcgui.NOTIFICATION_INFO, 9000)