summaryrefslogtreecommitdiff
path: root/plugin.video.psvue
diff options
context:
space:
mode:
authorEric <eracknaphobia@hotmail.com>2017-08-16 11:52:31 -0400
committerEric <eracknaphobia@hotmail.com>2017-08-16 11:52:31 -0400
commitd0cef43b5097b08ec8812f4fc31732b5a3ae8a62 (patch)
tree77eeb4f01038c5c35afffef54b965822d5f36955 /plugin.video.psvue
parent49374b6d429a4f3ab9a9eb60d52b23e56cc2aa97 (diff)
[plugin.video.psvue] 2017.8.12
Diffstat (limited to 'plugin.video.psvue')
-rw-r--r--plugin.video.psvue/addon.xml9
-rw-r--r--plugin.video.psvue/main.py67
-rw-r--r--plugin.video.psvue/resources/language/resource.language.en_gb/strings.po4
-rw-r--r--plugin.video.psvue/resources/lib/ps_vue.py193
-rw-r--r--plugin.video.psvue/resources/lib/sony.py99
-rw-r--r--plugin.video.psvue/resources/settings.xml50
6 files changed, 308 insertions, 114 deletions
diff --git a/plugin.video.psvue/addon.xml b/plugin.video.psvue/addon.xml
index 8019e34..7363db2 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.8.3" provider-name="eracknaphobia">
+<addon id="plugin.video.psvue" name="PS Vue" version="2017.8.12" provider-name="eracknaphobia">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.requests" version="2.9.1"/>
@@ -13,9 +13,10 @@
<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>
-- Added Search Feature
-- Added Always Ask Profile setting
-- Ability to Customize Main Menu
+- Added All Channels section
+- Added ability to add / remove channels to Favorite Channels via the context menu
+- Added ability to add / remove shows to My Shows via the context menu
+- Added more info to streams (resume time, duration, etc.)
</news>
<language>en</language>
<platform>all</platform>
diff --git a/plugin.video.psvue/main.py b/plugin.video.psvue/main.py
index c2a92ac..cb44ac7 100644
--- a/plugin.video.psvue/main.py
+++ b/plugin.video.psvue/main.py
@@ -4,28 +4,33 @@ params=get_params()
url=None
name=None
mode=None
-show_id=None
-
-try:
- url=urllib.unquote_plus(params["url"])
-except:
- pass
-try:
- name=urllib.unquote_plus(params["name"])
-except:
- pass
-try:
- mode=int(params["mode"])
-except:
- pass
-try:
- show_id=params["show_id"]
-except:
- pass
+airing_id='null'
+channel_id='null'
+program_id='null'
+series_id='null'
+tms_id='null'
+
+try: url=urllib.unquote_plus(params["url"])
+except: pass
+try: name=urllib.unquote_plus(params["name"])
+except: pass
+try: mode=int(params["mode"])
+except: pass
+try: airing_id=params["airing_id"]
+except: pass
+try: channel_id=params["channel_id"]
+except: pass
+try: program_id=params["program_id"]
+except: pass
+try: series_id=params["series_id"]
+except: pass
+try: tms_id=params["tms_id"]
+except: pass
check_device_id()
+
sony = SONY()
if mode < 998:
if ADDON.getSetting(id='last_auth') != '':
@@ -38,6 +43,9 @@ if mode == None and mode < 998:
if ADDON.getSetting(id='default_profile') == '' or ADDON.getSetting(id='always_ask_profile') == 'true': sony.get_profiles()
main_menu()
+elif mode == 30:
+ all_channels()
+
elif mode == 50:
timeline()
@@ -45,7 +53,7 @@ elif mode == 100:
my_shows()
elif mode == 150:
- list_episodes(show_id)
+ list_episodes(program_id)
elif mode == 200:
favorite_channels()
@@ -73,7 +81,7 @@ elif mode == 800:
main_menu()
elif mode == 900:
- get_stream(url)
+ get_stream(url, airing_id, channel_id, program_id, series_id, tms_id)
elif mode == 998:
sys.exit()
@@ -88,6 +96,25 @@ elif mode == 1000:
ADDON.setSetting(id='deviceId', value='')
sony.notification_msg(LOCAL_STRING(30006), LOCAL_STRING(30007))
+elif mode == 1001:
+ ids ={
+ 'channel_id': channel_id,
+ 'program_id': program_id,
+ 'series_id': series_id,
+ 'tms_id': tms_id
+ }
+ sony.add_to_favorites(ids)
+
+elif mode == 1002:
+ ids ={
+ 'channel_id': channel_id,
+ 'program_id': program_id,
+ 'series_id': series_id,
+ 'tms_id': tms_id
+ }
+ sony.remove_from_favorites(ids)
+
+
if mode != None and mode != 800 and mode != 750:
xbmcplugin.endOfDirectory(addon_handle, cacheToDisc=False)
elif mode == 800:
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 bc7b8f1..a39fc08 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
@@ -176,3 +176,7 @@ 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 8181259..5478a8c 100644
--- a/plugin.video.psvue/resources/lib/ps_vue.py
+++ b/plugin.video.psvue/resources/lib/ps_vue.py
@@ -10,6 +10,7 @@ from sony import SONY
def main_menu():
+ if ADDON.getSetting(id='all_chan_visible') == 'true': addDir(LOCAL_STRING(30224), 30, ICON)
if ADDON.getSetting(id='timeline_visible') == 'true': addDir(LOCAL_STRING(30100), 50, ICON)
if ADDON.getSetting(id='myshows_visible') == 'true': addDir(LOCAL_STRING(30101), 100, ICON)
if ADDON.getSetting(id='fav_visible') == 'true': addDir(LOCAL_STRING(30102), 200, ICON)
@@ -21,22 +22,27 @@ def main_menu():
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'])
+
+
def timeline():
list_timeline()
def my_shows():
- json_source = get_json(EPG_URL + '/browse/items/favorites/filter/shows/sort/title/offset/0/size/100')
+ json_source = get_json(EPG_URL + '/browse/items/favorites/filter/shows/sort/title/offset/0/size/500')
list_shows(json_source['body']['items'])
def favorite_channels():
- json_source = get_json(EPG_URL + '/browse/items/favorites/filter/channels/sort/name/offset/0/size/100')
+ json_source = get_json(EPG_URL + '/browse/items/favorites/filter/channels/sort/name/offset/0/size/500')
list_channels(json_source['body']['items'])
def live_tv():
- json_source = get_json(EPG_URL + '/browse/items/now_playing/filter/all/sort/channel/offset/0/size/100')
+ json_source = get_json(EPG_URL + '/browse/items/now_playing/filter/all/sort/channel/offset/0/size/500')
list_channels(json_source['body']['items'])
@@ -108,7 +114,15 @@ def list_show(show):
if image['width'] >= 1080: fanart = image['src']
if icon != ICON and fanart != FANART: break
title = show['title']
- show_id = str(show['id'])
+
+ airing_id = 'null'
+ if 'airing_id' in show: airing_id = str(show['airing_id'])
+ channel_id = 'null'
+ if 'channel_id' in show: channel_id = str(show['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'])
genre = ''
for item in show['genres']:
@@ -118,20 +132,27 @@ def list_show(show):
plot = get_dict_item('series_synopsis', show)
if plot == '': plot = get_dict_item('synopsis', show)
+ info = {
+ 'plot': plot,
+ 'tvshowtitle': title,
+ 'title': title,
+ 'originaltitle': title,
+ 'genre': genre
+ }
- # if watched = true look in airing for last time code
- # "last_timecode": "00:10:54",
+ show_info = {
+ 'airing_id': airing_id,
+ 'channel_id': channel_id,
+ 'program_id': program_id,
+ 'series_id': series_id,
+ 'tms_id': tms_id
+ }
- # channel_url = CHANNEL_URL+'/'+show_id
- # show_url = 'https://media-framework.totsuko.tv/media-framework/media/v2.1/stream/airing/'+airing_id
+ addShow(title, 150, icon, fanart, info, show_info)
- info = {'plot': plot, 'tvshowtitle': title, 'title': title, 'originaltitle': title, 'genre': genre}
- # addStream(title,show_url,title,icon,fanart,info)
- addDir(title, 150, icon, fanart, info, show_id)
-
-def list_episodes(show_id):
- url = EPG_URL + '/details/items/program/' + show_id + '/episodes/offset/0/size/20'
+def list_episodes(program_id):
+ url = EPG_URL + '/details/items/program/' + program_id + '/episodes/offset/0/size/20'
json_source = get_json(url)
@@ -144,7 +165,6 @@ def list_episodes(show_id):
def list_episode(show):
- # if str(show['playable']).upper() == 'FALSE': return
fanart = FANART
icon = ICON
for image in show['urls']:
@@ -157,8 +177,24 @@ def list_episode(show):
show_title = show['title']
title = show['display_episode_title']
airing_id = str(show['airings'][0]['airing_id'])
+
+ #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']
airing_date = stringToDate(airing_date, "%Y-%m-%dT%H:%M:%S.%fZ")
+ airing_enddate = str(show['airings'][0]['airing_enddate'])
+ airing_enddate = stringToDate(airing_enddate, "%Y-%m-%dT%H:%M:%S.%fZ")
+
+ duration = airing_enddate - airing_date
+ #xbmc.log("DURATION = "+ str(duration.total_seconds()))
+
airing_date = UTCToLocal(airing_date)
broadcast_date = ''
if 'broadcast_date' in show:
@@ -175,21 +211,49 @@ def list_episode(show):
if str(show['playable']).upper() == 'FALSE':
# Add airing date/time to title
- # airing = airing.strftime('%H:%M')
title = title + ' ' + airing_date.strftime('%m/%d/%y') + ' ' + airing_date.strftime('%I:%M %p').lstrip('0')
+ # Add resumetime if applicable
+ resumetime=''
+ try:
+ resumetime = str(show['airings'][0]['last_timecode'])
+ xbmc.log("RESUME TIME = "+resumetime)
+ h,m,s = resumetime.split(':')
+ resumetime = str(int(h) * 3600 + int(m) * 60 + int(s))
+ except: pass
+ #xbmc.log("RESUME TIME IN Seconds = "+resumetime)
+ #xbmc.log("TOTAL TIME IN Seconds = "+str(int(duration.total_seconds())))
- # if watched = true look in airing for last time code
- # "last_timecode": "00:10:54",
-
- # channel_url = CHANNEL_URL+'/'+show_id
show_url = 'https://media-framework.totsuko.tv/media-framework/media/v2.1/stream/airing/' + airing_id
- info = {'plot': plot, 'tvshowtitle': show_title, 'title': title, 'originaltitle': title, 'genre': genre, 'aired': airing_date.strftime('%Y-%m-%d')}
+ info = {
+ 'plot': plot,
+ 'tvshowtitle': show_title,
+ 'title': title,
+ 'originaltitle': title,
+ 'mediatype': 'episode',
+ 'genre': genre,
+ 'aired': airing_date.strftime('%Y-%m-%d'),
+ 'duration': str(int(duration.total_seconds()))
+ }
if broadcast_date != '': info['premiered'] = broadcast_date.strftime('%Y-%m-%d')
+ properties = {
+
+ 'totaltime': str(int(duration.total_seconds())),
+ 'resumetime': resumetime,
+ 'IsPlayable': str(show['playable']).lower()
+ }
- addStream(title, show_url, title, icon, fanart, info)
+ show_info = {
+ 'airing_id': airing_id,
+ 'channel_id': channel_id,
+ 'program_id': program_id,
+ 'series_id': series_id,
+ 'tms_id': tms_id
+ }
+
+ addStream(title, show_url, title, icon, fanart, info, properties, show_info)
def list_channels(json_source):
@@ -224,9 +288,25 @@ def list_channel(channel):
channel_url = CHANNEL_URL + '/' + channel_id
- info = {'season':season, 'episode':episode, 'plot': plot, 'tvshowtitle': title, 'title': title, 'originaltitle': title, 'genre': genre}
+ info = {
+ 'season':season,
+ 'episode':episode,
+ 'plot': plot,
+ 'tvshowtitle': title,
+ 'title': title,
+ 'originaltitle': title,
+ 'genre': genre
+ }
+
+ properties = {
+ 'IsPlayable': 'true'
+ }
+
+ show_info = {
+ 'channel_id': channel_id
+ }
- addStream(title, channel_url, title, icon, fanart, info)
+ addStream(title, channel_url, title, icon, fanart, info, properties, show_info)
def get_dict_item(key, dictionary):
@@ -236,7 +316,7 @@ def get_dict_item(key, dictionary):
return ''
-def get_stream(url):
+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",
@@ -262,14 +342,23 @@ def get_stream(url):
xbmcplugin.setResolvedUrl(addon_handle, True, listitem)
# Seek to time
+
+ #Give the stream sometime to start before checking
'''
monitor = xbmc.Monitor()
- monitor.waitForAbort(3000)
- if xbmc.Player().isPlayingVideo():
- xbmc.Player().seekTime(600)
+ monitor.waitForAbort(10)
+ xbmc.log("Is playing video? " + str(xbmc.Player().isPlayingVideo()))
+ while xbmc.Player().isPlayingVideo() and not monitor.abortRequested():
+ xbmc.log("Still playing...")
+ monitor.waitForAbort(3)
+
+ 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'),
@@ -346,30 +435,56 @@ def UTCToLocal(utc_dt):
return local_dt.replace(microsecond=utc_dt.microsecond)
-def addDir(name, mode, icon, fanart=None, info=None, show_id=None):
+def addDir(name, mode, icon, fanart=None, info=None):
u = sys.argv[0] + "?mode=" + str(mode)
- if show_id != None: u += '&show_id=' + show_id
-
liz = xbmcgui.ListItem(name)
if fanart == None: fanart = FANART
liz.setArt({'icon': icon, 'thumb': icon, 'fanart': fanart})
if info != None:
liz.setInfo(type="Video", infoLabels=info)
-
ok = xbmcplugin.addDirectoryItem(handle=addon_handle, url=u, listitem=liz, isFolder=True)
xbmcplugin.setContent(addon_handle, 'tvshows')
return ok
+def addShow(name, mode, icon, fanart, info, show_info):
+ u = sys.argv[0] + "?mode=" + str(mode)
+ u += '&program_id=' + show_info['program_id']
+
+ liz = xbmcgui.ListItem(name)
+ if fanart == None: fanart = FANART
+ liz.setArt({'icon': icon, 'thumb': icon, 'fanart': fanart})
+ liz.setInfo(type="Video", infoLabels=info)
+ show_values =''
+ for key, value in show_info.iteritems():
+ show_values += '&' + key + '=' + value
+
+ context_items = [('Add To My Shows', 'RunPlugin(plugin://plugin.video.psvue/?mode=1001'+show_values+')'),
+ ('Remove From My Shows', 'RunPlugin(plugin://plugin.video.psvue/?mode=1002'+show_values+')')]
+ liz.addContextMenuItems(context_items)
+ ok = xbmcplugin.addDirectoryItem(handle=addon_handle, url=u, listitem=liz, isFolder=True)
+ xbmcplugin.setContent(addon_handle, 'tvshows')
+
-def addStream(name, link_url, title, icon, fanart, info=None):
+def addStream(name, link_url, title, icon, fanart, info=None, properties=None, show_info=None):
u = sys.argv[0] + "?url=" + urllib.quote_plus(link_url) + "&mode=" + str(900)
+ #xbmc.log(str(info))
liz = xbmcgui.ListItem(name)
liz.setArt({'icon': icon, 'thumb': icon, 'fanart': fanart})
- liz.setProperty("IsPlayable", "true")
- # liz.setProperty('setResumePoint', '1200')
- liz.setInfo(type="Video", infoLabels={"Title": title, 'mediatype': 'episode'})
- if info != None:
- liz.setInfo(type="Video", infoLabels=info)
+ if info != None: liz.setInfo(type="Video", infoLabels=info)
+ if properties != None:
+ for key, value in properties.iteritems():
+ liz.setProperty(key,value)
+ xbmc.log(str(show_info))
+ if show_info != None:
+ show_values =''
+ for key, value in show_info.iteritems():
+ show_values += '&' + key + '=' + value
+ u += show_values
+ if len(show_info) == 1:
+ #Only add this option for channels not episodes
+ context_items = [('Add To Favorites', 'RunPlugin(plugin://plugin.video.psvue/?mode=1001'+show_values+')'),
+ ('Remove From Favorites', 'RunPlugin(plugin://plugin.video.psvue/?mode=1002'+show_values+')')]
+ liz.addContextMenuItems(context_items)
ok = xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=u, listitem=liz, isFolder=False)
xbmcplugin.setContent(addon_handle, 'tvshows')
return ok
@@ -394,7 +509,7 @@ def get_params():
return param
def check_device_id():
- DEVICE_ID = ADDON.getSetting(id='deviceId')
+ DEVICE_ID = ADDON.getSetting(id='deviceId')
amazon_device = 'Amazon'
amazon_device = amazon_device.encode("hex")
old_asus = 'ASUS'
diff --git a/plugin.video.psvue/resources/lib/sony.py b/plugin.video.psvue/resources/lib/sony.py
index 1c11ad7..4226425 100644
--- a/plugin.video.psvue/resources/lib/sony.py
+++ b/plugin.video.psvue/resources/lib/sony.py
@@ -6,6 +6,7 @@ from datetime import datetime
class SONY():
addon = xbmcaddon.Addon()
api_url = 'https://auth.api.sonyentertainmentnetwork.com/2.0'
+ user_action_url = 'https://sentv-user-action.totsuko.tv/sentv_user_action/ws/v2'
device_id = ''
localized = addon.getLocalizedString
login_client_id = '71a7beb8-f21a-47d9-a604-2e71bee24fe0'
@@ -261,25 +262,68 @@ class SONY():
self.addon.setSetting(id='default_profile', value=profile_id)
- def put_resume_time(self):
- """
- PUT https://sentv-user-action.totsuko.tv/sentv_user_action/ws/v2/watch_history HTTP/1.1
- Host: sentv-user-action.totsuko.tv
- Connection: keep-alive
- Content-Length: 247
- Accept: */*
- reqPayload: redacted
- User-Agent: Mozilla/5.0 (Linux; Android 6.0.1; Build/MOB31H; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Safari/537.36
- Origin: https://themis.dl.playstation.net
- Content-Type: application/json
- Referer: https://themis.dl.playstation.net/themis/zartan/2.2.2b/
- Accept-Encoding: gzip, deflate
- Accept-Language: en-US
- X-Requested-With: com.snei.vue.android
-
- {"series_id":redacted,"program_id":redacted,"channel_id":redacted,"tms_id":"EP005544655496","airing_id":redacted,"last_watch_date":"2017-04-28T00:40:43Z","last_timecode":"01:46:29","start_timecode":"00:00:00:00","fully_watched":false,"stream_type":"dvr"}
- """
- url = 'https://sentv-user-action.totsuko.tv/sentv_user_action/ws/v2/watch_history'
+ def add_to_favorites(self, ids):
+ url = self.user_action_url+'/favorite'
+ headers = {"Accept": "*/*",
+ "Content-type": "application/json",
+ "Origin": "https://vue.playstation.com",
+ "Referer": "https://vue.playstation.com/watch/home",
+ "Accept-Language": "en-US,en;q=0.8",
+ "Accept-Encoding": "gzip, deflate, br",
+ "User-Agent": self.ua_android,
+ "Connection": "Keep-Alive",
+ "reqPayload": self.addon.getSetting(id='reqPayload')
+ }
+
+ if ids['channel_id'] != 'null':
+ location = self.addon.getLocalizedString(30102)
+ payload = '{"channel_id":'+ids['channel_id']+'}'
+ else:
+ location = self.addon.getLocalizedString(30101)
+ payload = '{"program_id":'+ids['program_id']+',"series_id":'+ids['series_id']+',"tms_id":"'+ids['tms_id']+'"}'
+
+ r = requests.post(url, headers=headers, cookies=self.load_cookies(), data=payload, verify=self.verify)
+
+ if r.status_code == 200:
+ self.notification_msg("Success!", "Added to "+location)
+ else:
+ self.notification_msg("Fail", "Not added")
+
+
+ def remove_from_favorites(self,ids):
+ url = self.user_action_url+'/favorite'
+ headers = {"Accept": "*/*",
+ "Content-type": "application/json",
+ "Origin": "https://vue.playstation.com",
+ "Referer": "https://vue.playstation.com/watch/home",
+ "Accept-Language": "en-US,en;q=0.8",
+ "Accept-Encoding": "gzip, deflate, br",
+ "User-Agent": self.ua_android,
+ "Connection": "Keep-Alive",
+ "reqPayload": self.addon.getSetting(id='reqPayload')
+ }
+
+ if ids['channel_id'] != 'null':
+ location = self.addon.getLocalizedString(30102)
+ payload = '{"channel_id":'+ids['channel_id']+'}'
+ else:
+ location = self.addon.getLocalizedString(30101)
+ payload = '{"program_id":'+ids['program_id']+',"series_id":'+ids['series_id']+',"tms_id":"'+ids['tms_id']+'"}'
+
+ msg = 'Are you sure you want to remove this from '+location+'?'
+ dialog = xbmcgui.Dialog()
+ remove = dialog.yesno(location,msg)
+ if remove:
+ r = requests.delete(url, headers=headers, cookies=self.load_cookies(), data=payload, verify=self.verify)
+
+ if r.status_code == 200:
+ self.notification_msg("Success!", "Removed from "+location)
+ else:
+ self.notification_msg("Fail", "Not added")
+
+
+ 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",
@@ -292,17 +336,18 @@ class SONY():
'X-Requested-With': 'com.snei.vue.android'
}
- payload = '{"series_id":redacted,'
- payload += '"program_id":redacted,'
- payload += '"channel_id":redacted,'
- payload += '"tms_id":"redacted",'
- payload += '"airing_id":redacted,'
- payload += '"last_watch_date":"2017-04-28T00:40:43Z",'
- payload += '"last_timecode":"01:46:29",'
+ payload = '{"series_id":'+series_id+','
+ payload += '"program_id":'+program_id+','
+ 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 += '"start_timecode":"00:00:00:00",'
payload += '"fully_watched":false,'
payload += '"stream_type":"dvr"}'
+ #xbmc.log(payload)
r = requests.put(url, headers=headers, data=payload, verify=self.verify)
@@ -311,7 +356,7 @@ class SONY():
cookie_file = os.path.join(addon_profile_path, 'cookies.lwp')
cj = cookielib.LWPCookieJar()
try:
- cj.load(cookie_file,ignore_discard=True)
+ cj.load(cookie_file,ignore_discard=True)
except:
pass
for c in cookiejar:
diff --git a/plugin.video.psvue/resources/settings.xml b/plugin.video.psvue/resources/settings.xml
index d7110aa..b299576 100644
--- a/plugin.video.psvue/resources/settings.xml
+++ b/plugin.video.psvue/resources/settings.xml
@@ -1,29 +1,31 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
-<!--Main Menu-->
-<category label="30223">
- <setting id="timeline_visible" type="bool" label="30214" default="true" />
- <setting id="myshows_visible" type="bool" label="30215" default="true" />
- <setting id="fav_visible" type="bool" label="30216" default="true" />
- <setting id="live_visible" type="bool" label="30217" default="true" />
- <setting id="sports_visible" type="bool" label="30218" default="true" />
- <setting id="kids_visible" type="bool" label="30219" default="true" />
- <setting id="recent_visible" type="bool" label="30220" default="true" />
- <setting id="featured_visible" type="bool" label="30221" default="true" />
- <setting id="search_visible" type="bool" label="30222" default="true" />
-</category>
- <!--Login-->
- <category label="30000">
- <setting id="username" type="text" label="30001" default=""/>
- <setting id="password" type="text" label="30002" option="hidden" default=""/>
- <setting id="logout" type="action" label="30003" action="RunPlugin(plugin://plugin.video.psvue/?mode=999)" option="close" />
- <setting type="action" label="30005" action="RunPlugin(plugin://plugin.video.psvue/?mode=1000)" option="close" />
-</category>
-<!--Profile-->
-<category label="30212">
- <setting type="action" label="30004" action="RunPlugin(plugin://plugin.video.psvue/?mode=800)" option="close" />
- <setting id="always_ask_profile" type="bool" label="30213" default="false" />
-</category>
+ <!--Main Menu-->
+ <category label="30223">
+ <setting id="all_chan_visible" type="bool" label="30224" default="true" />
+ <setting id="timeline_visible" type="bool" label="30214" default="true" />
+ <setting id="myshows_visible" type="bool" label="30215" default="true" />
+ <setting id="fav_visible" type="bool" label="30216" default="true" />
+ <setting id="live_visible" type="bool" label="30217" default="true" />
+ <setting id="sports_visible" type="bool" label="30218" default="true" />
+ <setting id="kids_visible" type="bool" label="30219" default="true" />
+ <setting id="recent_visible" type="bool" label="30220" default="true" />
+ <setting id="featured_visible" type="bool" label="30221" default="true" />
+ <setting id="search_visible" type="bool" label="30222" default="true" />
+
+ </category>
+ <!--Login-->
+ <category label="30000">
+ <setting id="username" type="text" label="30001" default=""/>
+ <setting id="password" type="text" label="30002" option="hidden" default=""/>
+ <setting id="logout" type="action" label="30003" action="RunPlugin(plugin://plugin.video.psvue/?mode=999)" option="close" />
+ <setting type="action" label="30005" action="RunPlugin(plugin://plugin.video.psvue/?mode=1000)" option="close" />
+ </category>
+ <!--Profile-->
+ <category label="30212">
+ <setting type="action" label="30004" action="RunPlugin(plugin://plugin.video.psvue/?mode=800)" option="close" />
+ <setting id="always_ask_profile" type="bool" label="30213" default="false" />
+ </category>
<!-- Hidden -->
<setting id="reqPayload" type="text" default="" visible="false"/>