2014-11-16, 21:01
(2014-11-16, 19:44)-Dis Wrote: Fix for profile selection and my list.
Change setProfile to this:
Code:def setProfile():
token = addon.getSetting("profile")
opener.open("http://www.netflix.com/WiHome")
opener.open("https://api-global.netflix.com/desktop/account/profiles/switch?switchProfileGuid="+token)
cj.save(cookieFile)
and change chooseProfile to this:
Code:def chooseProfile():
content = opener.open("http://www.netflix.com/WiHome").read()
match = re.compile('"profileName":"(.+?)".+?token":"(.+?)"', re.DOTALL).findall(content)
profiles = []
tokens = []
for p, t in match:
profiles.append(p)
tokens.append(t)
dialog = xbmcgui.Dialog()
nr = dialog.select(translation(30113), profiles)
if nr >= 0:
token = tokens[nr]
# Profile selection isn't remembered, so it has to be executed before every requests (setProfile)
# If you know a solution for this, please let me know
# opener.open("https://api-global.netflix.com/desktop/account/profiles/switch?switchProfileGuid="+token)
addon.setSetting("profile", token)
cj.save(cookieFile)
fix for viewing activity:
In def listViewingActivity(type):
change this:
Code:spl = content.split('<li data-series=')
to this:
Code:spl = content.split('<li class="retableRow" data-series=')
Thanks a lot !!!! That did it.
In def setProfile(): in my post I had put "firstName" in there playing around with the script . But I did need to change the line to opener.open("http://www.netflix.com/WiHome"). The other changes you posted were also needed.