<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="plugin.video.netflix" name="Netflix" version="0.11.11" provider-name="libdev + jojo + asciidisco">
+<addon id="plugin.video.netflix" name="Netflix" version="0.11.12" provider-name="libdev + jojo + asciidisco">
<requires>
<import addon="xbmc.python" version="2.24.0"/>
<import addon="script.module.beautifulsoup4" version="4.3.2"/>
<license>MIT</license>
<forum>http://www.kodinerds.net/index.php/Thread/55607-Inputstream-Agile-Betatest-Netflix/</forum>
<source>https://github.com/asciidisco/plugin.video.netflix</source>
- <news>v0.11.11 (2017-4-10)
+ <news>v0.11.12 (2017-6-29)
+ - Fix missing isFirstUse inline setting
+ - Fix dynamic ESN loading for widevine
+
+ v0.11.11 (2017-4-10)
- Portugese translations
- Swedish translations
- Fix issues with persisted msl manifests
v0.11.8 (2017-3-17)
- - Fix 1 sec delay per request on windows (see https://github.com/asciidisco/plugin.video.netflix/issues/21 for details)
-
- v0.11.7 (2017-3-17)
- - Remove initial connection check as it´s causing trouble</news>
+ - Fix 1 sec delay per request on windows (see https://github.com/asciidisco/plugin.video.netflix/issues/21 for details)</news>
</extension>
</addon>
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.11
+# Addon version: 0.11.12
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.11
+# Addon version: 0.11.12
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.11
+# Addon version: 0.11.12
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.11
+# Addon version: 0.11.12
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.11
+# Addon version: 0.11.12
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.11
+# Addon version: 0.11.12
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.11
+# Addon version: 0.11.12
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
# Kodi Media Center language file
# Addon Name: Netflix
# Addon id: plugin.video.netflix
-# Addon version: 0.11.11
+# Addon version: 0.11.12
# Addon Provider: libdev + jojo + asciidisco
msgid ""
msgstr ""
import xbmcgui
import xbmc
import json
-from os.path import join
+from MSL import MSL
+from os import remove
+from os.path import join, isfile
from urllib import urlencode
from xbmcaddon import Addon
from uuid import uuid4
'password': self.get_addon().getSetting('password')
}
+ def get_esn(self):
+ """
+ Returns the esn from settings
+ """
+ return self.get_addon().getSetting('esn')
+
+ def set_esn(self, esn):
+ """
+ Returns the esn from settings
+ """
+ stored_esn = self.get_esn()
+ if not stored_esn:
+ self.set_setting('esn', esn)
+ self.delete_manifest_data()
+ return esn
+ return stored_esn
+
+ def delete_manifest_data(self):
+ if isfile(self.msl_data_path + 'msl_data.json'):
+ remove(self.msl_data_path + 'msl_data.json')
+ if isfile(self.msl_data_path + 'manifest.json'):
+ remove(self.msl_data_path + 'manifest.json')
+ msl = MSL(kodi_helper=self)
+ msl.save_msl_data()
+
def get_dolby_setting(self):
"""
Returns if the dolby sound is enabled
last_drm_context = ''
last_playback_context = ''
#esn = "NFCDCH-LX-CQE0NU6PA5714R25VPLXVU2A193T36"
- esn = "WWW-BROWSE-D7GW1G4NPXGR1F0X1H3EQGY3V1F5WE"
+ #esn = "WWW-BROWSE-D7GW1G4NPXGR1F0X1H3EQGY3V1F5WE"
#esn = "NFCDIE-02-DCH84Q2EK3N6VFVQJ0NLRQ27498N0F"
current_message_id = 0
session = requests.session()
}
def __generate_msl_request_data(self, data):
+ self.__load_msl_data()
header_encryption_envelope = self.__encrypt(self.__generate_msl_header())
header = {
'headerdata': base64.standard_b64encode(header_encryption_envelope),
:return: The base64 encoded JSON String of the header
"""
self.current_message_id = self.rndm.randint(0, pow(2, 52))
+ esn = self.kodi_helper.get_esn()
header_data = {
- 'sender': self.esn,
+ 'sender': esn,
'handshake': is_handshake,
'nonreplayable': False,
'capabilities': {
:param plaintext:
:return: Serialized JSON String of the encryption Envelope
"""
+ esn = self.kodi_helper.get_esn()
iv = get_random_bytes(16)
encryption_envelope = {
'ciphertext': '',
- 'keyid': self.esn + '_' + str(self.sequence_number),
+ 'keyid': esn + '_' + str(self.sequence_number),
'sha256': 'AA==',
'iv': base64.standard_b64encode(iv)
}
def __perform_key_handshake(self):
header = self.__generate_msl_header(is_key_request=True, is_handshake=True, compressionalgo="", encrypt=False)
+ esn = self.kodi_helper.get_esn()
request = {
'entityauthdata': {
'scheme': 'NONE',
'authdata': {
- 'identity': self.esn
+ 'identity': esn
}
},
'headerdata': base64.standard_b64encode(header),
self.encryption_key = base64.standard_b64decode(msl_data['encryption_key'])
self.sign_key = base64.standard_b64decode(msl_data['sign_key'])
+
+ def save_msl_data(self):
+ self.__save_msl_data()
+
def __save_msl_data(self):
"""
Saves the keys and tokens in json file
self.profiles = self.netflix_session.profiles
else:
self.profiles = []
+ self.kodi_helper.set_esn(self.netflix_session.esn)
def is_logged_in (self, params):
"""Existing login proxy function
User Agent for platform
"""
import platform
- if platform == 'linux' or platform == 'linux2':
- return 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
- elif platform == 'darwin':
+ self.log(msg='Building User Agent for platform:' + str(platform.system()))
+ if platform.system() == 'Darwin':
return 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
- elif platform == 'win32':
+ elif platform.system() == 'Windows':
return 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
else:
return 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36'
important_fields = [
'profileName',
'isActive',
- 'isFirstUse',
'isAccountOwner',
'isKids'
]
profile.update({important_field: netflix_page_data['profiles'][profile_id]['summary'][important_field]})
avatar_base = netflix_page_data['nf'].get(netflix_page_data['profiles'][profile_id]['summary']['avatarName'], False);
avatar = 'https://secure.netflix.com/ffe/profiles/avatars_v2/320x320/PICON_029.png' if avatar_base == False else avatar_base['images']['byWidth']['320']['value']
- profile.update({'avatar': avatar})
+ profile.update({'avatar': avatar, 'isFirstUse': False})
profiles.update({profile_id: profile})
return profiles