author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
106,046
11.10.2019 09:39:04
-7,200
524b7463a63c9f79e0cd2d945cc6215d8880ecd6
Updated header data of request
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/request_builder.py", "new_path": "resources/lib/services/msl/request_builder.py", "diff": "@@ -4,8 +4,9 @@ from __future__ import absolute_import, division, unicode_literals\nimport json\nimport base64\n-import subprocess\nimport random\n+import subprocess\n+import time\nfrom resources.lib.globals import g\nimport resources.lib.common as common\n@@ -71,7 +72,6 @@ class MSLRequestBuilder(object):\nheader_data = {\n'sender': esn,\n'handshake': is_handshake,\n- 'nonreplayable': False,\n'capabilities': {\n'languages': [g.LOCAL_DB.get_value('locale_id')],\n'compressionalgos': [compression] if compression else []\n@@ -79,7 +79,7 @@ class MSLRequestBuilder(object):\n'recipient': 'Netflix',\n'renewable': True,\n'messageid': self.current_message_id,\n- 'timestamp': 1467733923\n+ 'timestamp': int(time.time())\n}\n# If this is a keyrequest act different then other requests\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Updated header data of request
106,046
11.10.2019 09:44:57
-7,200
600557ff5b7964027e5e097ad935008ab85723e9
Fixed expired mastertoken When leaving a device turned on 24/24 it is necessary to verify that the mastertoken is still valid before making requests
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/android_crypto.py", "new_path": "resources/lib/services/msl/android_crypto.py", "diff": "@@ -11,7 +11,6 @@ import xbmcdrm\nimport resources.lib.common as common\nfrom .base_crypto import MSLBaseCrypto\n-from .exceptions import MastertokenExpired\nfrom .exceptions import MSLError\n@@ -36,9 +35,6 @@ class AndroidMSLCrypto(MSLBaseCrypto):\nself.hmac_key_id = base64.standard_b64decode(\nmsl_data['hmac_key_id'])\nself.crypto_session.RestoreKeys(self.keyset_id)\n-\n- except MastertokenExpired as me:\n- raise me\nexcept Exception:\nself.keyset_id = None\nself.key_id = None\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/base_crypto.py", "new_path": "resources/lib/services/msl/base_crypto.py", "diff": "@@ -8,8 +8,6 @@ import base64\nimport resources.lib.common as common\n-from .exceptions import MastertokenExpired\n-\nclass MSLBaseCrypto(object):\n\"\"\"Common base class for MSL crypto operations.\n@@ -30,13 +28,11 @@ class MSLBaseCrypto(object):\n\"\"\"Set the mastertoken and check it for validity\"\"\"\ntokendata = json.loads(\nbase64.standard_b64decode(mastertoken['tokendata']))\n- remaining_ttl = (int(tokendata['expiration']) - time.time())\n- if remaining_ttl / 60 / 60 >= 10:\nself.mastertoken = mastertoken\n+ self.serial_number = tokendata['serialnumber']\nself.sequence_number = tokendata.get('sequencenumber', 0)\n- else:\n- common.error('Mastertoken has expired')\n- raise MastertokenExpired\n+ self.renewal_window = tokendata['renewalwindow']\n+ self.expiration = tokendata['expiration']\ndef _save_msl_data(self):\n\"\"\"Save crypto keys and mastertoken to disk\"\"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/default_crypto.py", "new_path": "resources/lib/services/msl/default_crypto.py", "diff": "@@ -14,7 +14,6 @@ from Cryptodome.Cipher import AES\nimport resources.lib.common as common\nfrom .base_crypto import MSLBaseCrypto\n-from .exceptions import MastertokenExpired\nclass DefaultMSLCrypto(MSLBaseCrypto):\n@@ -31,9 +30,6 @@ class DefaultMSLCrypto(MSLBaseCrypto):\nraise ValueError('Missing encryption_key or sign_key')\nself.rsa_key = RSA.importKey(\nbase64.standard_b64decode(msl_data['rsa_key']))\n-\n- except MastertokenExpired as me:\n- raise me\nexcept Exception:\ncommon.debug('Generating new RSA keys')\nself.rsa_key = RSA.generate(2048)\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/exceptions.py", "new_path": "resources/lib/services/msl/exceptions.py", "diff": "@@ -13,7 +13,3 @@ class LicenseError(MSLError):\nclass ManifestError(MSLError):\npass\n-\n-\n-class MastertokenExpired(MSLError):\n- pass\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/msl_handler.py", "new_path": "resources/lib/services/msl/msl_handler.py", "diff": "@@ -64,21 +64,39 @@ class MSLHandler(object):\ndef __init__(self):\n# pylint: disable=broad-except\ntry:\n+ self.request_builder = None\nmsl_data = json.loads(common.load_file('msl_data.json'))\nself.request_builder = MSLRequestBuilder(msl_data)\ncommon.debug('Loaded MSL data from disk')\n+ except ValueError:\n+ self.check_mastertoken_validity()\nexcept Exception:\nimport traceback\ncommon.debug(traceback.format_exc())\n- common.debug('Stored MSL data expired or not available')\n+ common.register_slot(\n+ signal=common.Signals.ESN_CHANGED,\n+ callback=self.perform_key_handshake)\n+\n+ def check_mastertoken_validity(self):\n+ \"\"\"Return the mastertoken validity and executes a new key handshake when necessary\"\"\"\n+ if self.request_builder:\n+ time_now = time.time()\n+ renewable = self.request_builder.crypto.renewal_window < time_now\n+ expired = self.request_builder.crypto.expiration <= time_now\n+ else:\n+ renewable = False\n+ expired = True\n+ if expired:\n+ if not self.request_builder:\n+ common.debug('Stored MSL data not available, a new key handshake will be performed')\nself.request_builder = MSLRequestBuilder()\n+ else:\n+ common.debug('Stored MSL data is expired, a new key handshake will be performed')\nif self.perform_key_handshake():\nself.request_builder = MSLRequestBuilder(json.loads(\ncommon.load_file('msl_data.json')))\n- common.debug('Loaded renewed MSL data from disk')\n- common.register_slot(\n- signal=common.Signals.ESN_CHANGED,\n- callback=self.perform_key_handshake)\n+ return self.check_mastertoken_validity()\n+ return {'renewable': renewable, 'expired': expired}\n@display_error_info\[email protected]_execution(immediate=True)\n@@ -262,6 +280,8 @@ class MSLHandler(object):\[email protected]_execution(immediate=True)\ndef _chunked_request(self, endpoint, request_data, esn):\n\"\"\"Do a POST request and process the chunked response\"\"\"\n+ # Get and check mastertoken validity\n+ mt_validity = self.check_mastertoken_validity()\nchunked_response = self._process_chunked_response(\nself._post(endpoint, self.request_builder.msl_request(request_data, esn)))\nreturn chunked_response['result']\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed expired mastertoken When leaving a device turned on 24/24 it is necessary to verify that the mastertoken is still valid before making requests
106,046
11.10.2019 10:04:33
-7,200
cb22f270ca509064fe272d498d574e8c1ecc4b80
Implemented check for new mastertoken (todo) TODO: Currently no documentation on how to apply for renewal of the mastertoken without a handshake
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/base_crypto.py", "new_path": "resources/lib/services/msl/base_crypto.py", "diff": "\"\"\"Common base for crypto handlers\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n-import time\nimport json\nimport base64\n@@ -17,6 +16,27 @@ class MSLBaseCrypto(object):\nif msl_data:\nself._set_mastertoken(msl_data['tokens']['mastertoken'])\n+ def compare_mastertoken(self, mastertoken):\n+ \"\"\"Check if the new mastertoken is different from current due to renew\"\"\"\n+ if not self._mastertoken_is_newer_that(mastertoken):\n+ common.debug('MSL mastertoken is changed due to renew')\n+ self._set_mastertoken(mastertoken)\n+ self._save_msl_data()\n+\n+ def _mastertoken_is_newer_that(self, mastertoken):\n+ \"\"\"Check if current mastertoken is newer than mastertoken specified\"\"\"\n+ # Based on cadmium player sourcecode and ref. to [isNewerThan] in:\n+ # https://github.com/Netflix/msl/blob/master/core/src/main/java/com/netflix/msl/tokens/MasterToken.java\n+ new_tokendata = json.loads(\n+ base64.standard_b64decode(mastertoken['tokendata']))\n+ if new_tokendata['sequencenumber'] == self.sequence_number:\n+ return new_tokendata['expiration'] > self.expiration\n+ if new_tokendata['sequencenumber'] > self.sequence_number:\n+ cut_off = new_tokendata['sequencenumber'] - pow(2, 53) + 127\n+ return self.sequence_number >= cut_off\n+ cut_off = self.sequence_number - pow(2, 53) + 127\n+ return new_tokendata['sequencenumber'] < cut_off\n+\ndef parse_key_response(self, headerdata, save_to_disk):\n\"\"\"Parse a key response and update crypto keys\"\"\"\nself._set_mastertoken(headerdata['keyresponsedata']['mastertoken'])\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/msl_handler.py", "new_path": "resources/lib/services/msl/msl_handler.py", "diff": "@@ -283,7 +283,8 @@ class MSLHandler(object):\n# Get and check mastertoken validity\nmt_validity = self.check_mastertoken_validity()\nchunked_response = self._process_chunked_response(\n- self._post(endpoint, self.request_builder.msl_request(request_data, esn)))\n+ self._post(endpoint, self.request_builder.msl_request(request_data, esn)),\n+ mt_validity['renewable'])\nreturn chunked_response['result']\[email protected]_execution(immediate=True)\n@@ -298,8 +299,9 @@ class MSLHandler(object):\nresponse.raise_for_status()\nreturn response\n+ # pylint: disable=unused-argument\[email protected]_execution(immediate=True)\n- def _process_chunked_response(self, response):\n+ def _process_chunked_response(self, response, mt_renewable):\n\"\"\"Parse and decrypt an encrypted chunked response. Raise an error\nif the response is plaintext json\"\"\"\ntry:\n@@ -310,6 +312,10 @@ class MSLHandler(object):\n# json() failed so parse and decrypt the chunked response\ncommon.debug('Received encrypted chunked response')\nresponse = _parse_chunks(response.text)\n+ # TODO: sending for the renewal request is not yet implemented\n+ # if mt_renewable:\n+ # # Check if mastertoken is renewed\n+ # self.request_builder.crypto.compare_mastertoken(response['header']['mastertoken'])\ndecrypted_response = _decrypt_chunks(response['payloads'],\nself.request_builder.crypto)\nreturn _raise_if_error(decrypted_response)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Implemented check for new mastertoken (todo) TODO: Currently no documentation on how to apply for renewal of the mastertoken without a handshake
106,046
11.10.2019 19:59:19
-7,200
f1da581be79e9c83197c12b2d36b42d12bcc7b4d
Version bump (0.15.4)
[ { "change_type": "MODIFY", "old_path": "addon.xml", "new_path": "addon.xml", "diff": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n-<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.3\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n+<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.4\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n<requires>\n<import addon=\"xbmc.python\" version=\"2.26.0\"/>\n<import addon=\"script.module.addon.signals\" version=\"0.0.3\"/>\n<forum>https://forum.kodi.tv/showthread.php?tid=329767</forum>\n<source>https://github.com/CastagnaIT/plugin.video.netflix</source>\n<news>\n+v0.15.4 (2019-10-11)\n+-Added InputStream Helper settings in settings menu\n+-Fixed add/remove to mylist on huge lists\n+-Fixed expired mastertoken key issue\n+-Fixed skipping sections due to netflix changes\n+-Manifests now are requested only once\n+-Updated pt-br, de, es translations\n+-Minor improvements\n+\nv0.15.3 (2019-09-19)\n-Initial conversion to python 3\n-Initial integration tests\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Version bump (0.15.4)
106,046
12.10.2019 16:53:29
-7,200
d0656f080594d3bcbb7d4531ccfa6669c16193e3
Added expires time to cookie debug
[ { "change_type": "MODIFY", "old_path": "resources/lib/common/cookies.py", "new_path": "resources/lib/common/cookies.py", "diff": "@@ -66,10 +66,14 @@ def load(account_hash):\ncookie_jar.clear(domain='.netflix.com', path='/', name='flwssn')\nexcept KeyError:\npass\n- common.debug('Loaded cookies:\\n' + '\\n'.join(\n- ['{} ({}m remaining TTL'.format(cookie.name,\n- ((cookie.expires or 0) - time() / 60))\n- for cookie in cookie_jar]))\n+\n+ debug_output = 'Loaded cookies:\\n'\n+ for cookie in cookie_jar:\n+ remaining_ttl = ((cookie.expires or 0) - time() / 60) if cookie.expires else None\n+ debug_output += '{} (expires {} - remaining TTL {})\\n'.format(cookie.name,\n+ cookie.expires,\n+ remaining_ttl)\n+ common.debug(debug_output)\nif expired(cookie_jar):\nraise CookiesExpiredError()\nreturn cookie_jar\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added expires time to cookie debug
106,046
12.10.2019 16:54:25
-7,200
13da30bfb12af2aee659669dba3fa15e170e52f7
Added validate session data
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/website.py", "new_path": "resources/lib/api/website.py", "diff": "@@ -71,6 +71,17 @@ def extract_session_data(content):\n# raise InvalidMembershipStatusError(user_data.get('membershipStatus'))\n+def validate_session_data(content):\n+ \"\"\"\n+ Try calling the parsers to extract the session data, to verify the login\n+ \"\"\"\n+ common.debug('Validating session data...')\n+ extract_json(content, 'falcorCache')\n+ react_context = extract_json(content, 'reactContext')\n+ extract_userdata(react_context, False)\n+ extract_api_data(react_context, False)\n+\n+\[email protected]_execution(immediate=True)\ndef extract_profiles(falkor_cache):\n\"\"\"Extract profile information from Netflix website\"\"\"\n@@ -122,7 +133,7 @@ def _get_avatar(falkor_cache, profile):\[email protected]_execution(immediate=True)\n-def extract_userdata(react_context):\n+def extract_userdata(react_context, debug_log=True):\n\"\"\"Extract essential userdata from the reactContext of the webpage\"\"\"\ncommon.debug('Extracting userdata from webpage')\nuser_data = {}\n@@ -131,14 +142,14 @@ def extract_userdata(react_context):\ntry:\nextracted_value = {path[-1]: common.get_path(path, react_context)}\nuser_data.update(extracted_value)\n- if 'esn' not in path:\n+ if 'esn' not in path and debug_log:\ncommon.debug('Extracted {}'.format(extracted_value))\nexcept (AttributeError, KeyError):\ncommon.debug('Could not extract {}'.format(path))\nreturn user_data\n-def extract_api_data(react_context):\n+def extract_api_data(react_context, debug_log=True):\n\"\"\"Extract api urls from the reactContext of the webpage\"\"\"\ncommon.debug('Extracting api urls from webpage')\napi_data = {}\n@@ -147,6 +158,7 @@ def extract_api_data(react_context):\ntry:\nextracted_value = {key: common.get_path(path, react_context)}\napi_data.update(extracted_value)\n+ if debug_log:\ncommon.debug('Extracted {}'.format(extracted_value))\nexcept (AttributeError, KeyError):\ncommon.debug('Could not extract {}'.format(path))\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added validate session data
106,046
12.10.2019 16:59:54
-7,200
b5e66cc9f43f87788fdb1f12c10541f12799b466
Fixed double request to key handshake
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "@@ -93,7 +93,8 @@ class NetflixSession(object):\nreturn urlsafe_b64encode(\ncommon.get_credentials().get('email', 'NoMail'))\n- def update_session_data(self, old_esn=g.get_esn()):\n+ def update_session_data(self, old_esn=None):\n+ old_esn = old_esn or g.get_esn()\nself.session.headers.update(\n{'x-netflix.request.client.user.guid': g.LOCAL_DB.get_active_profile_guid()})\ncookies.save(self.account_hash, self.session.cookies)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed double request to key handshake
106,046
12.10.2019 17:14:29
-7,200
54781e12a3da3543bf95672896a39ee9794eda77
Fixed an issue introduced with Fixed a problem due to the possible lack of the esn, causing a login error
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/base_crypto.py", "new_path": "resources/lib/services/msl/base_crypto.py", "diff": "@@ -15,6 +15,8 @@ class MSLBaseCrypto(object):\ndef __init__(self, msl_data=None):\nif msl_data:\nself._set_mastertoken(msl_data['tokens']['mastertoken'])\n+ else:\n+ self.mastertoken = None\ndef compare_mastertoken(self, mastertoken):\n\"\"\"Check if the new mastertoken is different from current due to renew\"\"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/msl_handler.py", "new_path": "resources/lib/services/msl/msl_handler.py", "diff": "@@ -63,12 +63,16 @@ class MSLHandler(object):\ndef __init__(self):\n# pylint: disable=broad-except\n- try:\nself.request_builder = None\n+ try:\nmsl_data = json.loads(common.load_file('msl_data.json'))\n- self.request_builder = MSLRequestBuilder(msl_data)\ncommon.debug('Loaded MSL data from disk')\n- except ValueError:\n+ except Exception:\n+ msl_data = None\n+ try:\n+ self.request_builder = MSLRequestBuilder(msl_data)\n+ # Addon just installed, the service starts but there is no esn\n+ if g.get_esn():\nself.check_mastertoken_validity()\nexcept Exception:\nimport traceback\n@@ -79,7 +83,7 @@ class MSLHandler(object):\ndef check_mastertoken_validity(self):\n\"\"\"Return the mastertoken validity and executes a new key handshake when necessary\"\"\"\n- if self.request_builder:\n+ if self.request_builder.crypto.mastertoken:\ntime_now = time.time()\nrenewable = self.request_builder.crypto.renewal_window < time_now\nexpired = self.request_builder.crypto.expiration <= time_now\n@@ -87,7 +91,7 @@ class MSLHandler(object):\nrenewable = False\nexpired = True\nif expired:\n- if not self.request_builder:\n+ if not self.request_builder.crypto.mastertoken:\ncommon.debug('Stored MSL data not available, a new key handshake will be performed')\nself.request_builder = MSLRequestBuilder()\nelse:\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed an issue introduced with 9c75153e25c663e387527a247770f54d250432c7 Fixed a problem due to the possible lack of the esn, causing a login error
106,046
12.10.2019 20:51:09
-7,200
0d83e552ccac2a83a4ea9f1cfdfdc987c25f6572
Version bump (0.15.5)
[ { "change_type": "MODIFY", "old_path": "addon.xml", "new_path": "addon.xml", "diff": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n-<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.4\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n+<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.5\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n<requires>\n<import addon=\"xbmc.python\" version=\"2.26.0\"/>\n<import addon=\"script.module.addon.signals\" version=\"0.0.3\"/>\n<forum>https://forum.kodi.tv/showthread.php?tid=329767</forum>\n<source>https://github.com/CastagnaIT/plugin.video.netflix</source>\n<news>\n+v0.15.5 (2019-10-12)\n+-Speedup loading lists due to the new login validity check\n+-Cookies expires are now used to check a valid login\n+-Fixed an issue introduced with previous version causing login error\n+-Fixed double handshake request on first run\n+\nv0.15.4 (2019-10-11)\n-Added InputStream Helper settings in settings menu\n-Fixed add/remove to mylist on huge lists\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Version bump (0.15.5)
106,046
17.10.2019 00:37:48
-7,200
2e71c4913dcb1f1c20f5b28c69ce8a9f86b5539c
Increased default cache ttl
[ { "change_type": "MODIFY", "old_path": "resources/settings.xml", "new_path": "resources/settings.xml", "diff": "<setting id=\"ssl_verification\" type=\"bool\" label=\"30024\" default=\"true\"/>\n<setting id=\"esn\" type=\"text\" label=\"30034\" value=\"\" default=\"\"/>\n<setting label=\"30117\" type=\"lsep\"/>\n- <setting id=\"cache_ttl\" type=\"slider\" option=\"int\" range=\"0,10,525600\" label=\"30084\" default=\"10\"/>\n+ <setting id=\"cache_ttl\" type=\"slider\" option=\"int\" range=\"0,10,525600\" label=\"30084\" default=\"120\"/>\n<setting id=\"cache_metadata_ttl\" type=\"slider\" option=\"int\" range=\"0,1,365\" label=\"30085\" default=\"30\"/>\n<setting id=\"purge_inmemory_cache\" type=\"action\" label=\"30132\" action=\"RunPlugin(plugin://plugin.video.netflix/action/purge_cache/)\"/>\n<setting id=\"purge_complete_cache\" type=\"action\" label=\"30133\" action=\"RunPlugin(plugin://plugin.video.netflix/action/purge_cache/?on_disk=True)\"/>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Increased default cache ttl
106,046
17.10.2019 17:57:47
-7,200
44262f234b2be233f55f6cba6014bd17f7284064
Fixed missing identifier in video_list_sorted
[ { "change_type": "MODIFY", "old_path": "resources/lib/navigation/directory.py", "new_path": "resources/lib/navigation/directory.py", "diff": "@@ -89,7 +89,7 @@ class DirectoryBuilder(object):\nmainmenu_data = menu_data['main_menu']\nif menu_data.get('request_context_name', None) and g.is_known_menu_context(pathitems[2]):\nlistings.build_video_listing(\n- api.video_list_sorted(context_name=menu_data['request_context_name'],\n+ api.video_list_sorted(menu_data['request_context_name'],\nperpetual_range_start=self.perpetual_range_start,\nmenu_data=mainmenu_data),\nmenu_data, pathitems)\n@@ -97,7 +97,7 @@ class DirectoryBuilder(object):\n# Dynamic IDs for common video lists\nlist_id = None if pathitems[2] == 'None' else pathitems[2]\nlistings.build_video_listing(\n- api.video_list_sorted(context_name=menu_data['request_context_name'],\n+ api.video_list_sorted(menu_data['request_context_name'],\ncontext_id=list_id,\nperpetual_range_start=self.perpetual_range_start,\nmenu_data=mainmenu_data),\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed missing identifier in video_list_sorted
106,046
17.10.2019 18:05:52
-7,200
9b34bdd2c9421adb2da5652148f8e22ab5da393f
Cleanup and improved speed of add/remove to mylist
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/paths.py", "new_path": "resources/lib/api/paths.py", "diff": "@@ -39,7 +39,7 @@ VIDEO_LIST_PARTIAL_PATHS = [\n] + ART_PARTIAL_PATHS\nVIDEO_LIST_BASIC_PARTIAL_PATHS = [\n- [['title', 'queue', 'watched']]\n+ [['title', 'queue', 'watched', 'summary', 'type', 'id']]\n]\nGENRE_PARTIAL_PATHS = [\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/api/shakti.py", "new_path": "resources/lib/api/shakti.py", "diff": "@@ -251,33 +251,40 @@ def single_info(videoid):\nreturn common.make_call('path_request', paths)\n-def custom_video_list_basicinfo(list_id):\n- \"\"\"Retrieve a single video list\n+def custom_video_list_basicinfo(context_name):\n+ \"\"\"\n+ Retrieve a single video list\nused only to know which videos are in my list without requesting additional information\n\"\"\"\n- common.debug('Requesting custom video list basic info {}'.format(list_id))\n- paths = build_paths(['lists', list_id, RANGE_SELECTOR, 'reference'],\n+ common.debug('Requesting custom video list basic info for {}'.format(context_name))\n+ paths = build_paths([context_name, 'az', RANGE_SELECTOR],\nVIDEO_LIST_BASIC_PARTIAL_PATHS)\ncallargs = {\n'paths': paths,\n- 'length_params': ['stdlist', ['lists', list_id]],\n+ 'length_params': ['stdlist', [context_name, 'az']],\n'perpetual_range_start': None,\n'no_limit_req': True\n}\n# When the list is empty the server returns an empty response\npath_response = common.make_call('perpetual_path_request', callargs)\n- return {} if not path_response else VideoList(path_response)\n+ return {} if not path_response else VideoListSorted(path_response, context_name, None, 'az')\[email protected]_output(g, cache.CACHE_COMMON, fixed_identifier='my_list_items')\n+# Custom ttl to mylist_items (ttl=10min*60)\n+# We can not have the changes in real-time, if my-list is modified using other apps,\n+# every 10 minutes will be updated with the new data\n+# Never disable the cache to this function, it would cause plentiful requests to the service!\[email protected]_output(g, cache.CACHE_COMMON, fixed_identifier='my_list_items', ttl=600)\ndef mylist_items():\n\"\"\"Return a list of all the items currently contained in my list\"\"\"\ncommon.debug('Try to perform a request to get the id list of the videos in my list')\ntry:\nitems = []\n- videos = custom_video_list_basicinfo(list_id_for_type(g.MAIN_MENU_ITEMS['myList']['lolomo_contexts'][0]))\n+ videos = custom_video_list_basicinfo(g.MAIN_MENU_ITEMS['myList']['request_context_name'])\nif videos:\n- items = [video_id for video_id, video in videos.videos.iteritems()\n+ # pylint: disable=unused-variable\n+ items = [common.VideoId.from_videolist_item(video)\n+ for video_id, video in videos.videos.iteritems()\nif video['queue'].get('inQueue', False)]\nreturn items\nexcept InvalidVideoListTypeError:\n@@ -318,13 +325,18 @@ def update_my_list(videoid, operation):\n'videoId': int(videoid_value)}})\nui.show_notification(common.get_local_string(30119))\ntry:\n- g.CACHE.invalidate_entry(cache.CACHE_COMMON, list_id_for_type('queue'))\n- except InvalidVideoListTypeError:\n- pass\n- g.CACHE.invalidate_entry(cache.CACHE_COMMON, 'queue')\n+ # This is necessary to have the my-list menu updated when you open it\n+ if operation == 'remove':\n+ # Delete item manually to speedup operations on page load\n+ cached_video_list_sorted = g.CACHE.get(cache.CACHE_COMMON, 'mylist')\n+ del cached_video_list_sorted.videos[videoid.value]\n+ else:\n+ # Force reload items on page load\ng.CACHE.invalidate_entry(cache.CACHE_COMMON, 'mylist')\n+ except cache.CacheMiss:\n+ pass\n+ # Invalidate my_list_items to allow reload updated my_list_items results when page refresh\ng.CACHE.invalidate_entry(cache.CACHE_COMMON, 'my_list_items')\n- g.CACHE.invalidate_entry(cache.CACHE_COMMON, 'root_lists')\[email protected]_execution(immediate=False)\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/context_menu.py", "new_path": "resources/lib/kodi/context_menu.py", "diff": "@@ -66,7 +66,7 @@ def generate_context_menu_items(videoid):\nif videoid.mediatype in [common.VideoId.MOVIE, common.VideoId.SHOW] \\\nand not g.LOCAL_DB.get_profile_config('isKids', False):\nlist_action = ('remove_from_list'\n- if videoid.value in api.mylist_items()\n+ if videoid in api.mylist_items()\nelse 'add_to_list')\nitems.insert(0, _ctx_item(list_action, videoid))\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Cleanup and improved speed of add/remove to mylist
106,046
17.10.2019 18:06:49
-7,200
82bb629bd5e5b88a24262a62a6da1a6450ba7d96
Fixed library full sync from '92 elements bug'
[ { "change_type": "MODIFY", "old_path": "resources/lib/navigation/library.py", "new_path": "resources/lib/navigation/library.py", "diff": "@@ -84,6 +84,7 @@ class LibraryActionExecutor(object):\ndef initial_mylist_sync(self, pathitems):\n\"\"\"Perform an initial sync of My List and the Kodi library\"\"\"\n# pylint: disable=unused-argument\n+ from resources.lib.cache import CACHE_COMMON\ndo_it = ui.ask_for_confirmation(common.get_local_string(30122),\ncommon.get_local_string(30123))\nif not do_it or not g.ADDON.getSettingBool('mylist_library_sync'):\n@@ -92,8 +93,9 @@ class LibraryActionExecutor(object):\nlibrary.purge()\nnfo_settings = nfo.NFOSettings()\nnfo_settings.show_export_dialog()\n- for videoid in api.video_list(\n- api.list_id_for_type('queue')).videoids:\n+ # Invalidate my-list cached data to force to obtain new data\n+ g.CACHE.invalidate_entry(CACHE_COMMON, 'my_list_items')\n+ for videoid in api.mylist_items():\nlibrary.execute_library_tasks(videoid, [library.export_item],\ncommon.get_local_string(30018),\nsync_mylist=False,\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed library full sync from '92 elements bug'
106,046
17.10.2019 18:12:01
-7,200
06e4ecef6a2ecd6eec77398318e0609fde66fc5b
Added menu to force mylist update
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -871,3 +871,8 @@ msgstr \"\"\nmsgctxt \"#30213\"\nmsgid \"InputStream Helper settings...\"\nmsgstr \"\"\n+\n+msgctxt \"#30214\"\n+msgid \"Force the update of my list\"\n+msgstr \"\"\n+\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/context_menu.py", "new_path": "resources/lib/kodi/context_menu.py", "diff": "@@ -48,9 +48,22 @@ CONTEXT_MENU_ACTIONS = {\n'trailer': {\n'label': common.get_local_string(30179),\n'url': ctx_item_url(['trailer'])},\n+ 'force_update_mylist': {\n+ 'label': common.get_local_string(30214),\n+ 'url': ctx_item_url(['force_update_mylist'])}\n}\n+def generate_context_menu_mainmenu(menu_id):\n+ \"\"\"Generate context menu items for a listitem\"\"\"\n+ items = []\n+\n+ if menu_id == 'myList':\n+ items.append(_ctx_item('force_update_mylist', None))\n+\n+ return items\n+\n+\ndef generate_context_menu_items(videoid):\n\"\"\"Generate context menu items for a listitem\"\"\"\nitems = _generate_library_ctx_items(videoid)\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/listings.py", "new_path": "resources/lib/kodi/listings.py", "diff": "@@ -14,7 +14,7 @@ from resources.lib.globals import g\nimport resources.lib.common as common\nfrom .infolabels import add_info, add_art\n-from .context_menu import generate_context_menu_items\n+from .context_menu import generate_context_menu_items, generate_context_menu_mainmenu\ndef custom_viewmode(partial_setting_id):\n@@ -105,10 +105,10 @@ def build_main_menu_listing(lolomo):\nif data['lolomo_known']:\nfor list_id, user_list in lolomo.lists_by_context(data['lolomo_contexts'],\nbreak_on_first=True):\n- directory_items.append(_create_videolist_item(list_id,\n- user_list,\n- data,\n- static_lists=True))\n+ videolist_item = _create_videolist_item(list_id, user_list, data,\n+ static_lists=True)\n+ videolist_item[1].addContextMenuItems(generate_context_menu_mainmenu(menu_id))\n+ directory_items.append(videolist_item)\nmenu_title = user_list['displayName']\nelse:\nif data['label_id']:\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/navigation/actions.py", "new_path": "resources/lib/navigation/actions.py", "diff": "@@ -96,6 +96,12 @@ class AddonActionExecutor(object):\nif not self.params.get('no_notification', False):\nui.show_notification(common.get_local_string(30135))\n+ def force_update_mylist(self, pathitems=None):\n+ \"\"\"Clear the cache of my list to force the update\"\"\"\n+ from resources.lib.cache import CACHE_COMMON\n+ g.CACHE.invalidate_entry(CACHE_COMMON, 'mylist')\n+ g.CACHE.invalidate_entry(CACHE_COMMON, 'my_list_items')\n+\ndef _sync_library(videoid, operation):\noperation = {\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added menu to force mylist update
106,046
17.10.2019 18:30:19
-7,200
a1c2590f66e9b9b127f7d531f1dec38bb85e6f39
Added option to highlight titles contained in my list
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -876,3 +876,6 @@ msgctxt \"#30214\"\nmsgid \"Force the update of my list\"\nmsgstr \"\"\n+msgctxt \"#30215\"\n+msgid \"Highlight titles included in my list with a color\"\n+msgstr \"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/infolabels.py", "new_path": "resources/lib/kodi/infolabels.py", "diff": "\"\"\"Helper functions for setting infolabels of list items\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n-from resources.lib.globals import g\n-import resources.lib.common as common\n-import resources.lib.cache as cache\n+import re\n+\nimport resources.lib.api.paths as paths\n+import resources.lib.api.shakti as api\n+import resources.lib.cache as cache\n+import resources.lib.common as common\nimport resources.lib.kodi.library as library\n+from resources.lib.globals import g\nQUALITIES = [\n{'codec': 'h264', 'width': '960', 'height': '540'},\n@@ -20,7 +23,7 @@ JSONRPC_MAPPINGS = {\n}\n-def add_info(videoid, list_item, item, raw_data):\n+def add_info(videoid, list_item, item, raw_data, set_info=False):\n\"\"\"Add infolabels to the list_item. The passed in list_item is modified\nin place and the infolabels are returned.\"\"\"\n# pylint: disable=too-many-locals\n@@ -33,15 +36,19 @@ def add_info(videoid, list_item, item, raw_data):\ng.CACHE.add(cache.CACHE_INFOLABELS, videoid,\n{'infos': infos, 'quality_infos': quality_infos},\nttl=g.CACHE_METADATA_TTL, to_disk=True)\n- list_item.setInfo('video', infos)\nif videoid.mediatype == common.VideoId.EPISODE or \\\nvideoid.mediatype == common.VideoId.MOVIE or \\\nvideoid.mediatype == common.VideoId.SUPPLEMENTAL:\nlist_item.setProperty('isFolder', 'false')\nlist_item.setProperty('IsPlayable', 'true')\n+ else:\n+ list_item.setProperty('isFolder', 'true')\n+ if set_info:\n+ list_item.setInfo('video', infos)\nfor stream_type, quality_infos in quality_infos.iteritems():\nlist_item.addStreamInfo(stream_type, quality_infos)\n- return infos\n+ # Return a copy to not reflect next changes to the dictionary also to the cache\n+ return infos.copy()\ndef add_art(videoid, list_item, item, raw_data=None):\n@@ -196,15 +203,13 @@ def _best_art(arts):\ndef add_info_from_netflix(videoid, list_item):\n\"\"\"Apply infolabels with info from Netflix API\"\"\"\ntry:\n- infos = add_info(videoid, list_item, None, None)\n+ infos = add_info(videoid, list_item, None, None, True)\nart = add_art(videoid, list_item, None)\ncommon.debug('Got infolabels and art from cache')\nexcept (AttributeError, TypeError):\ncommon.info('Infolabels or art were not in cache, retrieving from API')\n- import resources.lib.api.shakti as api\napi_data = api.single_info(videoid)\n- infos = add_info(videoid, list_item, api_data['videos'][videoid.value],\n- api_data)\n+ infos = add_info(videoid, list_item, api_data['videos'][videoid.value], api_data, True)\nart = add_art(videoid, list_item, api_data['videos'][videoid.value])\nreturn infos, art\n@@ -240,3 +245,32 @@ def _sanitize_infos(details):\ndetails[target] = details.pop(source)\nfor prop in ['file', 'label', 'runtime']:\ndetails.pop(prop, None)\n+\n+\n+def add_highlighted_title(list_item, videoid, infos):\n+ \"\"\"Highlight menu item title when the videoid is contained in my-list\"\"\"\n+ highlight_index = g.ADDON.getSettingInt('highlight_mylist_titles')\n+ if not highlight_index:\n+ return\n+ highlight_color = ['black', 'blue', 'red', 'green', 'white', 'yellow'][highlight_index]\n+ remove_color = videoid not in api.mylist_items()\n+ if list_item.getProperty('isFolder') == 'true':\n+ updated_title = _colorize_title(list_item.getVideoInfoTag().getTitle().decode(\"utf-8\"),\n+ highlight_color,\n+ remove_color)\n+ list_item.setLabel(updated_title)\n+ infos['title'] = updated_title\n+ else:\n+ # When menu item is not a folder 'label' is replaced by 'title' property of infoLabel\n+ infos['title'] = _colorize_title(infos['title'], highlight_color, remove_color)\n+\n+\n+def _colorize_title(text, color, remove_color=False):\n+ matches = re.match(r'(\\[COLOR\\s.+\\])(.*)(\\[/COLOR\\])', text)\n+ if remove_color:\n+ if matches:\n+ return matches.groups()[1]\n+ else:\n+ if not matches:\n+ return '[COLOR {}]{}[/COLOR]'.format(color, text)\n+ return text\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/listings.py", "new_path": "resources/lib/kodi/listings.py", "diff": "@@ -13,7 +13,7 @@ from resources.lib.database.db_utils import (TABLE_MENU_DATA)\nfrom resources.lib.globals import g\nimport resources.lib.common as common\n-from .infolabels import add_info, add_art\n+from .infolabels import add_info, add_art, add_highlighted_title\nfrom .context_menu import generate_context_menu_items, generate_context_menu_mainmenu\n@@ -182,7 +182,10 @@ def _create_videolist_item(video_list_id, video_list, menu_data, static_lists=Fa\npath = 'video_list_sorted'\npathitems = [path, menu_data['path'][1], video_list_id]\nlist_item = list_item_skeleton(video_list['displayName'])\n- add_info(video_list.id, list_item, video_list, video_list.data)\n+ infos = add_info(video_list.id, list_item, video_list, video_list.data)\n+ if not static_lists:\n+ add_highlighted_title(list_item, video_list.id, infos)\n+ list_item.setInfo('video', infos)\nif video_list.artitem:\nadd_art(video_list.id, list_item, video_list.artitem)\nurl = common.build_url(pathitems,\n@@ -234,7 +237,7 @@ def _create_subgenre_item(video_list_id, subgenre_data, menu_data):\[email protected]_execution(immediate=False)\ndef build_video_listing(video_list, menu_data, pathitems=None, genre_id=None):\n\"\"\"Build a video listing\"\"\"\n- directory_items = [_create_video_item(videoid_value, video, video_list)\n+ directory_items = [_create_video_item(videoid_value, video, video_list, menu_data)\nfor videoid_value, video\nin video_list.videos.iteritems()]\n# If genre_id exists add possibility to browse lolomos subgenres\n@@ -272,14 +275,17 @@ def build_video_listing(video_list, menu_data, pathitems=None, genre_id=None):\[email protected]_execution(immediate=False)\n-def _create_video_item(videoid_value, video, video_list):\n+def _create_video_item(videoid_value, video, video_list, menu_data):\n\"\"\"Create a tuple that can be added to a Kodi directory that represents\na video as listed in a videolist\"\"\"\nis_movie = video['summary']['type'] == 'movie'\nvideoid = common.VideoId(\n**{('movieid' if is_movie else 'tvshowid'): videoid_value})\nlist_item = list_item_skeleton(video['title'])\n- add_info(videoid, list_item, video, video_list.data)\n+ infos = add_info(videoid, list_item, video, video_list.data)\n+ if menu_data['path'][1] != 'myList':\n+ add_highlighted_title(list_item, videoid, infos)\n+ list_item.setInfo('video', infos)\nadd_art(videoid, list_item, video)\nurl = common.build_url(videoid=videoid,\nmode=(g.MODE_PLAY\n@@ -309,7 +315,7 @@ def _create_season_item(tvshowid, seasonid_value, season, season_list):\na season as listed in a season listing\"\"\"\nseasonid = tvshowid.derive_season(seasonid_value)\nlist_item = list_item_skeleton(season['summary']['name'])\n- add_info(seasonid, list_item, season, season_list.data)\n+ add_info(seasonid, list_item, season, season_list.data, True)\nadd_art(tvshowid, list_item, season_list.tvshow)\nlist_item.addContextMenuItems(generate_context_menu_items(seasonid))\nurl = common.build_url(videoid=seasonid, mode=g.MODE_DIRECTORY)\n@@ -337,7 +343,7 @@ def _create_episode_item(seasonid, episodeid_value, episode, episode_list):\nan episode as listed in an episode listing\"\"\"\nepisodeid = seasonid.derive_episode(episodeid_value)\nlist_item = list_item_skeleton(episode['title'])\n- add_info(episodeid, list_item, episode, episode_list.data)\n+ add_info(episodeid, list_item, episode, episode_list.data, True)\nadd_art(episodeid, list_item, episode)\nlist_item.addContextMenuItems(generate_context_menu_items(episodeid))\nurl = common.build_url(videoid=episodeid, mode=g.MODE_PLAY)\n@@ -362,7 +368,7 @@ def _create_supplemental_item(videoid_value, video, video_list):\nvideoid = common.VideoId(\n**{'supplementalid': videoid_value})\nlist_item = list_item_skeleton(video['title'])\n- add_info(videoid, list_item, video, video_list.data)\n+ add_info(videoid, list_item, video, video_list.data, True)\nadd_art(videoid, list_item, video)\nurl = common.build_url(videoid=videoid,\nmode=g.MODE_PLAY)\n" }, { "change_type": "MODIFY", "old_path": "resources/settings.xml", "new_path": "resources/settings.xml", "diff": "<setting id=\"ishelper_settings\" type=\"action\" label=\"30213\" action=\"Addon.OpenSettings(script.module.inputstreamhelper)\" option=\"close\"/>\n</category>\n<category label=\"30025\"><!--Library-->\n+ <setting id=\"highlight_mylist_titles\" type=\"enum\" label=\"30215\" lvalues=\"13106|762|13343|13341|761|760\" default=\"1\"/>\n+ <setting type=\"sep\"/>\n<setting id=\"enablelibraryfolder\" type=\"bool\" label=\"30026\" default=\"false\"/>\n<setting id=\"customlibraryfolder\" type=\"folder\" label=\"30027\" enable=\"eq(-1,true)\" default=\"special://profile/addon_data/plugin.video.netflix\" source=\"auto\" option=\"writeable\" subsetting=\"true\"/>\n<setting id=\"mylist_library_sync\" type=\"bool\" label=\"30114\" default=\"false\"/>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added option to highlight titles contained in my list
106,046
20.10.2019 10:10:27
-7,200
ae214466132424dbccc88d0f023e80fcc8ffefbd
Fixed wrong position of append kwarg value
[ { "change_type": "MODIFY", "old_path": "resources/lib/cache.py", "new_path": "resources/lib/cache.py", "diff": "@@ -99,10 +99,10 @@ def _get_identifier(fixed_identifier, identify_from_kwarg_name,\nidentifier = fixed_identifier\nelse:\nidentifier = kwargs.get(identify_from_kwarg_name)\n- if identifier and identify_append_from_kwarg_name and kwargs.get(identify_append_from_kwarg_name):\n- identifier = identifier + '_' + kwargs.get(identify_append_from_kwarg_name)\nif not identifier and args:\nidentifier = args[identify_fallback_arg_index]\n+ if identifier and identify_append_from_kwarg_name and kwargs.get(identify_append_from_kwarg_name):\n+ identifier += '_' + kwargs.get(identify_append_from_kwarg_name)\n# common.debug('Get_identifier identifier value: {}'.format(identifier if identifier else 'None'))\nreturn identifier\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed wrong position of append kwarg value
106,046
20.10.2019 13:20:30
-7,200
d8b593a96ffa7b2230554a2bf6558f863f430322
Catch a license error
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/msl_handler.py", "new_path": "resources/lib/services/msl/msl_handler.py", "diff": "@@ -335,7 +335,15 @@ def _process_json_response(response):\ndef _raise_if_error(decoded_response):\n+ raise_error = False\n+ # Catch a manifest/chunk error\nif any(key in decoded_response for key in ['error', 'errordata']):\n+ raise_error = True\n+ # Catch a license error\n+ if 'result' in decoded_response and isinstance(decoded_response.get('result'), list):\n+ if 'error' in decoded_response['result'][0]:\n+ raise_error = True\n+ if raise_error:\ncommon.error('Full MSL error information:')\ncommon.error(json.dumps(decoded_response))\nraise MSLError(_get_error_details(decoded_response))\n@@ -343,13 +351,20 @@ def _raise_if_error(decoded_response):\ndef _get_error_details(decoded_response):\n+ # Catch a chunk error\nif 'errordata' in decoded_response:\nreturn json.loads(\nbase64.standard_b64decode(\ndecoded_response['errordata']))['errormsg']\n+ # Catch a manifest error\nif 'error' in decoded_response:\nif decoded_response['error'].get('errorDisplayMessage'):\nreturn decoded_response['error']['errorDisplayMessage']\n+ # Catch a license error\n+ if 'result' in decoded_response and isinstance(decoded_response.get('result'), list):\n+ if 'error' in decoded_response['result'][0]:\n+ if decoded_response['result'][0]['error'].get('errorDisplayMessage'):\n+ return decoded_response['result'][0]['error']['errorDisplayMessage']\nreturn 'Unhandled error check log.'\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Catch a license error
106,046
20.10.2019 13:21:18
-7,200
a5ab58c4fa68c905a39ff12e88c852985c6bed71
Check mastertoken validity only to a manifest request
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/msl_handler.py", "new_path": "resources/lib/services/msl/msl_handler.py", "diff": "@@ -234,8 +234,12 @@ class MSLHandler(object):\n'echo': ''\n}\n+ # Get and check mastertoken validity\n+ mt_validity = self.check_mastertoken_validity()\nmanifest = self._chunked_request(ENDPOINTS['manifest'],\n- manifest_request_data, esn)\n+ manifest_request_data,\n+ esn,\n+ mt_validity)\n# Save the manifest to disk as reference\ncommon.save_file('manifest.json', json.dumps(manifest))\n# Save the manifest to the cache to retrieve it during its validity\n@@ -282,13 +286,11 @@ class MSLHandler(object):\nreturn convert_to_dash(manifest)\[email protected]_execution(immediate=True)\n- def _chunked_request(self, endpoint, request_data, esn):\n+ def _chunked_request(self, endpoint, request_data, esn, mt_validity=None):\n\"\"\"Do a POST request and process the chunked response\"\"\"\n- # Get and check mastertoken validity\n- mt_validity = self.check_mastertoken_validity()\nchunked_response = self._process_chunked_response(\nself._post(endpoint, self.request_builder.msl_request(request_data, esn)),\n- mt_validity['renewable'])\n+ mt_validity['renewable'] if mt_validity else None)\nreturn chunked_response['result']\[email protected]_execution(immediate=True)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Check mastertoken validity only to a manifest request
106,046
22.10.2019 08:43:05
-7,200
fc3b331a37dcd213c22c78bb0940f17b3ba3dbc0
Added supplemental info about tvshow/movie
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/paths.py", "new_path": "resources/lib/api/paths.py", "diff": "@@ -33,7 +33,7 @@ VIDEO_LIST_PARTIAL_PATHS = [\n[['summary', 'title', 'synopsis', 'regularSynopsis', 'evidence', 'queue',\n'episodeCount', 'info', 'maturity', 'runtime', 'seasonCount',\n'releaseYear', 'userRating', 'numSeasonsLabel', 'bookmarkPosition',\n- 'watched', 'delivery']],\n+ 'dpSupplementalMessage', 'watched', 'delivery']],\n[['genres', 'tags', 'creators', 'directors', 'cast'],\n{'from': 0, 'to': 10}, ['id', 'name']]\n] + ART_PARTIAL_PATHS\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/infolabels.py", "new_path": "resources/lib/kodi/infolabels.py", "diff": "@@ -33,8 +33,9 @@ def add_info(videoid, list_item, item, raw_data, set_info=False):\nquality_infos = cache_entry['quality_infos']\nexcept cache.CacheMiss:\ninfos, quality_infos = parse_info(videoid, item, raw_data)\n+ # Use a copy of dict to not reflect future changes to the dictionary also to the cache\ng.CACHE.add(cache.CACHE_INFOLABELS, videoid,\n- {'infos': infos, 'quality_infos': quality_infos},\n+ {'infos': infos.copy(), 'quality_infos': quality_infos},\nttl=g.CACHE_METADATA_TTL, to_disk=True)\nif videoid.mediatype == common.VideoId.EPISODE or \\\nvideoid.mediatype == common.VideoId.MOVIE or \\\n@@ -47,8 +48,10 @@ def add_info(videoid, list_item, item, raw_data, set_info=False):\nlist_item.setInfo('video', infos)\nfor stream_type, quality_infos in quality_infos.iteritems():\nlist_item.addStreamInfo(stream_type, quality_infos)\n- # Return a copy to not reflect next changes to the dictionary also to the cache\n- return infos.copy()\n+ if item.get('dpSupplementalMessage'):\n+ # Short information about future release of tv show season or other\n+ infos['plot'] += ' [COLOR green]{}[/COLOR]'.format(item['dpSupplementalMessage'])\n+ return infos\ndef add_art(videoid, list_item, item, raw_data=None):\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added supplemental info about tvshow/movie
106,046
22.10.2019 09:01:39
-7,200
d3976c7a7d5a5cf05167a507ddbe6eadc801c312
Fixed purge cache wrong path of files
[ { "change_type": "MODIFY", "old_path": "resources/lib/common/fileops.py", "new_path": "resources/lib/common/fileops.py", "diff": "@@ -93,7 +93,7 @@ def list_dir(data_path=g.DATA_PATH):\ndef delete_folder_contents(path):\n\"\"\"Delete all files in a folder\"\"\"\nfor filename in list_dir(path)[1]:\n- xbmcvfs.delete(filename)\n+ xbmcvfs.delete(os.path.join(path, filename))\ndef delete_ndb_files(data_path=g.DATA_PATH):\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed purge cache wrong path of files
106,046
22.10.2019 09:17:10
-7,200
f912acc742df3dcbe24697953d39037939c9d5b4
Added lenght of trailer video
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/paths.py", "new_path": "resources/lib/api/paths.py", "diff": "@@ -77,7 +77,7 @@ INFO_MAPPINGS = {\n}\nTRAILER_PARTIAL_PATHS = [\n- [['availability', 'summary', 'synopsis', 'title', 'trackId', 'delivery']]\n+ [['availability', 'summary', 'synopsis', 'title', 'trackId', 'delivery', 'runtime']]\n] + ART_PARTIAL_PATHS\nINFO_TRANSFORMATIONS = {\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added lenght of trailer video
106,046
22.10.2019 09:17:37
-7,200
30953d12fcbb6758edda30377783f349c1f43f76
Fixed InvalidVideoId error when play a trailer
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/shakti.py", "new_path": "resources/lib/api/shakti.py", "diff": "@@ -240,7 +240,8 @@ def supplemental_video_list(videoid, supplemental_type):\[email protected]_output(g, cache.CACHE_COMMON)\ndef single_info(videoid):\n\"\"\"Retrieve info for a single episode\"\"\"\n- if videoid.mediatype not in [common.VideoId.EPISODE, common.VideoId.MOVIE]:\n+ if videoid.mediatype not in [common.VideoId.EPISODE, common.VideoId.MOVIE,\n+ common.VideoId.SUPPLEMENTAL]:\nraise common.InvalidVideoId('Cannot request info for {}'\n.format(videoid))\ncommon.debug('Requesting info for {}'.format(videoid))\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed InvalidVideoId error when play a trailer
106,046
22.10.2019 18:42:56
-7,200
dde64db22be196f64c59d715f6e42bbfd4ea3e0d
Reworked settings general menu
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -84,6 +84,10 @@ msgctxt \"#30014\"\nmsgid \"Account\"\nmsgstr \"\"\n+msgctxt \"#30015\"\n+msgid \"Other options\"\n+msgstr \"\"\n+\nmsgctxt \"#30017\"\nmsgid \"Logout\"\nmsgstr \"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/language/resource.language.it_it/strings.po", "new_path": "resources/language/resource.language.it_it/strings.po", "diff": "@@ -84,6 +84,10 @@ msgctxt \"#30014\"\nmsgid \"Account\"\nmsgstr \"\"\n+msgctxt \"#30015\"\n+msgid \"Other options\"\n+msgstr \"Altre opzioni\"\n+\nmsgctxt \"#30017\"\nmsgid \"Logout\"\nmsgstr \"Disconnetti\"\n" }, { "change_type": "MODIFY", "old_path": "resources/settings.xml", "new_path": "resources/settings.xml", "diff": "<setting id=\"autologin_enable\" type=\"bool\" label=\"30054\" default=\"false\" enable=\"eq(0,true)\"/>\n<setting id=\"autologin_user\" type=\"text\" label=\"30055\" default=\"\" enable=\"false\" visible=\"eq(-1,true)\" subsetting=\"true\"/>\n<setting id=\"autologin_id\" type=\"text\" label=\"30056\" default=\"\" enable=\"false\" visible=\"eq(-2,true)\" subsetting=\"true\"/>\n- <setting type=\"sep\"/>\n- <setting id=\"is_settings\" type=\"action\" label=\"30035\" action=\"Addon.OpenSettings(inputstream.adaptive)\" enable=\"System.HasAddon(inputstream.adaptive)\" option=\"close\"/>\n- <setting id=\"ishelper_settings\" type=\"action\" label=\"30213\" action=\"Addon.OpenSettings(script.module.inputstreamhelper)\" option=\"close\"/>\n+ <setting label=\"30015\" type=\"lsep\"/>\n+ <setting id=\"highlight_mylist_titles\" type=\"enum\" label=\"30215\" lvalues=\"13106|762|13343|13341|761|760\" default=\"1\"/>\n</category>\n<category label=\"30025\"><!--Library-->\n- <setting id=\"highlight_mylist_titles\" type=\"enum\" label=\"30215\" lvalues=\"13106|762|13343|13341|761|760\" default=\"1\"/>\n<setting type=\"sep\"/>\n<setting id=\"enablelibraryfolder\" type=\"bool\" label=\"30026\" default=\"false\"/>\n<setting id=\"customlibraryfolder\" type=\"folder\" label=\"30027\" enable=\"eq(-1,true)\" default=\"special://profile/addon_data/plugin.video.netflix\" source=\"auto\" option=\"writeable\" subsetting=\"true\"/>\n<setting id=\"forced_subtitle_workaround\" type=\"bool\" label=\"30181\" default=\"true\" />\n</category>\n<category label=\"30023\"><!--Expert-->\n+ <setting id=\"is_settings\" type=\"action\" label=\"30035\" action=\"Addon.OpenSettings(inputstream.adaptive)\" enable=\"System.HasAddon(inputstream.adaptive)\" option=\"close\"/>\n+ <setting id=\"ishelper_settings\" type=\"action\" label=\"30213\" action=\"Addon.OpenSettings(script.module.inputstreamhelper)\" option=\"close\"/>\n<setting label=\"30115\" type=\"lsep\"/>\n<!--If something is changed in this group remember to make the changes also on settings_monitor.py \"content profiles\"-->\n<setting id=\"stream_max_resolution\" type=\"labelenum\" label=\"30194\" values=\"--|SD 480p|SD 576p|HD 720p|Full HD 1080p|UHD 4K\" default=\"--\" />\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Reworked settings general menu
106,046
22.10.2019 18:52:43
-7,200
2ef59407d6f604f5f77c8fc645241334aba46dfb
Reworked settings library menu
[ { "change_type": "MODIFY", "old_path": "resources/settings.xml", "new_path": "resources/settings.xml", "diff": "<setting id=\"autologin_enable\" type=\"bool\" label=\"30054\" default=\"false\" enable=\"eq(0,true)\"/>\n<setting id=\"autologin_user\" type=\"text\" label=\"30055\" default=\"\" enable=\"false\" visible=\"eq(-1,true)\" subsetting=\"true\"/>\n<setting id=\"autologin_id\" type=\"text\" label=\"30056\" default=\"\" enable=\"false\" visible=\"eq(-2,true)\" subsetting=\"true\"/>\n- <setting label=\"30015\" type=\"lsep\"/>\n+ <setting label=\"30015\" type=\"lsep\"/><!--Other options-->\n<setting id=\"highlight_mylist_titles\" type=\"enum\" label=\"30215\" lvalues=\"13106|762|13343|13341|761|760\" default=\"1\"/>\n</category>\n<category label=\"30025\"><!--Library-->\n- <setting type=\"sep\"/>\n- <setting id=\"enablelibraryfolder\" type=\"bool\" label=\"30026\" default=\"false\"/>\n- <setting id=\"customlibraryfolder\" type=\"folder\" label=\"30027\" enable=\"eq(-1,true)\" default=\"special://profile/addon_data/plugin.video.netflix\" source=\"auto\" option=\"writeable\" subsetting=\"true\"/>\n+ <setting label=\"30065\" type=\"lsep\"/><!--Auto-Update-->\n<setting id=\"mylist_library_sync\" type=\"bool\" label=\"30114\" default=\"false\"/>\n<setting id=\"initial_mylist_sync\" type=\"action\" label=\"30121\" action=\"RunPlugin(plugin://plugin.video.netflix/library/initial_mylist_sync/)\" visible=\"eq(-1,true)\" subsetting=\"true\"/>\n- <setting id=\"purge_library\" type=\"action\" label=\"30125\" action=\"RunPlugin(plugin://plugin.video.netflix/library/purge/)\"/>\n- <setting id=\"migrate_library\" type=\"action\" label=\"30140\" action=\"RunPlugin(plugin://plugin.video.netflix/library/migrate/)\"/>\n- <setting label=\"30065\" type=\"lsep\"/><!--Auto-Update-->\n- <setting id=\"auto_update\" type=\"enum\" label=\"30064\" lvalues=\"30066|30067|30068|30069|30070\" default=\"0\"/>\n+ <setting id=\"auto_update\" type=\"enum\" label=\"30064\" lvalues=\"30066|30067|30068|30069|30070\" default=\"0\" enable=\"eq(-2,true)\"/>\n<setting id=\"update_time\" type=\"time\" label=\"30071\" visible=\"gt(-1,0)\" default=\"00:00\" subsetting=\"true\"/>\n<setting id=\"wait_idle\" type=\"bool\" label=\"30072\" visible=\"gt(-2,0)\" default=\"false\" subsetting=\"true\"/>\n<setting label=\"30184\" type=\"lsep\"/><!--NFO Files-->\n<setting id=\"export_movie_nfo\" type=\"enum\" label=\"30186\" lvalues=\"21337|20422|30188\" visible=\"eq(-1,true)\" default=\"1\" subsetting=\"true\"/>\n<setting id=\"export_tvshow_nfo\" type=\"enum\" label=\"30187\" lvalues=\"21337|20422|30188\" visible=\"eq(-2,true)\" default=\"1\" subsetting=\"true\"/>\n<setting id=\"export_full_tvshow_nfo\" type=\"bool\" label=\"30193\" visible=\"eq(-3,true)\" default=\"false\" subsetting=\"true\"/>\n+ <setting label=\"30015\" type=\"lsep\"/><!--Other options-->\n+ <setting id=\"enablelibraryfolder\" type=\"bool\" label=\"30026\" default=\"false\"/>\n+ <setting id=\"customlibraryfolder\" type=\"folder\" label=\"30027\" enable=\"eq(-1,true)\" default=\"special://profile/addon_data/plugin.video.netflix\" source=\"auto\" option=\"writeable\" subsetting=\"true\"/>\n+ <setting id=\"purge_library\" type=\"action\" label=\"30125\" action=\"RunPlugin(plugin://plugin.video.netflix/library/purge/)\"/>\n+ <setting id=\"migrate_library\" type=\"action\" label=\"30140\" action=\"RunPlugin(plugin://plugin.video.netflix/library/migrate/)\"/>\n<setting label=\"30199\" type=\"lsep\"/><!--Shared library-->\n<setting id=\"use_mysql\" type=\"bool\" label=\"30200\" default=\"false\"/>\n<setting id=\"mysql_username\" type=\"text\" label=\"30201\" default=\"kodi\" visible=\"eq(-1,true)\" subsetting=\"true\"/>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Reworked settings library menu
106,046
22.10.2019 21:56:13
-7,200
92d0fabab1be9750590e5b782888a3010f01fec0
Reworked settings expert menu this also add two new options to show/reset the ESN
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -88,6 +88,10 @@ msgctxt \"#30015\"\nmsgid \"Other options\"\nmsgstr \"\"\n+msgctxt \"#30016\"\n+msgid \"ESN\"\n+msgstr \"\"\n+\nmsgctxt \"#30017\"\nmsgid \"Logout\"\nmsgstr \"\"\n@@ -157,7 +161,7 @@ msgid \"Enable Dolby Digital Plus (DDPlus HQ and Atmos on Premium)\"\nmsgstr \"\"\nmsgctxt \"#30034\"\n-msgid \"ESN (set automatically, can be changed manually)\"\n+msgid \"Manual ESN\"\nmsgstr \"\"\nmsgctxt \"#30035\"\n@@ -883,3 +887,15 @@ msgstr \"\"\nmsgctxt \"#30215\"\nmsgid \"Highlight titles included in my list with a color\"\nmsgstr \"\"\n+\n+msgctxt \"#30216\"\n+msgid \"Show ESN in use\"\n+msgstr \"\"\n+\n+msgctxt \"#30217\"\n+msgid \"Reset ESN\"\n+msgstr \"\"\n+\n+msgctxt \"#30218\"\n+msgid \"Are you sure you want to reset the ESN?\\r\\nIf you confirm, wait until you receive the login message.\"\n+msgstr \"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/api/shakti.py", "new_path": "resources/lib/api/shakti.py", "diff": "@@ -37,10 +37,11 @@ def logout():\ng.CACHE.invalidate()\n-def login():\n+def login(ask_credentials=True):\n\"\"\"Perform a login\"\"\"\ng.CACHE.invalidate()\ntry:\n+ if ask_credentials:\nui.ask_credentials()\nif not common.make_call('login'):\n# Login not validated\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/navigation/actions.py", "new_path": "resources/lib/navigation/actions.py", "diff": "@@ -18,9 +18,8 @@ class AddonActionExecutor(object):\n.format(params))\nself.params = params\n- def logout(self, pathitems=None):\n+ def logout(self, pathitems=None): # pylint: disable=unused-argument\n\"\"\"Perform account logout\"\"\"\n- # pylint: disable=unused-argument\napi.logout()\ndef save_autologin(self, pathitems):\n@@ -37,9 +36,8 @@ class AddonActionExecutor(object):\ng.CACHE.invalidate()\ncommon.refresh_container()\n- def toggle_adult_pin(self, pathitems=None):\n+ def toggle_adult_pin(self, pathitems=None): # pylint: disable=no-member, unused-argument\n\"\"\"Toggle adult PIN verification\"\"\"\n- # pylint: disable=no-member, unused-argument\npin = ui.ask_for_pin()\nif pin is None:\nreturn\n@@ -86,23 +84,46 @@ class AddonActionExecutor(object):\nui.show_notification(common.get_local_string(30180))\[email protected]_execution(immediate=False)\n- def purge_cache(self, pathitems=None):\n+ def purge_cache(self, pathitems=None): # pylint: disable=unused-argument\n\"\"\"Clear the cache. If on_disk param is supplied, also clear cached\nitems from disk\"\"\"\n- # pylint: disable=unused-argument\ng.CACHE.invalidate(self.params.get('on_disk', False))\nif self.params.get('on_disk', False):\ncommon.delete_file('resources.lib.services.playback.stream_continuity.ndb')\nif not self.params.get('no_notification', False):\nui.show_notification(common.get_local_string(30135))\n- def force_update_mylist(self, pathitems=None):\n+ def force_update_mylist(self, pathitems=None): # pylint: disable=unused-argument\n\"\"\"Clear the cache of my list to force the update\"\"\"\n- # pylint: disable=unused-argument\nfrom resources.lib.cache import CACHE_COMMON\ng.CACHE.invalidate_entry(CACHE_COMMON, 'mylist')\ng.CACHE.invalidate_entry(CACHE_COMMON, 'my_list_items')\n+ def view_esn(self, pathitems=None): # pylint: disable=unused-argument\n+ \"\"\"Show the ESN in use\"\"\"\n+ ui.show_ok_dialog(common.get_local_string(30016), g.get_esn())\n+\n+ def reset_esn(self, pathitems=None): # pylint: disable=unused-argument\n+ \"\"\"Reset the ESN stored (retrieved from website and manual)\"\"\"\n+ from resources.lib.database.db_utils import (TABLE_SESSION, TABLE_SETTINGS_MONITOR)\n+ if not ui.ask_for_confirmation(common.get_local_string(30217),\n+ common.get_local_string(30218)):\n+ return\n+ g.settings_monitor_suspended(True)\n+ # Reset the ESN obtained from website/generated\n+ g.LOCAL_DB.set_value('esn', '', TABLE_SESSION)\n+ # Reset the custom ESN (manual ESN from settings)\n+ g.ADDON.setSetting('esn', '')\n+ # Reset the custom ESN (backup of manual ESN from settings, used in settings_monitor.py)\n+ g.LOCAL_DB.set_value('custom_esn', '', TABLE_SETTINGS_MONITOR)\n+ g.settings_monitor_suspended(False)\n+ # Perform a new login to get/generate a new ESN\n+ api.login(ask_credentials=False)\n+ # Warning after login netflix switch to the main profile! so return to the main screen\n+ url = 'plugin://plugin.video.netflix/directory/root'\n+ xbmc.executebuiltin('XBMC.Container.Update(path,replace)') # Clean path history\n+ xbmc.executebuiltin('Container.Update({})'.format(url)) # Open root page\n+\ndef _sync_library(videoid, operation):\noperation = {\n" }, { "change_type": "MODIFY", "old_path": "resources/settings.xml", "new_path": "resources/settings.xml", "diff": "<setting id=\"autologin_id\" type=\"text\" label=\"30056\" default=\"\" enable=\"false\" visible=\"eq(-2,true)\" subsetting=\"true\"/>\n<setting label=\"30015\" type=\"lsep\"/><!--Other options-->\n<setting id=\"highlight_mylist_titles\" type=\"enum\" label=\"30215\" lvalues=\"13106|762|13343|13341|761|760\" default=\"1\"/>\n+ <setting id=\"disable_startup_notification\" type=\"bool\" label=\"30141\" default=\"false\"/>\n</category>\n<category label=\"30025\"><!--Library-->\n<setting label=\"30065\" type=\"lsep\"/><!--Auto-Update-->\n<category label=\"30023\"><!--Expert-->\n<setting id=\"is_settings\" type=\"action\" label=\"30035\" action=\"Addon.OpenSettings(inputstream.adaptive)\" enable=\"System.HasAddon(inputstream.adaptive)\" option=\"close\"/>\n<setting id=\"ishelper_settings\" type=\"action\" label=\"30213\" action=\"Addon.OpenSettings(script.module.inputstreamhelper)\" option=\"close\"/>\n- <setting label=\"30115\" type=\"lsep\"/>\n+ <setting label=\"30115\" type=\"lsep\"/><!--Content Profiles-->\n<!--If something is changed in this group remember to make the changes also on settings_monitor.py \"content profiles\"-->\n<setting id=\"stream_max_resolution\" type=\"labelenum\" label=\"30194\" values=\"--|SD 480p|SD 576p|HD 720p|Full HD 1080p|UHD 4K\" default=\"--\" />\n<setting id=\"enable_dolby_sound\" type=\"bool\" label=\"30033\" default=\"true\"/>\n<setting id=\"enable_dolbyvision_profiles\" type=\"bool\" label=\"30099\" default=\"false\" visible=\"eq(-2,true)\" subsetting=\"true\"/>\n<setting id=\"enable_force_hdcp\" type=\"bool\" label=\"30081\" default=\"false\"/>\n<setting id=\"disable_webvtt_subtitle\" type=\"bool\" label=\"30144\" default=\"false\"/>\n- <setting label=\"30116\" type=\"lsep\"/>\n+ <setting label=\"30016\" type=\"lsep\"/><!--ESN-->\n+ <setting id=\"view_esn\" type=\"action\" label=\"30216\" action=\"RunPlugin(plugin://plugin.video.netflix/action/view_esn/)\"/>\n+ <setting id=\"esn\" type=\"text\" label=\"30034\" value=\"\" default=\"\"/>\n+ <setting id=\"reset_esn\" type=\"action\" label=\"30217\" action=\"RunPlugin(plugin://plugin.video.netflix/action/reset_esn/)\" option=\"close\"/>\n+ <setting label=\"30116\" type=\"lsep\"/><!--Advanced Addon Configuration-->\n<setting id=\"run_init_configuration\" type=\"bool\" label=\"30158\" default=\"true\"/>\n<setting id=\"enable_ipc_over_http\" type=\"bool\" label=\"30139\" default=\"false\"/>\n- <setting id=\"disable_startup_notification\" type=\"bool\" label=\"30141\" default=\"false\"/>\n<setting id=\"enable_timing\" type=\"bool\" label=\"30134\" default=\"false\"/>\n<setting id=\"disable_modal_error_display\" type=\"bool\" label=\"30130\" default=\"false\"/>\n<setting id=\"ssl_verification\" type=\"bool\" label=\"30024\" default=\"true\"/>\n- <setting id=\"esn\" type=\"text\" label=\"30034\" value=\"\" default=\"\"/>\n- <setting label=\"30117\" type=\"lsep\"/>\n+ <setting label=\"30117\" type=\"lsep\"/><!--Cache-->\n<setting id=\"cache_ttl\" type=\"slider\" option=\"int\" range=\"0,10,525600\" label=\"30084\" default=\"120\"/>\n<setting id=\"cache_metadata_ttl\" type=\"slider\" option=\"int\" range=\"0,1,365\" label=\"30085\" default=\"30\"/>\n<setting id=\"purge_inmemory_cache\" type=\"action\" label=\"30132\" action=\"RunPlugin(plugin://plugin.video.netflix/action/purge_cache/)\"/>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Reworked settings expert menu this also add two new options to show/reset the ESN
106,046
23.10.2019 11:57:41
-7,200
5702c34e4404bb0524773af6f16309a911fd27b1
Fixed mixed languages of infolabels in cache Caused when there are multiple profiles in different languages
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/infolabels.py", "new_path": "resources/lib/kodi/infolabels.py", "diff": "@@ -11,6 +11,11 @@ import resources.lib.common as common\nimport resources.lib.kodi.library as library\nfrom resources.lib.globals import g\n+try: # Python 2\n+ unicode\n+except NameError: # Python 3\n+ unicode = str # pylint: disable=redefined-builtin\n+\nQUALITIES = [\n{'codec': 'h264', 'width': '960', 'height': '540'},\n{'codec': 'h264', 'width': '1920', 'height': '1080'},\n@@ -27,14 +32,15 @@ def add_info(videoid, list_item, item, raw_data, set_info=False):\n\"\"\"Add infolabels to the list_item. The passed in list_item is modified\nin place and the infolabels are returned.\"\"\"\n# pylint: disable=too-many-locals\n+ cache_identifier = unicode(videoid) + '_' + g.LOCAL_DB.get_profile_config('language', '')\ntry:\n- cache_entry = g.CACHE.get(cache.CACHE_INFOLABELS, videoid)\n+ cache_entry = g.CACHE.get(cache.CACHE_INFOLABELS, cache_identifier)\ninfos = cache_entry['infos']\nquality_infos = cache_entry['quality_infos']\nexcept cache.CacheMiss:\ninfos, quality_infos = parse_info(videoid, item, raw_data)\n# Use a copy of dict to not reflect future changes to the dictionary also to the cache\n- g.CACHE.add(cache.CACHE_INFOLABELS, videoid,\n+ g.CACHE.add(cache.CACHE_INFOLABELS, cache_identifier,\n{'infos': infos.copy(), 'quality_infos': quality_infos},\nttl=g.CACHE_METADATA_TTL, to_disk=True)\nif videoid.mediatype == common.VideoId.EPISODE or \\\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed mixed languages of infolabels in cache Caused when there are multiple profiles in different languages
106,046
23.10.2019 13:53:30
-7,200
17d4d5020b1e1279d6075931124ef93eb26bb64b
Also childrens profiles now have a 'my list'
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/context_menu.py", "new_path": "resources/lib/kodi/context_menu.py", "diff": "@@ -76,8 +76,7 @@ def generate_context_menu_items(videoid):\nvideoid.mediatype in [common.VideoId.MOVIE, common.VideoId.SHOW]:\nitems.insert(0, _ctx_item('trailer', videoid))\n- if videoid.mediatype in [common.VideoId.MOVIE, common.VideoId.SHOW] \\\n- and not g.LOCAL_DB.get_profile_config('isKids', False):\n+ if videoid.mediatype in [common.VideoId.MOVIE, common.VideoId.SHOW]:\nlist_action = ('remove_from_list'\nif videoid in api.mylist_items()\nelse 'add_to_list')\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Also childrens profiles now have a 'my list'
106,046
23.10.2019 14:37:28
-7,200
482735d498134eb5a716b7ee87d60bf65a6046b4
Fixed multiplication suppl. info to plot
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/infolabels.py", "new_path": "resources/lib/kodi/infolabels.py", "diff": "\"\"\"Helper functions for setting infolabels of list items\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n+import copy\nimport re\nimport resources.lib.api.paths as paths\n@@ -39,10 +40,11 @@ def add_info(videoid, list_item, item, raw_data, set_info=False):\nquality_infos = cache_entry['quality_infos']\nexcept cache.CacheMiss:\ninfos, quality_infos = parse_info(videoid, item, raw_data)\n- # Use a copy of dict to not reflect future changes to the dictionary also to the cache\ng.CACHE.add(cache.CACHE_INFOLABELS, cache_identifier,\n- {'infos': infos.copy(), 'quality_infos': quality_infos},\n+ {'infos': infos, 'quality_infos': quality_infos},\nttl=g.CACHE_METADATA_TTL, to_disk=True)\n+ # Use a deepcopy of dict to not reflect future changes to the dictionary also to the cache\n+ infos_copy = copy.deepcopy(infos)\nif videoid.mediatype == common.VideoId.EPISODE or \\\nvideoid.mediatype == common.VideoId.MOVIE or \\\nvideoid.mediatype == common.VideoId.SUPPLEMENTAL:\n@@ -50,14 +52,14 @@ def add_info(videoid, list_item, item, raw_data, set_info=False):\nlist_item.setProperty('IsPlayable', 'true')\nelse:\nlist_item.setProperty('isFolder', 'true')\n- if set_info:\n- list_item.setInfo('video', infos)\nfor stream_type, quality_infos in quality_infos.iteritems():\nlist_item.addStreamInfo(stream_type, quality_infos)\nif item.get('dpSupplementalMessage'):\n# Short information about future release of tv show season or other\n- infos['plot'] += ' [COLOR green]{}[/COLOR]'.format(item['dpSupplementalMessage'])\n- return infos\n+ infos_copy['plot'] += ' [COLOR green]{}[/COLOR]'.format(item['dpSupplementalMessage'])\n+ if set_info:\n+ list_item.setInfo('video', infos_copy)\n+ return infos_copy\ndef add_art(videoid, list_item, item, raw_data=None):\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed multiplication suppl. info to plot
106,046
23.10.2019 17:18:41
-7,200
9a89d8845553718e5cb47cc21b37c54da0936694
Updated addon screenshots
[ { "change_type": "MODIFY", "old_path": "addon.xml", "new_path": "addon.xml", "diff": "<screenshot>resources/media/screenshot-01.jpg</screenshot>\n<screenshot>resources/media/screenshot-02.jpg</screenshot>\n<screenshot>resources/media/screenshot-03.jpg</screenshot>\n+ <screenshot>resources/media/screenshot-04.jpg</screenshot>\n+ <screenshot>resources/media/screenshot-05.jpg</screenshot>\n</assets>\n<language>en de es he hr it nl pl pt sk sv</language>\n<platform>all</platform>\n" }, { "change_type": "MODIFY", "old_path": "resources/media/screenshot-01.jpg", "new_path": "resources/media/screenshot-01.jpg", "diff": "Binary files a/resources/media/screenshot-01.jpg and b/resources/media/screenshot-01.jpg differ\n" }, { "change_type": "MODIFY", "old_path": "resources/media/screenshot-02.jpg", "new_path": "resources/media/screenshot-02.jpg", "diff": "Binary files a/resources/media/screenshot-02.jpg and b/resources/media/screenshot-02.jpg differ\n" }, { "change_type": "MODIFY", "old_path": "resources/media/screenshot-03.jpg", "new_path": "resources/media/screenshot-03.jpg", "diff": "Binary files a/resources/media/screenshot-03.jpg and b/resources/media/screenshot-03.jpg differ\n" }, { "change_type": "ADD", "old_path": "resources/media/screenshot-04.jpg", "new_path": "resources/media/screenshot-04.jpg", "diff": "Binary files /dev/null and b/resources/media/screenshot-04.jpg differ\n" }, { "change_type": "ADD", "old_path": "resources/media/screenshot-05.jpg", "new_path": "resources/media/screenshot-05.jpg", "diff": "Binary files /dev/null and b/resources/media/screenshot-05.jpg differ\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Updated addon screenshots
106,046
23.10.2019 17:38:23
-7,200
9a7e712ecb35e73c84df299047d92f76912d8b60
Do not check setting if enabled This check is not necessary becouse this function is executed by a settings action that depend from mylist_library_sync setting And causes the inability to start synchronization if mylist_library_sync is activated at the same time without close the settings screen
[ { "change_type": "MODIFY", "old_path": "resources/lib/navigation/library.py", "new_path": "resources/lib/navigation/library.py", "diff": "@@ -87,7 +87,7 @@ class LibraryActionExecutor(object):\nfrom resources.lib.cache import CACHE_COMMON\ndo_it = ui.ask_for_confirmation(common.get_local_string(30122),\ncommon.get_local_string(30123))\n- if not do_it or not g.ADDON.getSettingBool('mylist_library_sync'):\n+ if not do_it:\nreturn\ncommon.debug('Performing full sync from My List to Kodi library')\nlibrary.purge()\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Do not check setting if enabled This check is not necessary becouse this function is executed by a settings action that depend from mylist_library_sync setting And causes the inability to start synchronization if mylist_library_sync is activated at the same time without close the settings screen
106,046
24.10.2019 11:15:56
-7,200
1067abe323d11b851f48c22c19cd4f4460670c3e
Sync changes made to tvshows in my list from other apps
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/library.py", "new_path": "resources/lib/kodi/library.py", "diff": "@@ -19,6 +19,11 @@ import resources.lib.kodi.ui as ui\nfrom resources.lib.database.db_utils import (VidLibProp)\nfrom resources.lib.globals import g\n+try: # Python 2\n+ unicode\n+except NameError: # Python 3\n+ unicode = str # pylint: disable=redefined-builtin\n+\nLIBRARY_HOME = 'library'\nFOLDER_MOVIES = 'movies'\nFOLDER_TV = 'shows'\n@@ -542,13 +547,36 @@ def export_all_new_episodes():\n\"\"\"\nUpdate the local Kodi library with new episodes of every exported shows\n\"\"\"\n+ from resources.lib.cache import CACHE_COMMON\nif not _export_all_new_episodes_running():\ncommon.log('Starting to export new episodes for all tv shows')\ng.SHARED_DB.set_value('library_export_new_episodes_running', True)\ng.SHARED_DB.set_value('library_export_new_episode_start_time', datetime.now())\n- for videoid_value in g.SHARED_DB.get_tvshows_id_list(VidLibProp.exclude_update, False):\n+ # Get the list of the tvshows exported to kodi library\n+ exported_videoids_values = g.SHARED_DB.get_tvshows_id_list()\n+ # Get the list of the tvshows exported but to exclude from updates\n+ excluded_videoids_values = g.SHARED_DB.get_tvshows_id_list(VidLibProp.exclude_update, True)\n+ # Retrieve updated items from \"my list\"\n+ # Invalidate my-list cached data to force to obtain new data\n+ g.CACHE.invalidate_entry(CACHE_COMMON, 'my_list_items')\n+ mylist_videoids = api.mylist_items()\n+\n+ # Check if any tvshow have been removed from the mylist\n+ for videoid_value in exported_videoids_values:\n+ if any(videoid.value == unicode(videoid_value) for videoid in mylist_videoids):\n+ continue\n+ # Tvshow no more exist in mylist so remove it from library\nvideoid = common.VideoId.from_path([common.VideoId.SHOW, videoid_value])\n+ execute_library_tasks_silently(videoid, [remove_item], sync_mylist=False)\n+\n+ # Update or add tvshow in kodi library\n+ for videoid in mylist_videoids:\n+ # Only tvshows require be updated\n+ if videoid.mediatype != common.VideoId.SHOW:\n+ continue\n+ if videoid.value in excluded_videoids_values:\n+ continue\nexport_new_episodes(videoid, True)\n# add some randomness between show analysis to limit servers load and ban risks\nxbmc.sleep(random.randint(1000, 5001))\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Sync changes made to tvshows in my list from other apps
106,046
24.10.2019 11:25:11
-7,200
0fa85ffc35a4add7086dee132d54c837d959b1e2
Added notification to completed library sync
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -899,3 +899,11 @@ msgstr \"\"\nmsgctxt \"#30218\"\nmsgid \"Are you sure you want to reset the ESN?\\r\\nIf you confirm, wait until you receive the login message.\"\nmsgstr \"\"\n+\n+msgctxt \"#30219\"\n+msgid \"Disable notification for synchronization completed\"\n+msgstr \"\"\n+\n+msgctxt \"#30220\"\n+msgid \"Kodi library is now synchronized with My list\"\n+msgstr \"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/library.py", "new_path": "resources/lib/kodi/library.py", "diff": "@@ -582,6 +582,8 @@ def export_all_new_episodes():\nxbmc.sleep(random.randint(1000, 5001))\ng.SHARED_DB.set_value('library_export_new_episodes_running', False)\n+ if not g.ADDON.getSettingBool('disable_library_sync_notification'):\n+ ui.show_notification(common.get_local_string(30220), time=5000)\ncommon.debug('Notify service to update the library')\ncommon.send_signal(common.Signals.LIBRARY_UPDATE_REQUESTED)\n" }, { "change_type": "MODIFY", "old_path": "resources/settings.xml", "new_path": "resources/settings.xml", "diff": "<setting id=\"auto_update\" type=\"enum\" label=\"30064\" lvalues=\"30066|30067|30068|30069|30070\" default=\"0\" enable=\"eq(-2,true)\"/>\n<setting id=\"update_time\" type=\"time\" label=\"30071\" visible=\"gt(-1,0)\" default=\"00:00\" subsetting=\"true\"/>\n<setting id=\"wait_idle\" type=\"bool\" label=\"30072\" visible=\"gt(-2,0)\" default=\"false\" subsetting=\"true\"/>\n+ <setting id=\"disable_library_sync_notification\" type=\"bool\" label=\"30219\" default=\"false\" enable=\"eq(-5,true)\"/>\n<setting label=\"30184\" type=\"lsep\"/><!--NFO Files-->\n<setting id=\"enable_nfo_export\" type=\"bool\" label=\"30185\" default=\"false\"/>\n<setting id=\"export_movie_nfo\" type=\"enum\" label=\"30186\" lvalues=\"21337|20422|30188\" visible=\"eq(-1,true)\" default=\"1\" subsetting=\"true\"/>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added notification to completed library sync
106,046
24.10.2019 17:48:11
-7,200
0b3b193f9b17d92d9bfa5d7985d84ccaa927bbac
Added owner/kids info to profiles descriptions
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -907,3 +907,11 @@ msgstr \"\"\nmsgctxt \"#30220\"\nmsgid \"Kodi library is now synchronized with My list\"\nmsgstr \"\"\n+\n+msgctxt \"#30221\"\n+msgid \"Owner account\"\n+msgstr \"\"\n+\n+msgctxt \"#30222\"\n+msgid \"Kid account\"\n+msgstr \"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/listings.py", "new_path": "resources/lib/kodi/listings.py", "diff": "@@ -72,10 +72,18 @@ def _create_profile_item(profile_guid, is_active, html_parser):\na profile as listed in the profiles listing\"\"\"\nprofile_name = g.LOCAL_DB.get_profile_config('profileName', '', guid=profile_guid)\nunescaped_profile_name = html_parser.unescape(profile_name)\n+ is_account_owner = g.LOCAL_DB.get_profile_config('isAccountOwner', False, guid=profile_guid)\n+ is_kids = g.LOCAL_DB.get_profile_config('isKids', False, guid=profile_guid)\n+ description = []\n+ if is_account_owner:\n+ description.append(common.get_local_string(30221))\n+ if is_kids:\n+ description.append(common.get_local_string(30222))\nenc_profile_name = profile_name.encode('utf-8')\nlist_item = list_item_skeleton(\nlabel=unescaped_profile_name,\n- icon=g.LOCAL_DB.get_profile_config('avatar', '', guid=profile_guid))\n+ icon=g.LOCAL_DB.get_profile_config('avatar', '', guid=profile_guid),\n+ description=', '.join(description))\nlist_item.select(is_active)\nautologin_url = common.build_url(\npathitems=['save_autologin', profile_guid],\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added owner/kids info to profiles descriptions
106,046
24.10.2019 18:37:08
-7,200
d7effd074e92f8181ada8a5bc5d08a3da4f42b02
Force to use owner account profile to sync mylist the authURL seems to specify also the profile used so for now allow synchronization only on the main profile in the future you can also implement an option to decide which profile to synchronize the mylist
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -915,3 +915,7 @@ msgstr \"\"\nmsgctxt \"#30222\"\nmsgid \"Kid account\"\nmsgstr \"\"\n+\n+msgctxt \"#30223\"\n+msgid \"You can start the synchronization only by selecting the owner profile\"\n+msgstr \"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/database/db_local.py", "new_path": "resources/lib/database/db_local.py", "diff": "@@ -20,6 +20,17 @@ class NFLocalDatabase(db_sqlite.SQLiteDatabase):\nraise ProfilesMissing\nreturn result[0]\n+ @db_sqlite.handle_connection\n+ def get_guid_owner_profile(self):\n+ \"\"\"Get the guid of owner account profile\"\"\"\n+ query = 'SELECT Guid FROM profiles_config WHERE ' \\\n+ 'Name = \\'isAccountOwner\\' AND Value = \\'True\\''\n+ cur = self._execute_query(query)\n+ result = cur.fetchone()\n+ if result is None:\n+ raise ProfilesMissing\n+ return result[0]\n+\n@db_sqlite.handle_connection\ndef get_profile_config(self, key, default_value=None, guid=None, data_type=None):\n\"\"\"Get a value from a profile, if guid is not specified, is obtained from active profile\"\"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/library.py", "new_path": "resources/lib/kodi/library.py", "diff": "@@ -548,15 +548,30 @@ def export_all_new_episodes():\nUpdate the local Kodi library with new episodes of every exported shows\n\"\"\"\nfrom resources.lib.cache import CACHE_COMMON\n- if not _export_all_new_episodes_running():\n+ from resources.lib.database.db_exceptions import ProfilesMissing\n+ if _export_all_new_episodes_running():\n+ return\ncommon.log('Starting to export new episodes for all tv shows')\ng.SHARED_DB.set_value('library_export_new_episodes_running', True)\ng.SHARED_DB.set_value('library_export_new_episode_start_time', datetime.now())\n-\n# Get the list of the tvshows exported to kodi library\nexported_videoids_values = g.SHARED_DB.get_tvshows_id_list()\n# Get the list of the tvshows exported but to exclude from updates\nexcluded_videoids_values = g.SHARED_DB.get_tvshows_id_list(VidLibProp.exclude_update, True)\n+\n+ # Before start to get updated mylist items, you have to select the owner account\n+ # TODO: in the future you can also add the possibility to synchronize from a chosen profile\n+ try:\n+ guid_owner_profile = g.LOCAL_DB.get_guid_owner_profile()\n+ except ProfilesMissing as exc:\n+ import traceback\n+ common.error(traceback.format_exc())\n+ ui.show_addon_error_info(exc)\n+ return\n+ if guid_owner_profile != g.LOCAL_DB.get_active_profile_guid():\n+ common.debug('Switching to owner account profile')\n+ api.activate_profile(guid_owner_profile)\n+\n# Retrieve updated items from \"my list\"\n# Invalidate my-list cached data to force to obtain new data\ng.CACHE.invalidate_entry(CACHE_COMMON, 'my_list_items')\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/navigation/library.py", "new_path": "resources/lib/navigation/library.py", "diff": "@@ -85,6 +85,12 @@ class LibraryActionExecutor(object):\n\"\"\"Perform an initial sync of My List and the Kodi library\"\"\"\n# pylint: disable=unused-argument\nfrom resources.lib.cache import CACHE_COMMON\n+ # This is a temporary workaround to prevent sync from mylist of non owner account profiles\n+ # TODO: in the future you can also add the possibility to synchronize from a chosen profile\n+ is_account_owner = g.LOCAL_DB.get_profile_config('isAccountOwner', False)\n+ if not is_account_owner:\n+ ui.show_ok_dialog('Netflix', common.get_local_string(30223))\n+ return\ndo_it = ui.ask_for_confirmation(common.get_local_string(30122),\ncommon.get_local_string(30123))\nif not do_it:\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Force to use owner account profile to sync mylist the authURL seems to specify also the profile used so for now allow synchronization only on the main profile in the future you can also implement an option to decide which profile to synchronize the mylist
106,046
24.10.2019 20:16:29
-7,200
9cc1057d2cb865334f91c48bdd6fc5d791a642df
Enabled export NFOs on sync mylist to kodi library
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/library.py", "new_path": "resources/lib/kodi/library.py", "diff": "@@ -238,7 +238,7 @@ def compile_tasks(videoid, task_handler, nfo_settings=None):\nif task_handler == export_new_item:\nmetadata = api.metadata(videoid, True)\n- return _create_new_episodes_tasks(videoid, metadata)\n+ return _create_new_episodes_tasks(videoid, metadata, nfo_settings)\nif task_handler == remove_item:\nif videoid.mediatype == common.VideoId.MOVIE:\n@@ -338,10 +338,11 @@ def _create_export_item_task(title, section, videoid, destination, filename, nfo\n}\n-def _create_new_episodes_tasks(videoid, metadata):\n+def _create_new_episodes_tasks(videoid, metadata, nfo_settings=None):\ntasks = []\nif metadata and 'seasons' in metadata[0]:\nfor season in metadata[0]['seasons']:\n+ if not nfo_settings:\nnfo_export = g.SHARED_DB.get_tvshow_property(videoid.value,\nVidLibProp.nfo_export, False)\nnfo_settings = nfo.NFOSettings(nfo_export)\n@@ -592,7 +593,14 @@ def export_all_new_episodes():\ncontinue\nif videoid.value in excluded_videoids_values:\ncontinue\n- export_new_episodes(videoid, True)\n+ if videoid.value in exported_videoids_values:\n+ # It is possible that the user has chosen not to export nfo for a tvshow\n+ nfo_export = g.SHARED_DB.get_tvshow_property(videoid.value,\n+ VidLibProp.nfo_export, False)\n+ nfo_settings = nfo.NFOSettings(nfo_export)\n+ else:\n+ nfo_settings = nfo.NFOSettings()\n+ export_new_episodes(videoid, True, nfo_settings)\n# add some randomness between show analysis to limit servers load and ban risks\nxbmc.sleep(random.randint(1000, 5001))\n@@ -603,12 +611,13 @@ def export_all_new_episodes():\ncommon.send_signal(common.Signals.LIBRARY_UPDATE_REQUESTED)\n-def export_new_episodes(videoid, silent=False):\n+def export_new_episodes(videoid, silent=False, nfo_settings=None):\n\"\"\"\nExport new episodes for a tv show by it's video id\n:param videoid: The videoid of the tv show to process\n:param scan: Whether or not to scan the library after exporting, useful for a single show\n:param silent: don't display user interface while exporting\n+ :param nfo_settings: the nfo settings\n:return: None\n\"\"\"\n@@ -618,7 +627,8 @@ def export_new_episodes(videoid, silent=False):\ncommon.debug('Exporting new episodes for {}'.format(videoid))\nmethod(videoid, [export_new_item],\ntitle=common.get_local_string(30198),\n- sync_mylist=False)\n+ sync_mylist=False,\n+ nfo_settings=nfo_settings)\nelse:\ncommon.debug('{} is not a tv show, no new episodes will be exported'.format(videoid))\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Enabled export NFOs on sync mylist to kodi library
106,046
24.10.2019 21:15:15
-7,200
ad720dd25f4dca680b5d347b1934c98be4cbe482
Some fixes to translations
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -209,7 +209,7 @@ msgid \"[COLOR cyan][B]-- NEXT PAGE --[/B][/COLOR]\"\nmsgstr \"\"\nmsgctxt \"#30046\"\n-msgid \"Inputstream addon is not enabled\"\n+msgid \"InputStream addon is not enabled\"\nmsgstr \"\"\nmsgctxt \"#30047\"\n" }, { "change_type": "MODIFY", "old_path": "resources/language/resource.language.nl_nl/strings.po", "new_path": "resources/language/resource.language.nl_nl/strings.po", "diff": "@@ -153,8 +153,8 @@ msgid \"Enable Dolby Digital Plus (DDPlus HQ and Atmos on Premium)\"\nmsgstr \"Dolby Digital Plus inschakelen (DDPlus HQ en Atmos op Netflix Premium)\"\nmsgctxt \"#30034\"\n-msgid \"ESN (set automatically, can be changed manually)\"\n-msgstr \"ESN (automatisch, kan handmatig aangepast worden)\"\n+msgid \"Manual ESN\"\n+msgstr \"\"\nmsgctxt \"#30035\"\nmsgid \"Inputstream Addon Settings...\"\n@@ -201,8 +201,8 @@ msgid \"[COLOR cyan][B]-- NEXT PAGE --[/B][/COLOR]\"\nmsgstr \"[COLOR cyan][B]-- VOLGENDE PAGINA --[/B][/COLOR]\"\nmsgctxt \"#30046\"\n-msgid \"Inputstream addon is not enabled\"\n-msgstr \"Inputstream add-on is niet ingeschakeld\"\n+msgid \"InputStream addon is not enabled\"\n+msgstr \"InputStream add-on is niet ingeschakeld\"\nmsgctxt \"#30047\"\nmsgid \"Finally remove?\"\n" }, { "change_type": "MODIFY", "old_path": "resources/language/resource.language.pt_br/strings.po", "new_path": "resources/language/resource.language.pt_br/strings.po", "diff": "@@ -153,8 +153,8 @@ msgid \"Enable Dolby Digital Plus (DDPlus HQ and Atmos on Premium)\"\nmsgstr \"Ativar Dolby Digital Plus (DDPlus HQ e Atmos on Premium)\"\nmsgctxt \"#30034\"\n-msgid \"ESN (set automatically, can be changed manually)\"\n-msgstr \"ESN (definido automaticamente, pode ser alterado manualmente)\"\n+msgid \"Manual ESN\"\n+msgstr \"\"\nmsgctxt \"#30035\"\nmsgid \"InputStream Adaptive settings...\"\n" }, { "change_type": "MODIFY", "old_path": "resources/language/resource.language.pt_pt/strings.po", "new_path": "resources/language/resource.language.pt_pt/strings.po", "diff": "@@ -153,8 +153,8 @@ msgid \"Enable Dolby Digital Plus (DDPlus HQ and Atmos on Premium)\"\nmsgstr \"Ativar Dolby Digital Plus (DDPlus HQ e Atmos on Premium)\"\nmsgctxt \"#30034\"\n-msgid \"ESN (set automatically, can be changed manually)\"\n-msgstr \"ESN (definido automaticamente, pode ser alterado manualmente)\"\n+msgid \"Manual ESN\"\n+msgstr \"\"\nmsgctxt \"#30035\"\nmsgid \"InputStream Adaptive settings...\"\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Some fixes to translations
106,046
24.10.2019 21:18:59
-7,200
51fb3ac42fb189da0738597fe6b375d570ca2e14
AuthURL is changed while the profile change is executed Seem the cause of error: HTTPError: 401 Client Error: Unauthorized for url: when try to add/remove to mylist after switching to another profile
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "@@ -111,6 +111,10 @@ class NetflixSession(object):\n\"\"\"Return authentication url\"\"\"\nreturn g.LOCAL_DB.get_value('auth_url', table=TABLE_SESSION)\n+ @auth_url.setter\n+ def auth_url(self, value):\n+ g.LOCAL_DB.set_value('auth_url', value, TABLE_SESSION)\n+\[email protected]_execution(immediate=True)\ndef _init_session(self):\n\"\"\"Initialize the session to use for all future connections\"\"\"\n@@ -286,13 +290,14 @@ class NetflixSession(object):\nif guid == g.LOCAL_DB.get_active_profile_guid():\ncommon.debug('Profile {} is already active'.format(guid))\nreturn False\n- self._get(\n- component='activate_profile',\n+ self._get(component='activate_profile',\nreq_type='api',\n- params={\n- 'switchProfileGuid': guid,\n+ params={'switchProfileGuid': guid,\n'_': int(time.time()),\n'authURL': self.auth_url})\n+ # When switch profile is performed the authURL change\n+ react_context = website.extract_json(self._get('browse'), 'reactContext')\n+ self.auth_url = website.extract_api_data(react_context)['auth_url']\ng.LOCAL_DB.switch_active_profile(guid)\nself.update_session_data()\ncommon.debug('Successfully activated profile {}'.format(guid))\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
AuthURL is changed while the profile change is executed Seem the cause of error: HTTPError: 401 Client Error: Unauthorized for url: https://www.------.com/api/shakti/v7bb27746/playlistop when try to add/remove to mylist after switching to another profile
106,046
25.10.2019 21:24:27
-7,200
843cd5031c95b97e257d2ecaf6759f229ddc0ac2
Clean and fixed generate esn now manufacturer string is limited to 5 char example with nvidia shield: ro.product.manufacturer = 'NVIDIA' ro.product.model = 'Shield android tv' ro.nrdp.modelgroup = 'SHIELDANDROIDTV' esn output: old: NFANDROID2-PRV-SHIELDANDROIDTV-NVIDIASHIELD=ANDROID=TV new: NFANDROID2-PRV-SHIELDANDROIDTV-NVIDISHIELD=ANDROID=TV
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/website.py", "new_path": "resources/lib/api/website.py", "diff": "@@ -203,23 +203,26 @@ def generate_esn(user_data):\nimport subprocess\ntry:\nmanufacturer = subprocess.check_output(\n- ['/system/bin/getprop', 'ro.product.manufacturer'])\n+ ['/system/bin/getprop', 'ro.product.manufacturer']).strip(' \\t\\n\\r')\nif manufacturer:\n- esn = ('NFANDROID1-PRV-'\n- if subprocess.check_output(\n- ['/system/bin/getprop', 'ro.build.characteristics']\n- ).strip(' \\t\\n\\r') != 'tv'\n- else 'NFANDROID2-PRV-')\n- inp = subprocess.check_output(\n+ model = subprocess.check_output(\n+ ['/system/bin/getprop', 'ro.product.model']).strip(' \\t\\n\\r')\n+ product_characteristics = subprocess.check_output(\n+ ['/system/bin/getprop', 'ro.build.characteristics']).strip(' \\t\\n\\r')\n+ # Property ro.build.characteristics may also contain more then one value\n+ has_product_characteristics_tv = any(\n+ value.strip(' ') == 'tv' for value in product_characteristics.split(','))\n+ # Netflix Ready Device Platform (NRDP)\n+ nrdp_modelgroup = subprocess.check_output(\n['/system/bin/getprop', 'ro.nrdp.modelgroup']).strip(' \\t\\n\\r')\n- if not inp:\n+\n+ esn = ('NFANDROID2-PRV-' if has_product_characteristics_tv else 'NFANDROID1-PRV-')\n+ if not nrdp_modelgroup:\nesn += 'T-L3-'\nelse:\n- esn += inp + '-'\n- esn += '{:=<5}'.format(manufacturer.strip(' \\t\\n\\r').upper())\n- inp = subprocess.check_output(\n- ['/system/bin/getprop', 'ro.product.model'])\n- esn += inp.strip(' \\t\\n\\r').replace(' ', '=').upper()\n+ esn += nrdp_modelgroup + '-'\n+ esn += '{:=<5.5}'.format(manufacturer.upper())\n+ esn += model.replace(' ', '=').upper()\nesn = sub(r'[^A-Za-z0-9=-]', '=', esn)\ncommon.debug('Android generated ESN:' + esn)\nreturn esn\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Clean and fixed generate esn now manufacturer string is limited to 5 char example with nvidia shield: ro.product.manufacturer = 'NVIDIA' ro.product.model = 'Shield android tv' ro.nrdp.modelgroup = 'SHIELDANDROIDTV' esn output: old: NFANDROID2-PRV-SHIELDANDROIDTV-NVIDIASHIELD=ANDROID=TV new: NFANDROID2-PRV-SHIELDANDROIDTV-NVIDISHIELD=ANDROID=TV
106,046
25.10.2019 21:38:24
-7,200
35cb2b8daaa4686eca43becae580ee8db80f437d
Version bump (0.15.6)
[ { "change_type": "MODIFY", "old_path": "addon.xml", "new_path": "addon.xml", "diff": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n-<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.5\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n+<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.6\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n<requires>\n<import addon=\"xbmc.python\" version=\"2.26.0\"/>\n<import addon=\"script.module.addon.signals\" version=\"0.0.3\"/>\n<forum>https://forum.kodi.tv/showthread.php?tid=329767</forum>\n<source>https://github.com/CastagnaIT/plugin.video.netflix</source>\n<news>\n+v0.15.6 (2019-10-24)\n+-Added customizable color to titles already contained in mylist\n+-Added menu to mylist menu to force update of the list\n+-Added trailers video length\n+-Added supplemental info to tvshow/movie plot (shown in green)\n+-Added add/remove to my-list also in childrens profiles\n+-Added owner/kids account profile infos to profiles menu items\n+-Added notification when library auto-sync is completed (customizable)\n+-Library auto-sync now take in account of changes made to mylist from other apps\n+-Library auto-sync now can export automatically NFOs\n+-Increased default cache ttl from 10m to 120m\n+-Improved speed of add/remove operations to mylist\n+-More intuitive settings menus\n+-Updated addon screenshots\n+-Fixed generate ESN on android\n+-Fixed \"Perform full sync\" setting now work without close settings window\n+-Fixed HTTPError 401 on add/remove to mylist\n+-Fixed cache on sorted lists\n+-Fixed library full sync when mylist have huge list\n+-Fixed wrong cache identifier\n+-Fixed videoid error when play a trailer\n+-Fixed purge cache that didn't delete the files\n+-Fixed mixed language of plot/titles when more profiles have different languages\n+-Other fixes\n+\nv0.15.5 (2019-10-12)\n-Speedup loading lists due to the new login validity check\n-Cookies expires are now used to check a valid login\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Version bump (0.15.6)
106,046
26.10.2019 09:30:55
-7,200
e19dc129112b9d32ede6b23ec9de35c395f8dcc8
Do not start auto-sync if disabled
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/library_updater.py", "new_path": "resources/lib/services/library_updater.py", "diff": "@@ -102,7 +102,7 @@ def _compute_next_schedule():\ntry:\nupdate_frequency = g.ADDON.getSettingInt('auto_update')\n- if not update_frequency:\n+ if not update_frequency or not g.ADDON.getSettingBool('mylist_library_sync'):\ncommon.debug('Library auto update scheduled is disabled')\nreturn None\nif g.ADDON.getSettingBool('use_mysql'):\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Do not start auto-sync if disabled
106,046
26.10.2019 09:51:36
-7,200
8a0b6ca83adc91565c00e03df5ffd7453c8af11c
Version bump (0.15.7)
[ { "change_type": "MODIFY", "old_path": "addon.xml", "new_path": "addon.xml", "diff": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n-<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.6\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n+<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.7\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n<requires>\n<import addon=\"xbmc.python\" version=\"2.26.0\"/>\n<import addon=\"script.module.addon.signals\" version=\"0.0.3\"/>\n<forum>https://forum.kodi.tv/showthread.php?tid=329767</forum>\n<source>https://github.com/CastagnaIT/plugin.video.netflix</source>\n<news>\n+v0.15.7 (2019-10-26)\n+-Do not start auto-sync if disabled\n+-Updated polish translation\n+\nv0.15.6 (2019-10-24)\n-Added customizable color to titles already contained in mylist\n-Added menu to mylist menu to force update of the list\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Version bump (0.15.7)
106,046
27.10.2019 10:51:00
-3,600
7de3b32af0465d89e0a51406bca3ae6950dcb486
Fixed prefetch_login unhandled exception
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/website.py", "new_path": "resources/lib/api/website.py", "diff": "@@ -189,13 +189,14 @@ def validate_login(content):\nerror_description = error_code_list['email_' + error_code]\nif 'login_' + error_code in error_code_list:\nerror_description = error_code_list['login_' + error_code]\n- return common.remove_html_tags(error_description)\n+ raise LoginValidateError(common.remove_html_tags(error_description))\nexcept (AttributeError, KeyError):\n- common.error(\n+ common.error(traceback.format_exc())\n+ error_msg = (\n'Something is wrong in PAGE_ITEM_ERROR_CODE or PAGE_ITEM_ERROR_CODE_LIST paths.'\n'react_context data may have changed.')\n- raise LoginValidateError\n- return None\n+ common.error(error_msg)\n+ raise LoginValidateError(error_msg)\ndef generate_esn(user_data):\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "@@ -19,7 +19,7 @@ import resources.lib.api.website as website\nimport resources.lib.api.paths as apipaths\nimport resources.lib.kodi.ui as ui\n-from resources.lib.api.exceptions import (NotLoggedInError, LoginFailedError,\n+from resources.lib.api.exceptions import (NotLoggedInError, LoginFailedError, LoginValidateError,\nAPIError, MissingCredentialsError)\nBASE_URL = 'https://www.netflix.com'\n@@ -142,7 +142,7 @@ class NetflixSession(object):\nself.set_session_header_data()\nexcept MissingCredentialsError:\ncommon.info('Login prefetch: No stored credentials are available')\n- except LoginFailedError:\n+ except (LoginFailedError, LoginValidateError):\nui.show_notification(common.get_local_string(30009))\[email protected]_execution(immediate=True)\n@@ -241,16 +241,16 @@ class NetflixSession(object):\nlogin_response = self._post(\n'login',\ndata=_login_payload(common.get_credentials(), auth_url))\n- validate_msg = website.validate_login(login_response)\n- if validate_msg:\n+ try:\n+ website.validate_login(login_response)\n+ except LoginValidateError as exc:\nself.session.cookies.clear()\ncommon.purge_credentials()\nif modal_error_message:\n- ui.show_ok_dialog(common.get_local_string(30008),\n- validate_msg)\n- else:\n- ui.show_notification(common.get_local_string(30009))\n+ ui.show_ok_dialog(common.get_local_string(30008), unicode(exc))\nreturn False\n+ else:\n+ raise\nwebsite.extract_session_data(login_response)\nexcept Exception as exc:\ncommon.error(traceback.format_exc())\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed prefetch_login unhandled exception
106,046
28.10.2019 09:27:38
-3,600
d1e23b10d60542891a3c76fd0012ab838d6314ab
Do not sync on non-owner profile
[ { "change_type": "MODIFY", "old_path": "resources/lib/navigation/actions.py", "new_path": "resources/lib/navigation/actions.py", "diff": "@@ -130,6 +130,11 @@ def _sync_library(videoid, operation):\n'add': 'export_silent',\n'remove': 'remove_silent'}.get(operation)\nif operation and g.ADDON.getSettingBool('mylist_library_sync'):\n+ # This is a temporary workaround to prevent export from mylist of non owner account profiles\n+ # TODO: in the future you can also add the possibility to synchronize from a chosen profile\n+ is_account_owner = g.LOCAL_DB.get_profile_config('isAccountOwner', False)\n+ if not is_account_owner:\n+ return\ncommon.debug('Syncing library due to change of my list')\n# We need to wait a little before syncing the library to prevent race\n# conditions with the Container refresh\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Do not sync on non-owner profile
106,046
31.10.2019 09:37:57
-3,600
42600a17acf9bf00a34fd1aa22c936f371892b30
Fixed problem of non working cookies it seems that the cause is due to website updates, because the cookies have not expired and apparently there are no other factors that determine invalidity
[ { "change_type": "MODIFY", "old_path": "resources/lib/common/cookies.py", "new_path": "resources/lib/common/cookies.py", "diff": "@@ -73,9 +73,8 @@ def load(account_hash):\ndebug_output += '{} (expires {} - remaining TTL {})\\n'.format(cookie.name,\ncookie.expires,\nremaining_ttl)\n- common.debug(debug_output)\n- if expired(cookie_jar):\n- raise CookiesExpiredError()\n+ # if expired(cookie_jar):\n+ # raise CookiesExpiredError()\nreturn cookie_jar\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "@@ -20,7 +20,7 @@ import resources.lib.api.paths as apipaths\nimport resources.lib.kodi.ui as ui\nfrom resources.lib.api.exceptions import (NotLoggedInError, LoginFailedError, LoginValidateError,\n- APIError, MissingCredentialsError)\n+ APIError, MissingCredentialsError, WebsiteParsingError)\nBASE_URL = 'https://www.netflix.com'\n\"\"\"str: Secure Netflix url\"\"\"\n@@ -170,7 +170,7 @@ class NetflixSession(object):\nfor cookie in list(self.session.cookies):\nif cookie.name != cookie_name:\ncontinue\n- if cookie.expires <= time.time():\n+ if cookie.expires <= int(time.time()):\ncommon.info('Login is expired')\nreturn False\nif fallback_to_validate:\n@@ -200,9 +200,17 @@ class NetflixSession(object):\ntry:\nwebsite.extract_session_data(self._get('profiles'))\nself.update_session_data()\n+ except WebsiteParsingError:\n+ # it is possible that cookies may not work anymore,\n+ # it should be due to updates in the website,\n+ # this can happen when opening the addon while executing update_profiles_data\n+ common.debug(traceback.format_exc())\n+ common.info('Failed to refresh session data, login expired (WebsiteParsingError)')\n+ self.session.cookies.clear()\n+ return self._login()\nexcept Exception:\ncommon.debug(traceback.format_exc())\n- common.info('Failed to refresh session data, login expired')\n+ common.info('Failed to refresh session data, login expired (Exception)')\nself.session.cookies.clear()\nreturn False\ncommon.debug('Successfully refreshed session data')\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed problem of non working cookies it seems that the cause is due to website updates, because the cookies have not expired and apparently there are no other factors that determine invalidity
106,046
31.10.2019 10:00:23
-3,600
3bbd64b56e78d69dbd593b3f0b859c414d8ff40e
Version bump (0.15.8)
[ { "change_type": "MODIFY", "old_path": "addon.xml", "new_path": "addon.xml", "diff": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n-<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.7\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n+<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.8\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n<requires>\n<import addon=\"xbmc.python\" version=\"2.26.0\"/>\n<import addon=\"script.module.addon.signals\" version=\"0.0.3\"/>\n<forum>https://forum.kodi.tv/showthread.php?tid=329767</forum>\n<source>https://github.com/CastagnaIT/plugin.video.netflix</source>\n<news>\n+v0.15.8 (2019-10-31)\n+-Fixed addon open issue caused to a broken cookies\n+-Updated de translations\n+-Fixed an issue that cause UpNext sometimes to fail\n+-Minor fixes\n+\nv0.15.7 (2019-10-26)\n-Do not start auto-sync if disabled\n-Updated polish translation\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Version bump (0.15.8)
106,046
14.09.2019 16:20:27
-7,200
7981176496b7c27a47e64242d738335bc9fd2c2f
uuid_device py3 fixes
[ { "change_type": "MODIFY", "old_path": "resources/lib/common/uuid_device.py", "new_path": "resources/lib/common/uuid_device.py", "diff": "@@ -63,7 +63,7 @@ def _get_windows_uuid():\ntry: # Python 2\nimport _winreg as winreg\nexcept ImportError: # Python 3\n- import winreg as winreg\n+ import winreg\nregistry = winreg.HKEY_LOCAL_MACHINE\naddress = 'SOFTWARE\\\\Microsoft\\\\Cryptography'\nkeyargs = winreg.KEY_READ | winreg.KEY_WOW64_64KEY\n@@ -159,12 +159,12 @@ def _parse_osx_xml_plist_data(data):\nitems_dict = xml_data[0]['_items'][0]\nr = re.compile(r'.*UUID.*') # Find to example \"platform_UUID\" key\n- uuid_keys = filter(r.match, items_dict.keys())\n+ uuid_keys = list(filter(r.match, items_dict.keys()))\nif uuid_keys:\ndict_values['UUID'] = items_dict[uuid_keys[0]]\nif not uuid_keys:\nr = re.compile(r'.*serial.*number.*') # Find to example \"serial_number\" key\n- serialnumber_keys = filter(r.match, items_dict.keys())\n+ serialnumber_keys = list(filter(r.match, items_dict.keys()))\nif serialnumber_keys:\ndict_values['serialnumber'] = items_dict[serialnumber_keys[0]]\nreturn dict_values\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
uuid_device py3 fixes
105,991
15.09.2019 00:20:00
-7,200
6c2dc0cb73e4b3697bd73857b25b8568ee2a6920
xmldialogs.py: Remove unused class
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/ui/xmldialogs.py", "new_path": "resources/lib/kodi/ui/xmldialogs.py", "diff": "@@ -68,22 +68,3 @@ class Skip(xbmcgui.WindowXMLDialog):\ndef onAction(self, action):\nif action.getId() in self.action_exitkeys_id:\nself.close()\n-\n-\n-class SaveStreamSettings(xbmcgui.WindowXMLDialog):\n- \"\"\"\n- Dialog for skipping video parts (intro, recap, ...)\n- \"\"\"\n- def __init__(self, *args, **kwargs): # pylint: disable=super-on-old-class\n- super(SaveStreamSettings, self).__init__(*args, **kwargs)\n- self.new_show_settings = kwargs['new_show_settings']\n- self.tvshowid = kwargs['tvshowid']\n- self.storage = kwargs['storage']\n-\n- def onInit(self):\n- self.action_exitkeys_id = [10, 13]\n-\n- def onClick(self, controlID):\n- if controlID == 6012:\n- self.storage[self.tvshowid] = self.new_show_settings\n- self.close()\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
xmldialogs.py: Remove unused class https://github.com/CastagnaIT/plugin.video.netflix/issues/183
105,991
15.09.2019 00:25:49
-7,200
727449df242b6724e4a7e5ff15a1fdad5ad364ad
Drop # noinspection instructions for PyCharm, we now use Pylint for all inspection
[ { "change_type": "MODIFY", "old_path": "resources/lib/common/credentials.py", "new_path": "resources/lib/common/credentials.py", "diff": "@@ -76,7 +76,6 @@ def get_credentials():\n'Existing credentials could not be decrypted')\n-# noinspection PyBroadException\ndef check_credentials():\n\"\"\"\nCheck if account credentials exists and can be decrypted.\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Drop # noinspection instructions for PyCharm, we now use Pylint for all inspection
106,046
15.10.2019 15:34:40
-7,200
01bc69441752bef4064c15a98aefc3b59b6898e6
Fixed pylint unnecessary-comprehension
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/website.py", "new_path": "resources/lib/api/website.py", "diff": "@@ -142,8 +142,8 @@ def extract_userdata(react_context, debug_log=True):\n\"\"\"Extract essential userdata from the reactContext of the webpage\"\"\"\ncommon.debug('Extracting userdata from webpage')\nuser_data = {}\n- for path in ([path_item for path_item in path.split('/')]\n- for path in PAGE_ITEMS_INFO):\n+\n+ for path in (path.split('/') for path in PAGE_ITEMS_INFO):\ntry:\nextracted_value = {path[-1]: common.get_path(path, react_context)}\nuser_data.update(extracted_value)\n@@ -159,7 +159,7 @@ def extract_api_data(react_context, debug_log=True):\ncommon.debug('Extracting api urls from webpage')\napi_data = {}\nfor key, value in list(PAGE_ITEMS_API_URL.items()):\n- path = [path_item for path_item in value.split('/')]\n+ path = value.split('/')\ntry:\nextracted_value = {key: common.get_path(path, react_context)}\napi_data.update(extracted_value)\n@@ -179,8 +179,8 @@ def assert_valid_auth_url(user_data):\ndef validate_login(content):\nreact_context = extract_json(content, 'reactContext')\n- path_code_list = [path_item for path_item in PAGE_ITEM_ERROR_CODE_LIST.split('\\\\')]\n- path_error_code = [path_item for path_item in PAGE_ITEM_ERROR_CODE.split('/')]\n+ path_code_list = PAGE_ITEM_ERROR_CODE_LIST.split('\\\\')\n+ path_error_code = PAGE_ITEM_ERROR_CODE.split('/')\nif common.check_path_exists(path_error_code, react_context):\n# If the path exists, a login error occurs\ntry:\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed pylint unnecessary-comprehension
106,046
15.10.2019 17:10:00
-7,200
4a5f088c2993fad39f93e0c73dd6508aa80bf835
Traceback fixes
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "@@ -179,6 +179,7 @@ class NetflixSession(object):\nwebsite.validate_session_data(self._get('profiles'))\nself.update_session_data()\nexcept Exception:\n+ import traceback\ncommon.debug(traceback.format_exc())\ncommon.info('Failed to validate session data, login is expired')\nself.session.cookies.clear()\n@@ -202,11 +203,13 @@ class NetflixSession(object):\n# it is possible that cookies may not work anymore,\n# it should be due to updates in the website,\n# this can happen when opening the addon while executing update_profiles_data\n+ import traceback\ncommon.debug(traceback.format_exc())\ncommon.info('Failed to refresh session data, login expired (WebsiteParsingError)')\nself.session.cookies.clear()\nreturn self._login()\nexcept Exception:\n+ import traceback\ncommon.debug(traceback.format_exc())\ncommon.info('Failed to refresh session data, login expired (Exception)')\nself.session.cookies.clear()\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Traceback fixes
106,046
15.10.2019 17:10:46
-7,200
04a621e1fd42b06d3f8e4a4987b210e78ba53490
Exception message fix pylint happy
[ { "change_type": "MODIFY", "old_path": "service.py", "new_path": "service.py", "diff": "@@ -24,6 +24,11 @@ import resources.lib.services as services\nimport resources.lib.kodi.ui as ui\nimport resources.lib.upgrade_controller as upgrade_ctrl\n+try: # Python 2\n+ unicode\n+except NameError: # Python 3\n+ unicode = str # pylint: disable=redefined-builtin\n+\nclass NetflixService(object):\n\"\"\"\n@@ -104,8 +109,7 @@ class NetflixService(object):\nself.library_updater.on_tick()\nexcept Exception as exc:\ncommon.error(traceback.format_exc())\n- ui.show_notification(': '.join((exc.__class__.__name__,\n- exc.message)))\n+ ui.show_notification(': '.join((exc.__class__.__name__, unicode(exc))))\nreturn self.controller.waitForAbort(1)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Exception message fix pylint happy
106,046
16.10.2019 14:00:11
-7,200
f165bae87ff3474b1330f092c677e356c4c85d7f
Use future version 0.17.1 now the installation is done correctly
[ { "change_type": "MODIFY", "old_path": "addon.xml", "new_path": "addon.xml", "diff": "<requires>\n<import addon=\"xbmc.python\" version=\"2.26.0\"/>\n<import addon=\"script.module.addon.signals\" version=\"0.0.3\"/>\n- <import addon=\"script.module.future\" version=\"0.16.0.4\"/> <!-- version 0.17.1 currently does not work -->\n+ <import addon=\"script.module.future\" version=\"0.17.1\"/>\n<import addon=\"script.module.inputstreamhelper\" version=\"0.3.3\"/>\n<import addon=\"script.module.pycryptodome\" version=\"3.4.3\"/>\n<import addon=\"script.module.requests\" version=\"2.12.4\"/>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Use future version 0.17.1 now the installation is done correctly
106,046
21.10.2019 13:19:04
-7,200
ac193f8d941c57075271a7883558f85ac9306827
Show traceback when an error occour in service
[ { "change_type": "MODIFY", "old_path": "service.py", "new_path": "service.py", "diff": "@@ -94,6 +94,8 @@ class NetflixService(object):\ntry:\nself.start_services()\nexcept Exception as exc:\n+ import traceback\n+ common.error(traceback.format_exc())\nui.show_addon_error_info(exc)\nreturn\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Show traceback when an error occour in service
106,046
28.10.2019 20:08:13
-3,600
e7bbcd3f45c587d95ec648839c186fcbaba5495c
Rebase py3 fixes
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/website.py", "new_path": "resources/lib/api/website.py", "diff": "@@ -196,6 +196,7 @@ def validate_login(content):\nerror_description = error_code_list['login_' + error_code]\nraise LoginValidateError(common.remove_html_tags(error_description))\nexcept (AttributeError, KeyError):\n+ import traceback\ncommon.error(traceback.format_exc())\nerror_msg = (\n'Something is wrong in PAGE_ITEM_ERROR_CODE or PAGE_ITEM_ERROR_CODE_LIST paths.'\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/common/credentials.py", "new_path": "resources/lib/common/credentials.py", "diff": "@@ -45,6 +45,10 @@ def decrypt_credential(enc, secret=None):\n\"\"\"\n# pylint: disable=invalid-name,import-error\nimport base64\n+ try: # Python 3\n+ from Crypto.Cipher import AES\n+ from Crypto.Util import Padding\n+ except ImportError: # Python 2\nfrom Cryptodome.Cipher import AES\nfrom Cryptodome.Util import Padding\nenc = base64.b64decode(enc)\n@@ -76,7 +80,6 @@ def get_credentials():\n'Existing credentials could not be decrypted')\n-# noinspection PyBroadException\ndef check_credentials():\n\"\"\"\nCheck if account credentials exists and can be decrypted.\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/ui/__init__.py", "new_path": "resources/lib/kodi/ui/__init__.py", "diff": "# pylint: disable=wildcard-import\nfrom __future__ import absolute_import, division, unicode_literals\n-from .dialogs import *\n+from .dialogs import * # pylint: disable=redefined-builtin\nfrom .xmldialogs import *\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "@@ -21,6 +21,11 @@ import resources.lib.kodi.ui as ui\nfrom resources.lib.api.exceptions import (NotLoggedInError, LoginFailedError, LoginValidateError,\nAPIError, MissingCredentialsError, WebsiteParsingError)\n+try: # Python 2\n+ unicode\n+except NameError: # Python 3\n+ unicode = str # pylint: disable=redefined-builtin\n+\nBASE_URL = 'https://www.netflix.com'\n\"\"\"str: Secure Netflix url\"\"\"\n@@ -259,7 +264,6 @@ class NetflixSession(object):\nif modal_error_message:\nui.show_ok_dialog(common.get_local_string(30008), unicode(exc))\nreturn False\n- else:\nraise\nwebsite.extract_session_data(login_response)\nexcept Exception as exc:\n" }, { "change_type": "MODIFY", "old_path": "service.py", "new_path": "service.py", "diff": "@@ -9,7 +9,6 @@ from __future__ import absolute_import, division, unicode_literals\nimport sys\nimport threading\n-import traceback\n# Import and initialize globals right away to avoid stale values from the last\n# addon invocation. Otherwise Kodi's reuseLanguageInvoker option will cause\n@@ -110,6 +109,7 @@ class NetflixService(object):\nself.controller.on_playback_tick()\nself.library_updater.on_tick()\nexcept Exception as exc:\n+ import traceback\ncommon.error(traceback.format_exc())\nui.show_notification(': '.join((exc.__class__.__name__, unicode(exc))))\nreturn self.controller.waitForAbort(1)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Rebase py3 fixes
106,046
05.11.2019 15:14:36
-3,600
74e40f8dc858db6a556b5025632702a87721cb3a
Avoid generate exception due to cookie file mmissing
[ { "change_type": "MODIFY", "old_path": "resources/lib/common/cookies.py", "new_path": "resources/lib/common/cookies.py", "diff": "@@ -50,9 +50,12 @@ def delete(account_hash):\ndef load(account_hash):\n\"\"\"Load cookies for a given account and check them for validity\"\"\"\n- try:\nfilename = cookie_filename(account_hash)\ncommon.debug('Loading cookies from {}'.format(filename))\n+ if not xbmcvfs.exists(xbmc.translatePath(filename)):\n+ common.debug('Cookies file does not exist')\n+ raise MissingCookiesError()\n+ try:\ncookie_file = xbmcvfs.File(filename, 'rb')\nif g.PY_IS_VER2:\n# pickle.loads on py2 wants string\n@@ -60,7 +63,9 @@ def load(account_hash):\nelse:\ncookie_jar = pickle.loads(cookie_file.readBytes())\nexcept Exception as exc:\n- common.debug('Failed to load cookies from file: {exc}', exc)\n+ import traceback\n+ common.error('Failed to load cookies from file: {exc}', exc)\n+ common.error(traceback.format_exc())\nraise MissingCookiesError()\nfinally:\ncookie_file.close()\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "@@ -229,11 +229,13 @@ class NetflixSession(object):\nif not self.session.cookies:\ntry:\nself.session.cookies = cookies.load(self.account_hash)\n+ except cookies.MissingCookiesError:\n+ return False\nexcept Exception as exc:\n- common.debug(\n- 'Failed to load stored cookies: {}'.format(type(exc).__name__))\nimport traceback\n- common.debug(traceback.format_exc())\n+ common.error(\n+ 'Failed to load stored cookies: {}'.format(type(exc).__name__))\n+ common.error(traceback.format_exc())\nreturn False\ncommon.debug('Successfully loaded stored cookies')\nreturn True\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Avoid generate exception due to cookie file mmissing
106,046
09.11.2019 08:52:07
-3,600
f8120b2a4817bd40b530b4684fb40e9f1ee0cba0
Fixed pickle.loads on _get_from_disk
[ { "change_type": "MODIFY", "old_path": "resources/lib/cache.py", "new_path": "resources/lib/cache.py", "diff": "@@ -12,6 +12,7 @@ resources.lib.services.nfsession\nfrom __future__ import absolute_import, division, unicode_literals\nimport base64\nimport os\n+import sys\nfrom time import time\nfrom functools import wraps\nfrom future.utils import iteritems\n@@ -271,10 +272,17 @@ class Cache(object):\ndef _get_from_disk(self, bucket, identifier):\n\"\"\"Load a cache entry from disk and add it to the in memory bucket\"\"\"\n- handle = xbmcvfs.File(self._entry_filename(bucket, identifier), 'rb')\n+ cache_filename = self._entry_filename(bucket, identifier)\n+ handle = xbmcvfs.File(cache_filename, 'rb')\ntry:\n- return pickle.loads(handle.readBytes().decode('utf-8'))\n- except Exception:\n+ if sys.version_info.major == 2:\n+ # pickle.loads on py2 wants string\n+ return pickle.loads(handle.read())\n+ else:\n+ return pickle.loads(handle.readBytes())\n+ except Exception as exc:\n+ self.common.error('Failed get cache from disk {}: {}'\n+ .format(cache_filename, exc))\nraise CacheMiss()\nfinally:\nhandle.close()\n@@ -356,8 +364,8 @@ class Cache(object):\n# Remove from in-memory cache\ndel self._get_bucket(bucket)[identifier]\n- # Remove from disk cache if it exists\n+ # Remove from disk cache if it exists\nif cache_exixts:\nos.remove(cache_filename)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed pickle.loads on _get_from_disk
106,046
09.11.2019 11:22:49
-3,600
5afa45143e2b0eb9a2bb0e6a4d37eb5f479c9cbc
Workaround to py2 bug ImportError: Failed to import _strptime
[ { "change_type": "MODIFY", "old_path": "resources/lib/common/data_conversion.py", "new_path": "resources/lib/common/data_conversion.py", "diff": "from __future__ import absolute_import, division, unicode_literals\nimport json\nimport datetime\n+# Workaround for http://bugs.python.org/issue8098 only to py2 caused by _conv_string_to_datetime()\n+# Error: ImportError: Failed to import _strptime because the import lockis held by another thread.\n+import _strptime # pylint: disable=unused-import\nfrom ast import literal_eval\nfrom .logging import error\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Workaround to py2 bug ImportError: Failed to import _strptime
106,046
09.11.2019 11:24:14
-3,600
46bc32c47fc0c1bd5132739a80e2d734630c8f7a
Raise CacheMiss directly when file does not exist
[ { "change_type": "MODIFY", "old_path": "resources/lib/cache.py", "new_path": "resources/lib/cache.py", "diff": "@@ -273,6 +273,8 @@ class Cache(object):\ndef _get_from_disk(self, bucket, identifier):\n\"\"\"Load a cache entry from disk and add it to the in memory bucket\"\"\"\ncache_filename = self._entry_filename(bucket, identifier)\n+ if not xbmcvfs.exists(cache_filename):\n+ raise CacheMiss()\nhandle = xbmcvfs.File(cache_filename, 'rb')\ntry:\nif sys.version_info.major == 2:\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Raise CacheMiss directly when file does not exist
106,046
09.11.2019 17:04:31
-3,600
dbb832e03dd8347a621569a8922b6607f6bb8bc4
flake - pylint fixes
[ { "change_type": "MODIFY", "old_path": "resources/lib/cache.py", "new_path": "resources/lib/cache.py", "diff": "@@ -280,7 +280,7 @@ class Cache(object):\nif sys.version_info.major == 2:\n# pickle.loads on py2 wants string\nreturn pickle.loads(handle.read())\n- else:\n+ # py3\nreturn pickle.loads(handle.readBytes())\nexcept Exception as exc:\nself.common.error('Failed get cache from disk {}: {}'\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/common/data_conversion.py", "new_path": "resources/lib/common/data_conversion.py", "diff": "from __future__ import absolute_import, division, unicode_literals\nimport json\nimport datetime\n+from ast import literal_eval\n# Workaround for http://bugs.python.org/issue8098 only to py2 caused by _conv_string_to_datetime()\n# Error: ImportError: Failed to import _strptime because the import lockis held by another thread.\nimport _strptime # pylint: disable=unused-import\n-from ast import literal_eval\nfrom .logging import error\ntry: # Python 2\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
flake - pylint fixes
106,046
11.11.2019 10:56:35
-3,600
552629135a7bd766e9312f6212b8cab298f6626d
Added fade animation to skip dialog
[ { "change_type": "MODIFY", "old_path": "resources/skins/default/1080i/plugin-video-netflix-Skip.xml", "new_path": "resources/skins/default/1080i/plugin-video-netflix-Skip.xml", "diff": "<align>center</align>\n<texturefocus border=\"10\" colordiffuse=\"ff222326\">smallbutton.png</texturefocus>\n<texturenofocus border=\"10\" colordiffuse=\"ff222326\">smallbutton.png</texturenofocus>\n+ <animation effect=\"fade\" start=\"0\" end=\"100\" time=\"200\">WindowOpen</animation>\n+ <animation effect=\"fade\" start=\"100\" end=\"0\" time=\"200\">WindowClose</animation>\n</control>\n</control>\n</control>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added fade animation to skip dialog
106,046
12.11.2019 13:15:00
-3,600
94e7b5d7257f1f11414aab456dd86e8e5b4f702d
Fixed executebuiltin notification on py2
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/ui/dialogs.py", "new_path": "resources/lib/kodi/ui/dialogs.py", "diff": "@@ -17,8 +17,8 @@ except NameError: # Python 3\ndef show_notification(msg, title='Netflix', time=3000):\n\"\"\"Show a notification\"\"\"\n- xbmc.executebuiltin('Notification({}, {}, {}, {})'\n- .format(title, msg, time, g.ICON))\n+ xbmc.executebuiltin(g.py2_encode('Notification({}, {}, {}, {})'\n+ .format(title, msg, time, g.ICON)))\ndef ask_credentials():\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed executebuiltin notification on py2
106,046
12.11.2019 13:25:07
-3,600
c70b09d7e89aac2fcb64ae633ddda342d60e867b
Added delete subfolders to delete_folder_contents
[ { "change_type": "MODIFY", "old_path": "resources/lib/common/fileops.py", "new_path": "resources/lib/common/fileops.py", "diff": "@@ -90,10 +90,22 @@ def list_dir(data_path=g.DATA_PATH):\nreturn xbmcvfs.listdir(xbmc.translatePath(data_path))\n-def delete_folder_contents(path):\n- \"\"\"Delete all files in a folder\"\"\"\n- for filename in list_dir(path)[1]:\n+def delete_folder_contents(path, delete_subfolders=False):\n+ \"\"\"\n+ Delete all files in a folder\n+ :param path: Path to perform delete contents\n+ :param delete_subfolders: If True delete also all subfolders\n+ \"\"\"\n+ directories, files = list_dir(path)\n+ for filename in files:\nxbmcvfs.delete(os.path.join(path, filename))\n+ if not delete_subfolders:\n+ return\n+ for directory in directories:\n+ delete_folder_contents(os.path.join(path, directory), True)\n+ # Give time because the system performs previous op. otherwise it can't delete the folder\n+ xbmc.sleep(80)\n+ xbmcvfs.rmdir(os.path.join(path, directory))\ndef delete_ndb_files(data_path=g.DATA_PATH):\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added delete subfolders to delete_folder_contents
106,046
12.11.2019 13:04:52
-3,600
74dbb0df6bb79b7dafe0ee22033d2d1378baebda
Added purge library to shared db
[ { "change_type": "MODIFY", "old_path": "resources/lib/database/db_shared.py", "new_path": "resources/lib/database/db_shared.py", "diff": "@@ -398,4 +398,17 @@ def get_shareddb_class(force_sqlite=False):\nself._execute_non_query(insert_query, (profile_guid, videoid,\nvalue, date_last_modified))\n+ @db_base_mysql.handle_connection\n+ @db_base_sqlite.handle_connection\n+ def purge_library(self):\n+ \"\"\"Delete all records from library tables\"\"\"\n+ query = 'DELETE FROM video_lib_movies'\n+ self._execute_non_query(query)\n+ query = 'DELETE FROM video_lib_episodes'\n+ self._execute_non_query(query)\n+ query = 'DELETE FROM video_lib_seasons'\n+ self._execute_non_query(query)\n+ query = 'DELETE FROM video_lib_tvshows'\n+ self._execute_non_query(query)\n+\nreturn NFSharedDatabase\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added purge library to shared db
106,046
12.11.2019 13:09:26
-3,600
6ada1ab76315f9bd3bef6156f59fbe4e4510cf47
Make sure that everything is removed with purge library
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/library.py", "new_path": "resources/lib/kodi/library.py", "diff": "@@ -219,6 +219,14 @@ def purge():\nexecute_library_tasks(videoid, [remove_item],\ncommon.get_local_string(30030),\nsync_mylist=False)\n+ # If for some reason such as improper use of the add-on, unexpected error or other\n+ # has caused inconsistencies with the contents of the database or stored files,\n+ # make sure that everything is removed\n+ g.SHARED_DB.purge_library()\n+ for folder_name in [FOLDER_MOVIES, FOLDER_TV]:\n+ section_dir = xbmc.translatePath(\n+ xbmc.makeLegalFilename('/'.join([library_path(), folder_name])))\n+ common.delete_folder_contents(section_dir, delete_subfolders=True)\[email protected]_execution(immediate=False)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Make sure that everything is removed with purge library
106,046
12.11.2019 15:04:23
-3,600
00307e4fdbd07f8d6eae7ec9a2b4dd104056d53d
Removed migration from ndb2 no more needed
[ { "change_type": "MODIFY", "old_path": "resources/lib/upgrade_actions.py", "new_path": "resources/lib/upgrade_actions.py", "diff": "# -*- coding: utf-8 -*-\n\"\"\"Defines upgrade actions\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n-\n-import os\n-\n-import xbmc\n-import xbmcvfs\n-\n-import resources.lib.common as common\n-import resources.lib.kodi.library as library\n-from resources.lib.globals import g\n-\n-try:\n- import cPickle as pickle\n-except ImportError:\n- import pickle\n-\n-\n-def migrate_library_to_db():\n- common.debug('Migrate library from file cache library.ndb2 to database')\n- file_loc = [g.DATA_PATH, 'library.ndb2']\n- library_file = xbmc.translatePath(os.path.join(*file_loc))\n-\n- if not xbmcvfs.exists(library_file):\n- return\n-\n- handle = xbmcvfs.File(library_file, 'r')\n- lib = pickle.loads(handle.read().encode('utf-8'))\n- handle.close()\n-\n- for item in list(lib['content'].values()):\n- videoid = item['videoid'].convert_old_videoid_type()\n-\n- if videoid.mediatype == common.VideoId.MOVIE:\n- library.add_to_library(videoid, item['file'], False, False)\n-\n- if videoid.mediatype != common.VideoId.SHOW:\n- continue\n-\n- for season_key in list(item):\n- if season_key in ['videoid', 'nfo_export', 'exclude_from_update']:\n- continue\n-\n- for episode_key in list(item[season_key]):\n- if episode_key in ['videoid', 'nfo_export']:\n- continue\n-\n- library.add_to_library(\n- item[season_key][episode_key]['videoid'].convert_old_videoid_type(),\n- item[season_key][episode_key]['file'],\n- item.get('nfo_export', False),\n- item.get('exclude_from_update', False))\n-\n- xbmcvfs.rename(library_file, library_file + '.bak')\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/upgrade_controller.py", "new_path": "resources/lib/upgrade_controller.py", "diff": "@@ -4,7 +4,7 @@ from __future__ import absolute_import, division, unicode_literals\nimport resources.lib.common as common\n-import resources.lib.upgrade_actions as upgrade_actions\n+# import resources.lib.upgrade_actions as upgrade_actions\nfrom resources.lib.globals import g\nfrom resources.lib.database.db_update import run_local_db_updates, run_shared_db_updates\n@@ -47,8 +47,6 @@ def _perform_service_changes(previous_ver, current_ver):\n\"\"\"Perform actions for an version bump\"\"\"\ncommon.debug('Initialize service upgrade operations, from version {} to {})'\n.format(previous_ver, current_ver))\n- if previous_ver is None:\n- upgrade_actions.migrate_library_to_db()\n# Always leave this to last - After the operations set current version\ng.LOCAL_DB.set_value('service_previous_version', current_ver)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Removed migration from ndb2 no more needed
106,046
12.11.2019 15:12:41
-3,600
50ab1329af8d04f25e8355c3001dd79e238e2b22
Warning info to reconfigure auto-update settings
[ { "change_type": "MODIFY", "old_path": "resources/lib/upgrade_controller.py", "new_path": "resources/lib/upgrade_controller.py", "diff": "@@ -37,6 +37,11 @@ def _perform_addon_changes(previous_ver, current_ver):\n\"\"\"Perform actions for an version bump\"\"\"\ncommon.debug('Initialize addon upgrade operations, from version {} to {})'\n.format(previous_ver, current_ver))\n+ if common.is_less_version(previous_ver, '0.15.9'):\n+ import resources.lib.kodi.ui as ui\n+ msg = ('This update resets the settings to auto-update library.\\r\\n'\n+ 'Therefore only in case you are using auto-update must be reconfigured.')\n+ ui.show_ok_dialog('Netflix upgrade', msg)\n# Clear cache (prevents problems when netflix change data structures)\ng.CACHE.invalidate(True)\n# Always leave this to last - After the operations set current version\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Warning info to reconfigure auto-update settings
106,046
12.11.2019 16:53:52
-3,600
a1bdae36d0c9cfd79982c928dad309cd871c9d2b
Allow disabling sort order on my list Allows you to keep the chosen order of my list also in the addon. This feature is currently only allowed in the US country.
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/shakti.py", "new_path": "resources/lib/api/shakti.py", "diff": "@@ -135,7 +135,8 @@ def video_list_sorted(context_name, context_id=None, perpetual_range_start=None,\nresponse_type = 'stdlist_wid'\n# enum order: AZ|ZA|Suggested|Year\n- sort_order_types = ['az', 'za', 'su', 'yr']\n+ # sort order the \"mylist\" is supported only in US country, the only way to query is use 'az'\n+ sort_order_types = ['az', 'za', 'su', 'yr'] if not context_name == 'mylist' else ['az', 'az']\nreq_sort_order_type = sort_order_types[\nint(g.ADDON.getSettingInt('_'.join(('menu_sortorder', menu_data['path'][1]))))]\nbase_path.append(req_sort_order_type)\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/kodi/listings.py", "new_path": "resources/lib/kodi/listings.py", "diff": "@@ -275,10 +275,11 @@ def build_video_listing(video_list, menu_data, pathitems=None, genre_id=None):\nTrue))\nadd_items_previous_next_page(directory_items, pathitems,\nvideo_list.perpetual_range_selector, genre_id)\n+ sort_type = 'sort_nothing'\n+ if menu_data['path'][1] == 'myList' and \\\n+ int(g.ADDON.getSettingInt('menu_sortorder_mylist')) == 0:\n# At the moment it is not possible to make a query with results sorted for the 'mylist',\n# so we adding the sort order of kodi\n- sort_type = 'sort_nothing'\n- if menu_data['path'][1] == 'myList':\nsort_type = 'sort_label_ignore_folders'\nparent_menu_data = g.LOCAL_DB.get_value(menu_data['path'][1],\ntable=TABLE_MENU_DATA, data_type=dict)\n" }, { "change_type": "MODIFY", "old_path": "resources/settings.xml", "new_path": "resources/settings.xml", "diff": "</category>\n<category label=\"30166\"><!--Main menu items-->\n<setting id=\"show_menu_mylist\" type=\"bool\" label=\"30167\" default=\"true\"/>\n- <setting id=\"menu_sortorder_mylist\" type=\"select\" label=\"30149\" lvalues=\"30150|30151|30152|30153\" visible=\"false\" subsetting=\"true\" default=\"0\"/> <!-- is currently (05-05-2019) no longer supported by the netflix server-->\n+ <setting id=\"menu_sortorder_mylist\" type=\"select\" label=\"30149\" lvalues=\"30150|13106\" visible=\"eq(-1,true)\" subsetting=\"true\" default=\"0\"/> <!-- sort order is supported only to US country-->\n<setting id=\"show_menu_continuewatching\" type=\"bool\" label=\"30168\" default=\"true\"/>\n<setting id=\"show_menu_chosenforyou\" type=\"bool\" label=\"30169\" default=\"true\"/>\n<setting id=\"show_menu_recentlyadded\" type=\"bool\" label=\"30145\" default=\"true\"/>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Allow disabling sort order on my list Allows you to keep the chosen order of my list also in the addon. This feature is currently only allowed in the US country.
106,046
12.11.2019 20:51:59
-3,600
712a73c0d59e5737a44c3602ca17bc2c13905ce6
ESN generation fix ro.nrdp.modelgroup not always exists in L1 devices instead is used a sort of product name this change may not work with all L1 devices
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/website.py", "new_path": "resources/lib/api/website.py", "diff": "@@ -224,10 +224,13 @@ def generate_esn(user_data):\n['/system/bin/getprop', 'ro.nrdp.modelgroup']).strip(' \\t\\n\\r')\nesn = ('NFANDROID2-PRV-' if has_product_characteristics_tv else 'NFANDROID1-PRV-')\n- if not nrdp_modelgroup:\n- esn += 'T-L3-'\n- else:\n+ if has_product_characteristics_tv:\n+ if nrdp_modelgroup:\nesn += nrdp_modelgroup + '-'\n+ else:\n+ esn += model.replace(' ', '').upper() + '-'\n+ else:\n+ esn += 'T-L3-'\nesn += '{:=<5.5}'.format(manufacturer.upper())\nesn += model.replace(' ', '=').upper()\nesn = sub(r'[^A-Za-z0-9=-]', '=', esn)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
ESN generation fix ro.nrdp.modelgroup not always exists in L1 devices instead is used a sort of product name this change may not work with all L1 devices
106,046
13.11.2019 10:27:16
-3,600
b66a2dbe04a3490c8ffd202a34dca4004a72df53
Show ask for confirmation dialog when check library updates
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -947,3 +947,7 @@ msgstr \"\"\nmsgctxt \"#30230\"\nmsgid \"Check for updates now\"\nmsgstr \"\"\n+\n+msgctxt \"#30231\"\n+msgid \"Do you want to check update now?\"\n+msgstr \"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/navigation/library.py", "new_path": "resources/lib/navigation/library.py", "diff": "@@ -93,6 +93,9 @@ class LibraryActionExecutor(object):\n\"\"\"\nPerform an auto update of Kodi library to add new seasons/episodes of tv shows\n\"\"\"\n+ if not ui.ask_for_confirmation(common.get_local_string(30065),\n+ common.get_local_string(30231)):\n+ return\nlibrary.auto_update_library(False, False)\ndef service_auto_upd_run_now(self, pathitems): # pylint: disable=unused-argument\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Show ask for confirmation dialog when check library updates
106,046
13.11.2019 10:32:41
-3,600
7943cd96ae360beeb0edf1e05d692c9a2b3f5be7
Changed ask_for_confirmation description
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/ui/dialogs.py", "new_path": "resources/lib/kodi/ui/dialogs.py", "diff": "@@ -79,7 +79,7 @@ def ask_for_removal_confirmation():\ndef ask_for_confirmation(title, message):\n- \"\"\"Ask the user to finally remove title from the Kodi library\"\"\"\n+ \"\"\"Ask the user to confirm an operation\"\"\"\nreturn xbmcgui.Dialog().yesno(heading=title, line1=message)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Changed ask_for_confirmation description
106,046
13.11.2019 13:54:23
-3,600
71eeb5b7955cb9979ed25c872e0a1e58e8ec4879
Fixed python bug in datetime.strptime
[ { "change_type": "MODIFY", "old_path": "resources/lib/common/data_conversion.py", "new_path": "resources/lib/common/data_conversion.py", "diff": "from __future__ import absolute_import, division, unicode_literals\nimport json\nimport datetime\n+import time\nfrom ast import literal_eval\n# Workaround for http://bugs.python.org/issue8098 only to py2 caused by _conv_string_to_datetime()\n# Error: ImportError: Failed to import _strptime because the import lockis held by another thread.\n@@ -72,4 +73,8 @@ def _conv_string_to_json(value):\ndef _conv_string_to_datetime(value):\n+ try:\nreturn datetime.datetime.strptime(value, '%Y-%m-%d %H:%M:%S.%f')\n+ except TypeError:\n+ # Python bug https://bugs.python.org/issue27400\n+ return datetime.datetime(*(time.strptime(value, '%Y-%m-%d %H:%M:%S.%f')[0:6]))\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed python bug in datetime.strptime
106,046
14.11.2019 08:31:25
-3,600
9956276050e6e64472d4f29cf97239d2478f3045
Fixed warning info
[ { "change_type": "MODIFY", "old_path": "resources/lib/upgrade_controller.py", "new_path": "resources/lib/upgrade_controller.py", "diff": "@@ -37,7 +37,7 @@ def _perform_addon_changes(previous_ver, current_ver):\n\"\"\"Perform actions for an version bump\"\"\"\ncommon.debug('Initialize addon upgrade operations, from version {} to {})'\n.format(previous_ver, current_ver))\n- if common.is_less_version(previous_ver, '0.15.9'):\n+ if previous_ver and common.is_less_version(previous_ver, '0.15.9'):\nimport resources.lib.kodi.ui as ui\nmsg = ('This update resets the settings to auto-update library.\\r\\n'\n'Therefore only in case you are using auto-update must be reconfigured.')\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed warning info
106,046
14.11.2019 09:48:29
-3,600
45ec8fbf8f0b076b9a70c5ac5c171bc60e732095
Disable auto-update/auto-sync with logout
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "@@ -284,9 +284,18 @@ class NetflixSession(object):\ndef logout(self, url):\n\"\"\"Logout of the current account and reset the session\"\"\"\ncommon.debug('Logging out of current account')\n+\n+ # Disable and reset auto-update / auto-sync features\n+ g.settings_monitor_suspended(True)\n+ g.ADDON.setSettingInt('lib_auto_upd_mode', 0)\n+ g.ADDON.setSettingBool('lib_sync_mylist', False)\n+ g.settings_monitor_suspended(False)\n+ g.SHARED_DB.delete_key('sync_mylist_profile_guid')\n+\ncookies.delete(self.account_hash)\nself._get('logout')\ncommon.purge_credentials()\n+\ncommon.info('Logout successful')\nui.show_notification(common.get_local_string(30113))\nself._init_session()\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Disable auto-update/auto-sync with logout
106,046
14.11.2019 09:55:15
-3,600
d352db8337c2f2f1d1cc4d054b3d6df0c80c0036
Added stub implementation for xbmcaddon.setSettingInt
[ { "change_type": "MODIFY", "old_path": "test/xbmcaddon.py", "new_path": "test/xbmcaddon.py", "diff": "@@ -66,3 +66,7 @@ class Addon:\ndef setSettingBool(self, key, value):\n''' A stub implementation for the xbmcaddon Addon class setSettingBool() method '''\nself.setSetting(key, bool(value))\n+\n+ def setSettingInt(self, key, value):\n+ ''' A stub implementation for the xbmcaddon Addon class setSettingInt() method '''\n+ self.setSetting(key, int(value))\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Added stub implementation for xbmcaddon.setSettingInt
106,046
14.11.2019 16:41:26
-3,600
cb3aea5e6696cf58efe0e020d21b36123305f5c7
Fix missing escape
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -937,7 +937,7 @@ msgid \"Synchronize Kodi library with My List\"\nmsgstr \"\"\nmsgctxt \"#30228\"\n-msgid \"Use \"My list\" of the current profile\"\n+msgid \"Use \\\"My list\\\" of the current profile\"\nmsgstr \"\"\nmsgctxt \"#30229\"\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fix missing escape
106,046
13.11.2019 15:16:04
-3,600
28b9e0270008382f05c2a90aa4e650910dfd94dd
Modified logging functions to save cpu load
[ { "change_type": "MODIFY", "old_path": "addon.py", "new_path": "addon.py", "diff": "@@ -103,6 +103,7 @@ if __name__ == '__main__':\n# pylint: disable=broad-except\n# Initialize variables in common module scope\n# (necessary when reusing language invoker)\n+ common.reset_log_level_global_var()\ncommon.info('Started (Version {})'.format(g.VERSION))\ncommon.info('URL is {}'.format(g.URL))\nsuccess = False\n" }, { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -288,8 +288,8 @@ msgctxt \"#30065\"\nmsgid \"Auto-update for tv shows seasons and episodes\"\nmsgstr \"\"\n-msgctxt \"#30066\" # No more used\n-msgid \"never\"\n+msgctxt \"#30066\"\n+msgid \"Debug logging level\"\nmsgstr \"\"\nmsgctxt \"#30067\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/common/logging.py", "new_path": "resources/lib/common/logging.py", "diff": "@@ -8,14 +8,38 @@ import xbmc\nfrom resources.lib.globals import g\n+__LOG_LEVEL__ = None\n-def log(msg, exc=None, level=xbmc.LOGDEBUG):\n- \"\"\"Log a message to the Kodi logfile.\n- If msg contains a format placeholder for exc and exc is not none,\n- exc will be formatted into the message.\"\"\"\n- msg = msg.format(exc=exc) if exc is not None and '{exc}' in msg else msg\n- # if g.PY_IS_VER2 and isinstance(msg, str):\n- # msg = msg.decode('utf-8')\n+\n+def get_log_level():\n+ \"\"\"\n+ Lazily read the log level settings\n+ \"\"\"\n+ # pylint: disable=global-statement\n+ global __LOG_LEVEL__\n+ if __LOG_LEVEL__ is None:\n+ try:\n+ __LOG_LEVEL__ = g.ADDON.getSettingString('debug_log_level')\n+ except Exception: # pylint: disable=broad-except\n+ # If settings.xml was not created yet, as at first service run\n+ # g.ADDON.getSettingString('debug_log_level') will thrown a TypeError\n+ # If any other error appears, we don't want the service to crash,\n+ # let's return 'Disabled' in all case\n+ __LOG_LEVEL__ = 'Disabled'\n+ return __LOG_LEVEL__\n+\n+\n+def reset_log_level_global_var():\n+ \"\"\"Reset log level global var, in order to update the value from settings\"\"\"\n+ # pylint: disable=global-statement\n+ global __LOG_LEVEL__\n+ __LOG_LEVEL__ = None\n+\n+\n+def _log(msg, level, *args, **kwargs):\n+ \"\"\"Log a message to the Kodi logfile.\"\"\"\n+ if args or kwargs:\n+ msg = msg.format(*args, **kwargs)\nxbmc.log(g.py2_encode(\n'[{identifier} ({handle})] {msg}'.format(identifier=g.ADDON_ID,\nhandle=g.PLUGIN_HANDLE,\n@@ -23,24 +47,30 @@ def log(msg, exc=None, level=xbmc.LOGDEBUG):\nlevel)\n-def debug(msg='{exc}', exc=None):\n+def debug(msg, *args, **kwargs):\n\"\"\"Log a debug message.\"\"\"\n- log(msg, exc, xbmc.LOGDEBUG)\n+ if get_log_level() != 'Verbose':\n+ return\n+ _log(msg, xbmc.LOGDEBUG, *args, **kwargs)\n-def info(msg='{exc}', exc=None):\n+def info(msg, *args, **kwargs):\n\"\"\"Log an info message.\"\"\"\n- log(msg, exc, xbmc.LOGINFO)\n+ if get_log_level() == 'Disabled':\n+ return\n+ _log(msg, xbmc.LOGINFO, *args, **kwargs)\n-def warn(msg='{exc}', exc=None):\n+def warn(msg, *args, **kwargs):\n\"\"\"Log a warning message.\"\"\"\n- log(msg, exc, xbmc.LOGWARNING)\n+ if get_log_level() == 'Disabled':\n+ return\n+ _log(msg, xbmc.LOGWARNING, *args, **kwargs)\n-def error(msg='{exc}', exc=None):\n+def error(msg, *args, **kwargs):\n\"\"\"Log an error message.\"\"\"\n- log(msg, exc, xbmc.LOGERROR)\n+ _log(msg, xbmc.LOGERROR, *args, **kwargs)\ndef logdetails(func):\n@@ -63,13 +93,16 @@ def logdetails(func):\nfor key, value in iteritems(kwargs)\nif key not in ['account', 'credentials']]\nif arguments:\n- log('{cls}::{method} called with arguments {args}'\n- .format(cls=class_name, method=name, args=''.join(arguments)))\n+ _log('{cls}::{method} called with arguments {args}'\n+ .format(cls=class_name, method=name, args=''.join(arguments)),\n+ xbmc.LOGDEBUG)\nelse:\n- log('{cls}::{method} called'.format(cls=class_name, method=name))\n+ _log('{cls}::{method} called'.format(cls=class_name, method=name),\n+ xbmc.LOGDEBUG)\nresult = func(*args, **kwargs)\n- log('{cls}::{method} return {result}'\n- .format(cls=class_name, method=name, result=result))\n+ _log('{cls}::{method} return {result}'\n+ .format(cls=class_name, method=name, result=result),\n+ xbmc.LOGDEBUG)\nreturn result\nwrapped.__doc__ = func.__doc__\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/settings_monitor.py", "new_path": "resources/lib/services/settings_monitor.py", "diff": "@@ -26,6 +26,7 @@ class SettingsMonitor(xbmc.Monitor):\nself._on_change()\ndef _on_change(self):\n+ common.reset_log_level_global_var()\ncommon.debug('SettingsMonitor: settings have been changed, started checks')\nreboot_addon = False\nclean_cache = False\n" }, { "change_type": "MODIFY", "old_path": "resources/settings.xml", "new_path": "resources/settings.xml", "diff": "<setting id=\"esn\" type=\"text\" label=\"30034\" value=\"\" default=\"\"/>\n<setting id=\"reset_esn\" type=\"action\" label=\"30217\" action=\"RunPlugin(plugin://plugin.video.netflix/action/reset_esn/)\" option=\"close\"/>\n<setting label=\"30116\" type=\"lsep\"/><!--Advanced Addon Configuration-->\n+ <setting id=\"debug_log_level\" type=\"labelenum\" label=\"30066\" values=\"Disabled|Info|Verbose\" default=\"0\"/>\n<setting id=\"run_init_configuration\" type=\"bool\" label=\"30158\" default=\"true\"/>\n<setting id=\"enable_ipc_over_http\" type=\"bool\" label=\"30139\" default=\"false\"/>\n<setting id=\"enable_timing\" type=\"bool\" label=\"30134\" default=\"false\"/>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Modified logging functions to save cpu load
106,046
13.11.2019 15:31:42
-3,600
36717db1c86a4e739f12eae52700d7fc7af00705
Changes to log calls
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/library.py", "new_path": "resources/lib/kodi/library.py", "diff": "@@ -586,7 +586,8 @@ def auto_update_library(sync_with_mylist, silent):\nif _is_auto_update_library_running():\nreturn\nexecute_lib_tasks_method = execute_library_tasks_silently if silent else execute_library_tasks\n- common.log('Starting auto update library - check updates for tv shows (sync with My List is {})'\n+ common.debug(\n+ 'Starting auto update library - check updates for tv shows (sync with My List is {})'\n.format(sync_with_mylist))\ng.SHARED_DB.set_value('library_auto_update_is_running', True)\ng.SHARED_DB.set_value('library_auto_update_start_time', datetime.now())\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/android_crypto.py", "new_path": "resources/lib/services/msl/android_crypto.py", "diff": "@@ -60,7 +60,7 @@ class AndroidMSLCrypto(MSLBaseCrypto):\nif not key_request:\nraise MSLError('Widevine CryptoSession getKeyRequest failed!')\n- common.log('Widevine CryptoSession getKeyRequest successful. Size: {}'\n+ common.debug('Widevine CryptoSession getKeyRequest successful. Size: {}'\n.format(len(key_request)))\nreturn [{\n'scheme': 'WIDEVINE',\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/http_server.py", "new_path": "resources/lib/services/msl/http_server.py", "diff": "@@ -73,6 +73,6 @@ class MSLTCPServer(TCPServer):\n\"\"\"Override TCPServer to allow usage of shared members\"\"\"\ndef __init__(self, server_address):\n\"\"\"Initialization of MSLTCPServer\"\"\"\n- common.log('Constructing MSLTCPServer')\n+ common.info('Constructing MSLTCPServer')\nself.msl_handler = MSLHandler()\nTCPServer.__init__(self, server_address, MSLHttpRequestHandler)\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/http_server.py", "new_path": "resources/lib/services/nfsession/http_server.py", "diff": "@@ -47,6 +47,6 @@ class NetflixTCPServer(TCPServer):\n\"\"\"Override TCPServer to allow usage of shared members\"\"\"\ndef __init__(self, server_address):\n\"\"\"Initialization of MSLTCPServer\"\"\"\n- common.log('Constructing NetflixTCPServer')\n+ common.info('Constructing NetflixTCPServer')\nself.netflix_session = NetflixSession()\nTCPServer.__init__(self, server_address, NetflixHttpRequestHandler)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Changes to log calls
106,046
14.11.2019 20:27:01
-3,600
89fb4d422338e0c22eec5959e653e5f316c49dd8
Updated support request
[ { "change_type": "MODIFY", "old_path": ".github/ISSUE_TEMPLATE/support_request.md", "new_path": ".github/ISSUE_TEMPLATE/support_request.md", "diff": "@@ -19,8 +19,6 @@ Used Operating system:\n* [ ] Windows\n### Describe your help request\n-<!--- A bug report that is not clear will be closed -->\n-<!--- WHEN APPROPRIATE (MOST OF THE CASES) ALWAYS ATTACH THE LINK FOR KODI LOG FILE, SEE BELOW -->\n<!--- Put your text below this line -->\n#### Screenshots\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Updated support request
106,046
15.11.2019 09:30:59
-3,600
1e32f425a163fe3cfc47d7de31b6ad9ef1523a75
Fixed pagination of episodes
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/shakti.py", "new_path": "resources/lib/api/shakti.py", "diff": "@@ -202,8 +202,9 @@ def seasons(videoid):\[email protected]_execution(immediate=False)\[email protected]_output(g, cache.CACHE_COMMON)\n-def episodes(videoid):\[email protected]_output(g, cache.CACHE_COMMON, identify_from_kwarg_name='videoid_value',\n+ identify_append_from_kwarg_name='perpetual_range_start')\n+def episodes(videoid, videoid_value, perpetual_range_start=None): # pylint: disable=unused-argument\n\"\"\"Retrieve episodes of a season\"\"\"\nif videoid.mediatype != common.VideoId.SEASON:\nraise common.InvalidVideoId('Cannot request episode list for {}'\n@@ -216,7 +217,8 @@ def episodes(videoid):\nART_PARTIAL_PATHS + [['title']]))\ncallargs = {\n'paths': paths,\n- 'length_params': ['stdlist_wid', ['seasons', videoid.seasonid, 'episodes']]\n+ 'length_params': ['stdlist_wid', ['seasons', videoid.seasonid, 'episodes']],\n+ 'perpetual_range_start': perpetual_range_start\n}\nreturn EpisodeList(videoid, common.make_call('perpetual_path_request', callargs))\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/navigation/directory.py", "new_path": "resources/lib/navigation/directory.py", "diff": "@@ -13,6 +13,11 @@ import resources.lib.kodi.listings as listings\nimport resources.lib.kodi.ui as ui\nimport resources.lib.kodi.library as library\n+try: # Python 2\n+ unicode\n+except NameError: # Python 3\n+ unicode = str # pylint: disable=redefined-builtin\n+\nclass DirectoryBuilder(object):\n\"\"\"Builds directory listings\"\"\"\n@@ -115,7 +120,12 @@ class DirectoryBuilder(object):\ndef season(self, videoid, pathitems):\n\"\"\"Show episodes of a season\"\"\"\n- listings.build_episode_listing(videoid, api.episodes(videoid), pathitems)\n+ listings.build_episode_listing(videoid,\n+ api.episodes(\n+ videoid,\n+ videoid_value=unicode(videoid),\n+ perpetual_range_start=self.perpetual_range_start),\n+ pathitems)\n_handle_endofdirectory(self.dir_update_listing)\[email protected]_execution(immediate=False)\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "@@ -380,10 +380,10 @@ class NetflixSession(object):\nrequest_size = apipaths.MAX_PATH_REQUEST_SIZE\nresponse_size = request_size + 1\n- # Note: when the request is made with 'genres' context,\n+ # Note: when the request is made with 'genres' or 'seasons' context,\n# the response strangely does not respect the number of objects\n# requested, returning 1 more item, i couldn't understand why\n- if context_name == 'genres':\n+ if context_name in ['genres', 'seasons']:\nresponse_size += 1\nnumber_of_requests = 100 if no_limit_req else 2\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed pagination of episodes
106,046
15.11.2019 10:04:23
-3,600
ff15d3357a24d57f6eb56e4ce1c96f8de3c2d9fb
Changed name of the trailers menu It not only lists trailers but also summaries, teasers, film clips etc..
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -17,6 +17,7 @@ The trademark \"Netflix\" is registered by \"Netflix, Inc.\"\n- Search Netflix (incl. suggestions)\n- Netflix categories, recommendations, \"my list\" & continue watching\n- Browse all movies and all TV shows Netflix style includes genres\n+- Browse trailers & more of TV shows and movies (by context menu)\n- Rate show/movie\n- Add & remove to/from \"my list\"\n- Export of complete shows & movies in (Kodi) local database\n" }, { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -741,11 +741,11 @@ msgid \"Open UpNext Addon settings\"\nmsgstr \"\"\nmsgctxt \"#30179\"\n-msgid \"Show the trailers\"\n+msgid \"Show trailers & more\"\nmsgstr \"\"\n-msgctxt \"#30180\"\n-msgid \"No trailers available\"\n+msgctxt \"#30180\" # No more used\n+msgid \"NotUsed\"\nmsgstr \"\"\nmsgctxt \"#30181\"\n" }, { "change_type": "MODIFY", "old_path": "resources/language/resource.language.it_it/strings.po", "new_path": "resources/language/resource.language.it_it/strings.po", "diff": "@@ -741,12 +741,12 @@ msgid \"Open UpNext Addon settings\"\nmsgstr \"Apri impostazioni UpNext Addon\"\nmsgctxt \"#30179\"\n-msgid \"Show the trailers\"\n+msgid \"Show trailers & more\"\nmsgstr \"Mostra i trailers\"\nmsgctxt \"#30180\"\n-msgid \"No trailers available\"\n-msgstr \"Nessun trailer disponibile\"\n+msgid \"NotUsed\"\n+msgstr \"\"\nmsgctxt \"#30181\"\nmsgid \"Disable subtitles if there are no forced subtitles streams (Works only if Kodi Player is set to \\\"Only forced\\\" subtitles)\"\n" }, { "change_type": "MODIFY", "old_path": "resources/language/resource.language.nl_nl/strings.po", "new_path": "resources/language/resource.language.nl_nl/strings.po", "diff": "@@ -733,12 +733,12 @@ msgid \"Open UpNext Addon settings\"\nmsgstr \"Open de Up Next add-on instellingen\"\nmsgctxt \"#30179\"\n-msgid \"Show the trailers\"\n+msgid \"Show trailers & more\"\nmsgstr \"Toon voorfilmpjes\"\nmsgctxt \"#30180\"\n-msgid \"No trailers available\"\n-msgstr \"Geen voorfilmpjes beschikbaar\"\n+msgid \"NotUsed\"\n+msgstr \"\"\nmsgctxt \"#30181\"\nmsgid \"Disable subtitles if there are no forced subtitles streams (Works only if Kodi Player is set to \\\"Only forced\\\" subtitles)\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/navigation/actions.py", "new_path": "resources/lib/navigation/actions.py", "diff": "@@ -80,7 +80,7 @@ class AddonActionExecutor(object):\nmode=g.MODE_DIRECTORY)\nxbmc.executebuiltin('Container.Update({})'.format(url))\nelse:\n- ui.show_notification(common.get_local_string(30180))\n+ ui.show_notification(common.get_local_string(30111))\[email protected]_execution(immediate=False)\ndef purge_cache(self, pathitems=None): # pylint: disable=unused-argument\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Changed name of the trailers menu It not only lists trailers but also summaries, teasers, film clips etc..
106,046
15.11.2019 16:57:46
-3,600
3aceb8df7f1a7ecf82524fb15b23769397f854a6
Handle membership status of user account
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.en_gb/strings.po", "new_path": "resources/language/resource.language.en_gb/strings.po", "diff": "@@ -744,8 +744,8 @@ msgctxt \"#30179\"\nmsgid \"Show trailers & more\"\nmsgstr \"\"\n-msgctxt \"#30180\" # No more used\n-msgid \"NotUsed\"\n+msgctxt \"#30180\"\n+msgid \"There has been a problem with login, it is possible that your account has not been confirmed or renewed.\"\nmsgstr \"\"\nmsgctxt \"#30181\"\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/api/website.py", "new_path": "resources/lib/api/website.py", "diff": "@@ -11,7 +11,7 @@ import resources.lib.common as common\nfrom resources.lib.database.db_utils import (TABLE_SESSION)\nfrom resources.lib.globals import g\nfrom .paths import resolve_refs\n-from .exceptions import (InvalidProfilesError, InvalidAuthURLError,\n+from .exceptions import (InvalidProfilesError, InvalidAuthURLError, InvalidMembershipStatusError,\nWebsiteParsingError, LoginValidateError)\ntry: # Python 2\n@@ -56,11 +56,19 @@ def extract_session_data(content):\nthe session relevant data from the HTML page\n\"\"\"\ncommon.debug('Extracting session data...')\n- falcor_cache = extract_json(content, 'falcorCache')\nreact_context = extract_json(content, 'reactContext')\n- extract_profiles(falcor_cache)\nuser_data = extract_userdata(react_context)\n+ if user_data.get('membershipStatus') != 'CURRENT_MEMBER':\n+ # When NEVER_MEMBER it is possible that the account has not been confirmed or renewed\n+ common.error('Can not login, the Membership status is {}',\n+ user_data.get('membershipStatus'))\n+ raise InvalidMembershipStatusError(user_data.get('membershipStatus'))\n+\napi_data = extract_api_data(react_context)\n+ # Note: falcor cache does not exist if membershipStatus is not CURRENT_MEMBER\n+ falcor_cache = extract_json(content, 'falcorCache')\n+ extract_profiles(falcor_cache)\n+\n# Save only some info of the current profile from user data\ng.LOCAL_DB.set_value('build_identifier', user_data.get('BUILD_IDENTIFIER'), TABLE_SESSION)\nif not g.LOCAL_DB.get_value('esn', table=TABLE_SESSION):\n@@ -69,10 +77,6 @@ def extract_session_data(content):\n# Save api urls\nfor key, path in list(api_data.items()):\ng.LOCAL_DB.set_value(key, path, TABLE_SESSION)\n- if user_data.get('membershipStatus') != 'CURRENT_MEMBER':\n- common.warn('Membership status is not CURRENT_MEMBER: ', user_data)\n- # Ignore this for now\n- # raise InvalidMembershipStatusError(user_data.get('membershipStatus'))\ndef validate_session_data(content):\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "@@ -19,7 +19,8 @@ import resources.lib.api.paths as apipaths\nimport resources.lib.kodi.ui as ui\nfrom resources.lib.api.exceptions import (NotLoggedInError, LoginFailedError, LoginValidateError,\n- APIError, MissingCredentialsError, WebsiteParsingError)\n+ APIError, MissingCredentialsError, WebsiteParsingError,\n+ InvalidMembershipStatusError)\ntry: # Python 2\nunicode\n@@ -148,6 +149,8 @@ class NetflixSession(object):\ncommon.info('Login prefetch: No stored credentials are available')\nexcept (LoginFailedError, LoginValidateError):\nui.show_notification(common.get_local_string(30009))\n+ except InvalidMembershipStatusError:\n+ ui.show_notification(common.get_local_string(30180), time=10000)\[email protected]_execution(immediate=True)\ndef _is_logged_in(self):\n@@ -205,6 +208,8 @@ class NetflixSession(object):\ntry:\nwebsite.extract_session_data(self._get('profiles'))\nself.update_session_data()\n+ except InvalidMembershipStatusError:\n+ raise\nexcept WebsiteParsingError:\n# it is possible that cookies may not work anymore,\n# it should be due to updates in the website,\n@@ -268,6 +273,11 @@ class NetflixSession(object):\nreturn False\nraise\nwebsite.extract_session_data(login_response)\n+ except InvalidMembershipStatusError:\n+ ui.show_error_info(common.get_local_string(30008),\n+ common.get_local_string(30180),\n+ False, True)\n+ return False\nexcept Exception as exc:\nimport traceback\ncommon.error(traceback.format_exc())\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Handle membership status of user account
106,046
15.11.2019 18:47:08
-3,600
99115c6c0af3fec182087c85446e715803bebf78
add reuselanguageinvoker pr link
[ { "change_type": "MODIFY", "old_path": "addon.py", "new_path": "addon.py", "diff": "@@ -20,6 +20,7 @@ import xbmcplugin\n# Import and initialize globals right away to avoid stale values from the last\n# addon invocation. Otherwise Kodi's reuseLanguageInvoker will cause some\n# really quirky behavior!\n+# PR: https://github.com/xbmc/xbmc/pull/13814\nfrom resources.lib.globals import g\ng.init_globals(sys.argv)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
add reuselanguageinvoker pr link
106,046
16.11.2019 09:29:39
-3,600
4e3ccc1847695393c3b2c2aa143a480a98fa89ff
Version bump (0.15.9)
[ { "change_type": "MODIFY", "old_path": "addon.xml", "new_path": "addon.xml", "diff": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n-<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.8\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n+<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.9\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n<requires>\n<import addon=\"xbmc.python\" version=\"2.26.0\"/>\n<import addon=\"script.module.addon.signals\" version=\"0.0.3\"/>\n<forum>https://forum.kodi.tv/showthread.php?tid=329767</forum>\n<source>https://github.com/CastagnaIT/plugin.video.netflix</source>\n<news>\n+v0.15.9 (2019-11-16)\n+-Removed limit to perform auto-update and auto-sync with my list only with main profile\n+-Added possibility to choose the profile to perform auto-sync with my list\n+-Auto-sync with my list now sync also the movies\n+-Auto-update now can be performed in manual and scheduled mode\n+-Purge library now ensures complete cleaning of the database and files\n+-Added possibility to disable sort order of my list from addon settings\n+-Updated user agents\n+-Modified debug logging in order to save cpu load\n+-Fixed pagination of episodes\n+-Fixed unhandled error of membership user account status\n+-When set to one profile the Kodi library is no longer modified by other profiles\n+-A lot of fixes/improvements to compatibility between py2 and py3\n+-Updated it, pl, pt_BR, hr_HR translations\n+-Minor fixes\n+\nv0.15.8 (2019-10-31)\n-Fixed addon open issue caused to a broken cookies\n-Updated de translations\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Version bump (0.15.9)
106,046
17.11.2019 14:29:21
-3,600
87f14507690940cfdf0f1bf84b8906b1048a3e4e
Fixed wrong settings name
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/library.py", "new_path": "resources/lib/kodi/library.py", "diff": "@@ -735,7 +735,7 @@ def _sync_mylist(videoid, task_handler, enabled):\noperation = {\n'export_item': 'add',\n'remove_item': 'remove'}.get(task_handler.__name__)\n- if enabled and operation and g.ADDON.getSettingBool('mylist_library_sync'):\n+ if enabled and operation and g.ADDON.getSettingBool('lib_sync_mylist'):\ncommon.info('Syncing my list due to change of Kodi library')\napi.update_my_list(videoid, operation)\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed wrong settings name
106,046
17.11.2019 15:20:54
-3,600
dd8c9aed742d5d00ee02e92a00bfc3a5fbfafc38
Version bump (0.15.10)
[ { "change_type": "MODIFY", "old_path": "addon.xml", "new_path": "addon.xml", "diff": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n-<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.9\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n+<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.10\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n<requires>\n<import addon=\"xbmc.python\" version=\"2.26.0\"/>\n<import addon=\"script.module.addon.signals\" version=\"0.0.3\"/>\n<forum>https://forum.kodi.tv/showthread.php?tid=329767</forum>\n<source>https://github.com/CastagnaIT/plugin.video.netflix</source>\n<news>\n+v0.15.10 (2019-11-17)\n+-Fixed error in exporting to Kodi library due to wrong settings name\n+-Updated de_de, pt_br translations\n+\n+\nv0.15.9 (2019-11-16)\n-Removed limit to perform auto-update and auto-sync with my list only with main profile\n-Added possibility to choose the profile to perform auto-sync with my list\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Version bump (0.15.10)
106,046
18.11.2019 08:22:43
-3,600
335422596539ba123af07e070eab862cd1f7b2e5
Moved some imports inside func to speedup
[ { "change_type": "MODIFY", "old_path": "addon.py", "new_path": "addon.py", "diff": "@@ -27,11 +27,9 @@ g.init_globals(sys.argv)\nimport resources.lib.common as common\nimport resources.lib.upgrade_controller as upgrade_ctrl\nimport resources.lib.api.shakti as api\n-import resources.lib.kodi.ui as ui\nimport resources.lib.navigation as nav\nimport resources.lib.navigation.directory as directory\nimport resources.lib.navigation.hub as hub\n-import resources.lib.navigation.player as player\nimport resources.lib.navigation.actions as actions\nimport resources.lib.navigation.library as library\n@@ -73,6 +71,7 @@ def route(pathitems):\ncommon.debug('Routing navigation request')\nroot_handler = pathitems[0] if pathitems else g.MODE_DIRECTORY\nif root_handler == g.MODE_PLAY:\n+ import resources.lib.navigation.player as player\nplayer.play(pathitems=pathitems[1:])\nelif root_handler == 'extrafanart':\ncommon.debug('Ignoring extrafanart invocation')\n@@ -116,8 +115,10 @@ if __name__ == '__main__':\nroute(list(filter(None, g.PATH.split('/'))))\nsuccess = True\nexcept common.BackendNotReady:\n+ import resources.lib.kodi.ui as ui\nui.show_backend_not_ready()\nexcept Exception as exc:\n+ import resources.lib.kodi.ui as ui\nimport traceback\ncommon.error(traceback.format_exc())\nui.show_addon_error_info(exc)\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/common/misc_utils.py", "new_path": "resources/lib/common/misc_utils.py", "diff": "# pylint: disable=unused-import\n\"\"\"Miscellanneous utility functions\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n-from datetime import datetime\nfrom functools import wraps\nfrom time import clock\n-import gzip\n-import base64\n-import re\nfrom future.utils import iteritems\ntry: # Python 2\n@@ -162,12 +158,13 @@ def strp(value, form):\n:return: datetime - parsed datetime object\n\"\"\"\n# pylint: disable=broad-except\n- from time import strptime\n+ from datetime import datetime\ndef_value = datetime.utcfromtimestamp(0)\ntry:\nreturn datetime.strptime(value, form)\nexcept TypeError:\ntry:\n+ from time import strptime\nreturn datetime(*(strptime(value, form)[0:6]))\nexcept ValueError:\nreturn def_value\n@@ -212,12 +209,12 @@ def _show_errors(notify_errors, errors):\nfor err in errors]))\n-def compress_data(data):\n- \"\"\"GZIP and b64 encode data\"\"\"\n- out = StringIO()\n- with gzip.GzipFile(fileobj=out, mode='w') as outh:\n- outh.write(data)\n- return base64.standard_b64encode(out.getvalue())\n+# def compress_data(data):\n+# \"\"\"GZIP and b64 encode data\"\"\"\n+# out = StringIO()\n+# with gzip.GzipFile(fileobj=out, mode='w') as outh:\n+# outh.write(data)\n+# return base64.standard_b64encode(out.getvalue())\ndef merge_dicts(dict_to_merge, merged_dict):\n@@ -312,6 +309,7 @@ def convert_seconds_to_hms_str(time):\ndef remove_html_tags(raw_html):\n+ import re\nh = re.compile('<.*?>')\ntext = re.sub(h, '', raw_html)\nreturn text\n@@ -341,6 +339,7 @@ class GetKodiVersion(object):\n# Examples of some types of supported strings:\n# 10.1 Git:Unknown PRE-11.0 Git:Unknown 11.0-BETA1 Git:20111222-22ad8e4\n# 18.1-RC1 Git:20190211-379f5f9903 19.0-ALPHA1 Git:20190419-c963b64487\n+ import re\nbuild_version_str = xbmc.getInfoLabel('System.BuildVersion')\nre_kodi_version = re.search('\\\\d+\\\\.\\\\d+?(?=(\\\\s|-))', build_version_str)\nif re_kodi_version:\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/navigation/player.py", "new_path": "resources/lib/navigation/player.py", "diff": "@@ -5,7 +5,6 @@ from __future__ import absolute_import, division, unicode_literals\nimport xbmc\nimport xbmcplugin\nimport xbmcgui\n-import inputstreamhelper\nfrom resources.lib.globals import g\nimport resources.lib.common as common\n@@ -96,6 +95,7 @@ def get_inputstream_listitem(videoid):\nlist_item.setContentLookup(False)\nlist_item.setMimeType('application/dash+xml')\n+ import inputstreamhelper\nis_helper = inputstreamhelper.Helper('mpd', drm='widevine')\nif not is_helper.check_inputstream():\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/android_crypto.py", "new_path": "resources/lib/services/msl/android_crypto.py", "diff": "\"\"\"Crypto handler for Android platforms\"\"\"\nfrom __future__ import absolute_import, division, unicode_literals\n-from os import urandom\nimport base64\nimport json\n@@ -75,13 +74,13 @@ class AndroidMSLCrypto(MSLBaseCrypto):\ncommon.debug('Widevine CryptoSession provideKeyResponse successful')\ncommon.debug('keySetId: {}', self.keyset_id)\n- def encrypt(self, plaintext, esn):\n+ def encrypt(self, plaintext, esn): # pylint: disable=unused-argument\n\"\"\"\nEncrypt the given Plaintext with the encryption key\n:param plaintext:\n:return: Serialized JSON String of the encryption Envelope\n\"\"\"\n- # pylint: disable=unused-argument\n+ from os import urandom\ninit_vector = urandom(16)\nplaintext = plaintext.encode('utf-8')\n# Add PKCS5Padding\n" }, { "change_type": "MODIFY", "old_path": "resources/lib/services/nfsession/nfsession.py", "new_path": "resources/lib/services/nfsession/nfsession.py", "diff": "from __future__ import absolute_import, division, unicode_literals\nimport time\n-from base64 import urlsafe_b64encode\nfrom functools import wraps\nimport json\nimport requests\n@@ -99,7 +98,9 @@ class NetflixSession(object):\n@property\ndef account_hash(self):\n\"\"\"The unique hash of the current account\"\"\"\n- return urlsafe_b64encode(common.get_credentials().get('email', 'NoMail').encode('utf-8')).decode('utf-8')\n+ from base64 import urlsafe_b64encode\n+ return urlsafe_b64encode(\n+ common.get_credentials().get('email', 'NoMail').encode('utf-8')).decode('utf-8')\ndef update_session_data(self, old_esn=None):\nold_esn = old_esn or g.get_esn()\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Moved some imports inside func to speedup
106,046
18.11.2019 08:23:45
-3,600
b8d56b1f1a57fcd595324de6780ba40a98f0c565
Fixed SQLite thread error on py3 ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id and this is thread id
[ { "change_type": "MODIFY", "old_path": "resources/lib/database/db_base_sqlite.py", "new_path": "resources/lib/database/db_base_sqlite.py", "diff": "@@ -39,7 +39,8 @@ def handle_connection(func):\ntry:\nif not args[0].is_connected:\nargs[0].conn = sql.connect(args[0].db_file_path,\n- isolation_level=CONN_ISOLATION_LEVEL)\n+ isolation_level=CONN_ISOLATION_LEVEL,\n+ check_same_thread=False)\nargs[0].is_connected = True\nconn = args[0].conn\nreturn func(*args, **kwargs)\n@@ -64,7 +65,7 @@ class SQLiteDatabase(db_base.BaseDatabase):\ntry:\ncommon.debug('Trying connection to the database {}', self.db_filename)\n- self.conn = sql.connect(self.db_file_path)\n+ self.conn = sql.connect(self.db_file_path, check_same_thread=False)\ncur = self.conn.cursor()\ncur.execute(str('SELECT SQLITE_VERSION()'))\ncommon.debug('Database connection {} was successful (SQLite ver. {})',\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed SQLite thread error on py3 ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 140332173866752 and this is thread id 140333045176064.
106,046
18.11.2019 08:34:44
-3,600
d54f61cbc4ad9ebc1f93ee4ae6b9021e0a27a3f5
Fixed decode on py3
[ { "change_type": "MODIFY", "old_path": "resources/lib/navigation/player.py", "new_path": "resources/lib/navigation/player.py", "diff": "@@ -155,9 +155,10 @@ def get_upnext_info(videoid, current_episode, metadata):\nnext_episode_id.tvshowid,\nnext_episode_id.seasonid,\nnext_episode_id.episodeid)\n- next_info['play_info'] = {'play_path': xbmc.translatePath(filepath).decode('utf-8')}\n+ next_info['play_info'] = {'play_path': g.py2_decode(xbmc.translatePath(filepath))}\nelse:\n- next_info['play_info'] = {'play_path': common.build_url(videoid=next_episode_id, mode=g.MODE_PLAY)}\n+ next_info['play_info'] = {'play_path': common.build_url(videoid=next_episode_id,\n+ mode=g.MODE_PLAY)}\nif 'creditsOffset' in metadata[0]:\nnext_info['notification_time'] = (metadata[0]['runtime'] -\nmetadata[0]['creditsOffset'])\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed decode on py3
106,046
18.11.2019 10:35:24
-3,600
38bc9652fb2292a1da89b7bf4b09af2ebb83425a
Fixed default logging level
[ { "change_type": "MODIFY", "old_path": "resources/settings.xml", "new_path": "resources/settings.xml", "diff": "<setting id=\"esn\" type=\"text\" label=\"30034\" value=\"\" default=\"\"/>\n<setting id=\"reset_esn\" type=\"action\" label=\"30217\" action=\"RunPlugin(plugin://plugin.video.netflix/action/reset_esn/)\" option=\"close\"/>\n<setting label=\"30116\" type=\"lsep\"/><!--Advanced Addon Configuration-->\n- <setting id=\"debug_log_level\" type=\"labelenum\" label=\"30066\" values=\"Disabled|Info|Verbose\" default=\"0\"/>\n+ <setting id=\"debug_log_level\" type=\"labelenum\" label=\"30066\" values=\"Disabled|Info|Verbose\" default=\"Disabled\"/>\n<setting id=\"run_init_configuration\" type=\"bool\" label=\"30158\" default=\"true\"/>\n<setting id=\"enable_ipc_over_http\" type=\"bool\" label=\"30139\" default=\"false\"/>\n<setting id=\"enable_timing\" type=\"bool\" label=\"30134\" default=\"false\"/>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed default logging level
106,046
18.11.2019 10:38:44
-3,600
5f7113c45d704f8dc0bd50da4d6e48b7627febb4
Print to the log the logging level if enabled
[ { "change_type": "MODIFY", "old_path": "resources/lib/common/logging.py", "new_path": "resources/lib/common/logging.py", "diff": "@@ -20,6 +20,8 @@ def get_log_level():\nif __LOG_LEVEL__ is None:\ntry:\n__LOG_LEVEL__ = g.ADDON.getSettingString('debug_log_level')\n+ if __LOG_LEVEL__ != 'Disabled':\n+ _log('Debug logging level is {}'.format(__LOG_LEVEL__), xbmc.LOGINFO)\nexcept Exception: # pylint: disable=broad-except\n# If settings.xml was not created yet, as at first service run\n# g.ADDON.getSettingString('debug_log_level') will thrown a TypeError\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Print to the log the logging level if enabled
105,992
18.11.2019 14:57:20
-3,600
8ff1633690841c7252f4d0f984ccc94ec8994bce
write dvhe codec for hevc-dv* (Dolby Vision) in manifest
[ { "change_type": "MODIFY", "old_path": "resources/lib/services/msl/converter.py", "new_path": "resources/lib/services/msl/converter.py", "diff": "@@ -147,9 +147,11 @@ def _convert_video_downloadable(downloadable, adaptation_set,\ndef _determine_video_codec(content_profile):\n- if 'hevc' in content_profile:\n+ if content_profile.startswith('hevc'):\n+ if content_profile.startswith('hevc-dv'):\n+ return 'dvhe'\nreturn 'hevc'\n- if 'vp9' in content_profile:\n+ if content_profile.startswith('vp9'):\nreturn 'vp9.0.' + content_profile[14:16]\nreturn 'h264'\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
write dvhe codec for hevc-dv* (Dolby Vision) in manifest
106,046
19.11.2019 16:27:22
-3,600
2d6064f09bb5360574be6270e1f1b481b054e771
Sync with My List only when enabled
[ { "change_type": "MODIFY", "old_path": "resources/lib/navigation/library.py", "new_path": "resources/lib/navigation/library.py", "diff": "@@ -103,7 +103,7 @@ class LibraryActionExecutor(object):\nand if set also synchronize the Netflix \"My List\" with the Kodi library\n\"\"\"\n# Executed by the service in the library_updater module\n- library.auto_update_library(True, True)\n+ library.auto_update_library(g.ADDON.getSettingBool('lib_sync_mylist'), True)\ndef _get_mylist_profile_guid(self):\nreturn g.SHARED_DB.get_value('sync_mylist_profile_guid',\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Sync with My List only when enabled
105,993
19.11.2019 17:01:41
-3,600
468c1b3ffc38ddaf2ef627a1041f19ec4d1fabab
Add make language target This PR includes: A 'make language' target for testing language issues
[ { "change_type": "MODIFY", "old_path": "Makefile", "new_path": "Makefile", "diff": "@@ -14,6 +14,8 @@ include_paths = $(patsubst %,$(name)/%,$(include_files))\nexclude_files = \\*.new \\*.orig \\*.pyc \\*.pyo\nzip_dir = $(name)/\n+languages := de_de es_es fi_fi fr_fr he_il hr_hr it_it ko_kr nl_nl pl_pl pt_br pt_pt sk_sk sv_sv\n+\nblue = \\e[1;34m\nwhite = \\e[1;37m\nreset = \\e[0m\n@@ -28,7 +30,7 @@ clean:\ntest: sanity unit\n-sanity: tox pylint\n+sanity: tox pylint language\ntox:\n@echo -e \"$(white)=$(blue) Starting sanity tox test$(reset)\"\n@@ -38,6 +40,12 @@ pylint:\n@echo -e \"$(white)=$(blue) Starting sanity pylint test$(reset)\"\npylint resources/lib/ test/\n+language:\n+ @echo -e \"$(white)=$(blue) Starting language test$(reset)\"\n+ @-$(foreach lang,$(languages), \\\n+ msgcmp resources/language/resource.language.$(lang)/strings.po resources/language/resource.language.en_gb/strings.po; \\\n+ )\n+\naddon: clean\n@echo -e \"$(white)=$(blue) Starting sanity addon tests$(reset)\"\nkodi-addon-checker --branch=leia\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Add make language target This PR includes: - A 'make language' target for testing language issues
106,046
20.11.2019 16:36:31
-3,600
fc1a76264796e1de33dd5433eb7ebe45b73e9c89
Version bump (0.15.11)
[ { "change_type": "MODIFY", "old_path": "addon.xml", "new_path": "addon.xml", "diff": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n-<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.10\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n+<addon id=\"plugin.video.netflix\" name=\"Netflix\" version=\"0.15.11\" provider-name=\"libdev + jojo + asciidisco + caphm + castagnait\">\n<requires>\n<import addon=\"xbmc.python\" version=\"2.26.0\"/>\n<import addon=\"script.module.addon.signals\" version=\"0.0.3\"/>\n<forum>https://forum.kodi.tv/showthread.php?tid=329767</forum>\n<source>https://github.com/CastagnaIT/plugin.video.netflix</source>\n<news>\n+v0.15.11 (2019-11-20)\n+-Fixed a critical error on auto-update\n+-Fixed some error on py3\n+-Fix to handle dolby vision on Kodi 19\n+-Updated fr_fr, nl_nl translations\n+-Minor fixes\n+\nv0.15.10 (2019-11-17)\n-Fixed error in exporting to Kodi library due to wrong settings name\n-Updated de_de, pt_br translations\n-\nv0.15.9 (2019-11-16)\n-Removed limit to perform auto-update and auto-sync with my list only with main profile\n-Added possibility to choose the profile to perform auto-sync with my list\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Version bump (0.15.11)
106,046
20.11.2019 09:57:24
-3,600
07395622c8a051cc4a05fec1bff6e0e5ff1282a6
Add ask for password dialog
[ { "change_type": "MODIFY", "old_path": "resources/lib/kodi/ui/dialogs.py", "new_path": "resources/lib/kodi/ui/dialogs.py", "diff": "@@ -29,10 +29,7 @@ def ask_credentials():\nheading=common.get_local_string(30005),\ntype=xbmcgui.INPUT_ALPHANUM) or None\ncommon.verify_credentials(email)\n- password = xbmcgui.Dialog().input(\n- heading=common.get_local_string(30004),\n- type=xbmcgui.INPUT_ALPHANUM,\n- option=xbmcgui.ALPHANUM_HIDE_INPUT) or None\n+ password = ask_for_password()\ncommon.verify_credentials(password)\ncommon.set_credentials(email, password)\nreturn {\n@@ -41,6 +38,14 @@ def ask_credentials():\n}\n+def ask_for_password():\n+ \"\"\"Ask the user for the password\"\"\"\n+ return xbmcgui.Dialog().input(\n+ heading=common.get_local_string(30004),\n+ type=xbmcgui.INPUT_ALPHANUM,\n+ option=xbmcgui.ALPHANUM_HIDE_INPUT) or None\n+\n+\ndef ask_for_rating():\n\"\"\"Ask the user for a rating\"\"\"\nheading = '{} {}'.format(common.get_local_string(30019),\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Add ask for password dialog
106,046
20.11.2019 09:58:36
-3,600
1cc4aa0ab82d00566a7b264cfe807488d9f78a61
Allow invalidate individual cache bucket names
[ { "change_type": "MODIFY", "old_path": "resources/lib/cache.py", "new_path": "resources/lib/cache.py", "diff": "@@ -198,20 +198,22 @@ class Cache(object):\n# del self.buckets[bucket]\nself.common.debug('Cache commit successful')\n- def invalidate(self, on_disk=False):\n+ def invalidate(self, on_disk=False, bucket_names=None):\n\"\"\"Clear all cache buckets\"\"\"\n# pylint: disable=global-statement\n- for bucket in BUCKET_NAMES:\n+ if not bucket_names:\n+ bucket_names = BUCKET_NAMES\n+ for bucket in bucket_names:\nself.window.clearProperty(_window_property(bucket))\nif bucket in self.buckets:\ndel self.buckets[bucket]\nif on_disk:\n- self._invalidate_on_disk()\n+ self._invalidate_on_disk(bucket_names)\nself.common.info('Cache invalidated')\n- def _invalidate_on_disk(self):\n- for bucket in BUCKET_NAMES:\n+ def _invalidate_on_disk(self, bucket_names):\n+ for bucket in bucket_names:\nself.common.delete_folder_contents(\nos.path.join(self.cache_path, bucket))\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Allow invalidate individual cache bucket names
106,046
20.11.2019 10:41:19
-3,600
b32b30599d449779bf3f5114462b9f8398362885
Xbmcgui generic window.getControl test implementation
[ { "change_type": "MODIFY", "old_path": "test/xbmcgui.py", "new_path": "test/xbmcgui.py", "diff": "@@ -14,6 +14,51 @@ INPUT_TYPE_NUMBER = 1\nALPHANUM_HIDE_INPUT = 1\n+class Control:\n+ ''' A reimplementation of the xbmcgui Control class '''\n+\n+ def __init__(self):\n+ ''' A stub constructor for the xbmcgui Control class '''\n+\n+\n+class ControlGeneric(Control):\n+ ''' A reimplementation of the xbmcgui Control methods of all control classes '''\n+\n+ def __init__(self): # pylint: disable=super-init-not-called\n+ ''' A stub constructor for the xbmcgui Control class '''\n+\n+ @staticmethod\n+ def getLabel():\n+ ''' A stub implementation for the xbmcgui Control Label class getLabel() method '''\n+ return 'Label'\n+\n+ @staticmethod\n+ def setLabel(label='', font=None, textColor=None, disabledColor=None, shadowColor=None, focusedColor=None, label2=''):\n+ ''' A stub implementation for the xbmcgui Control Label class getLabel() method '''\n+\n+ @staticmethod\n+ def getText():\n+ ''' A stub implementation for the xbmcgui Control edit class getLabel() method '''\n+ return 'Label'\n+\n+ @staticmethod\n+ def setText(value=''):\n+ ''' A stub implementation for the xbmcgui Control edit class getLabel() method '''\n+\n+ @staticmethod\n+ def setType(type=0, heading=''): # pylint: disable=redefined-builtin\n+ ''' A stub implementation for the xbmcgui Control edit class getLabel() method '''\n+\n+ @staticmethod\n+ def getInt():\n+ ''' A stub implementation for the xbmcgui Control slider class getLabel() method '''\n+ return 0\n+\n+ @staticmethod\n+ def setInt(value=0, min=0, delta=1, max=1): # pylint: disable=redefined-builtin\n+ ''' A stub implementation for the xbmcgui Control slider class getLabel() method '''\n+\n+\nclass Dialog:\n''' A reimplementation of the xbmcgui Dialog class '''\n@@ -195,6 +240,7 @@ class Window:\ndef getControl(self, controlId):\n''' A stub implementation for the xbmcgui Window class getControl() method '''\n+ return ControlGeneric()\ndef getProperty(self, key):\n''' A stub implementation for the xbmcgui Window class getProperty() method '''\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Xbmcgui generic window.getControl test implementation
106,046
20.11.2019 17:33:36
-3,600
f9e10f11daba4a2eac63a7a226b72678cea9a1c6
Fixed label control issue with kodi estouchy skin estouchy skin use different tag for label control: <posx><posy> instead of <left><top>
[ { "change_type": "MODIFY", "old_path": "resources/skins/default/1080i/plugin-video-netflix-ParentalControl.xml", "new_path": "resources/skins/default/1080i/plugin-video-netflix-ParentalControl.xml", "diff": "</control>\n<!-- Window text header -->\n<control type=\"label\" id=\"99\">\n- <left>40</left>\n+ <posy>0</posy> <!-- estouchy skin with label control use posy/posx tag instead of top/left -->\n+ <posx>40</posx>\n<top>0</top>\n+ <left>40</left>\n<right>100</right>\n<height>66</height>\n<textcolor>FF000000</textcolor>\n<control type=\"label\" id=\"1\">\n<description>PIN description</description>\n- <left>65</left>\n+ <posy>135</posy>\n+ <posx>65</posx>\n<top>135</top>\n+ <left>65</left>\n<width>600</width>\n<visible>true</visible>\n<scroll>false</scroll>\n<control type=\"label\" id=\"3\">\n<description>Maturity Level description</description>\n- <left>65</left>\n+ <posy>296</posy>\n+ <posx>65</posx>\n<top>296</top>\n+ <left>65</left>\n<width>1000</width>\n<visible>true</visible>\n- <scroll>false</scroll>\n+ <scroll>true</scroll>\n<label>$ADDON[plugin.video.netflix 30232]</label>\n<haspath>false</haspath>\n<font>font14</font>\n<control type=\"label\" id=\"201\">\n<description>ML Little Kids</description>\n- <left>75</left>\n+ <posy>418</posy>\n+ <posx>75</posx>\n<top>418</top>\n+ <left>75</left>\n<width>262</width>\n<visible>true</visible>\n- <scroll>false</scroll>\n+ <scroll>true</scroll>\n<label>$ADDON[plugin.video.netflix 30233]</label>\n<haspath>false</haspath>\n<font>font12</font>\n</control>\n<control type=\"label\" id=\"202\">\n<description>ML Older Kids</description>\n- <left>337</left>\n+ <posy>418</posy>\n+ <posx>337</posx>\n<top>418</top>\n+ <left>337</left>\n<width>262</width>\n<visible>true</visible>\n- <scroll>false</scroll>\n+ <scroll>true</scroll>\n<label>$ADDON[plugin.video.netflix 30234]</label>\n<haspath>false</haspath>\n<font>font12</font>\n</control>\n<control type=\"label\" id=\"203\">\n<description>ML Teens</description>\n- <left>600</left>\n+ <posy>418</posy>\n+ <posx>600</posx>\n<top>418</top>\n+ <left>600</left>\n<width>262</width>\n<visible>true</visible>\n- <scroll>false</scroll>\n+ <scroll>true</scroll>\n<label>$ADDON[plugin.video.netflix 30235]</label>\n<haspath>false</haspath>\n<font>font12</font>\n</control>\n<control type=\"label\" id=\"204\">\n<description>ML Adults</description>\n- <left>863</left>\n+ <posy>418</posy>\n+ <posx>863</posx>\n<top>418</top>\n+ <left>863</left>\n<width>262</width>\n<visible>true</visible>\n- <scroll>false</scroll>\n+ <scroll>true</scroll>\n<label>$ADDON[plugin.video.netflix 30236]</label>\n<haspath>false</haspath>\n<font>font12</font>\n</control>\n<control type=\"label\" id=\"9\">\n<description>ML Current status</description>\n- <left>75</left>\n+ <posy>480</posy>\n+ <posx>75</posx>\n<top>480</top>\n+ <left>75</left>\n<width>1050</width>\n<visible>true</visible>\n<scroll>true</scroll>\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fixed label control issue with kodi estouchy skin estouchy skin use different tag for label control: <posx><posy> instead of <left><top>
106,046
21.11.2019 09:41:30
-3,600
b6b2eee621ce2bcd5b736188efa3ffbd4143b1d9
Adaptation languages
[ { "change_type": "MODIFY", "old_path": "resources/language/resource.language.it_it/strings.po", "new_path": "resources/language/resource.language.it_it/strings.po", "diff": "@@ -33,8 +33,8 @@ msgid \"Recommendations\"\nmsgstr \"Consigliati\"\nmsgctxt \"#30002\"\n-msgid \"Adult Pin\"\n-msgstr \"Pin per il controllo parentale\"\n+msgid \"Enter PIN to watch restricted content\"\n+msgstr \"\"\nmsgctxt \"#30003\"\nmsgid \"Search term\"\n@@ -49,12 +49,12 @@ msgid \"E-mail\"\nmsgstr \"\"\nmsgctxt \"#30006\"\n-msgid \"Adult verification failed\"\n-msgstr \"Controllo parentale non riuscito\"\n+msgid \"Incorrect PIN. Try again.\"\n+msgstr \"\"\nmsgctxt \"#30007\"\n-msgid \"Please Check your adult pin\"\n-msgstr \"Verifica che il pin di controllo parentale sia corretto\"\n+msgid \"Parental Control PIN (4 digits)\"\n+msgstr \"\"\nmsgctxt \"#30008\"\nmsgid \"Login failed\"\n@@ -273,8 +273,8 @@ msgid \"Update inside library\"\nmsgstr \"Aggiorna nella libreria\"\nmsgctxt \"#30062\"\n-msgid \"Enable/disable adult pin. Active:\"\n-msgstr \"Abilita/disabilita controllo parentale. Attivo:\"\n+msgid \"Parental controls\"\n+msgstr \"\"\nmsgctxt \"#30063\"\nmsgid \"new episodes added to library\"\n@@ -453,12 +453,12 @@ msgid \"Invalid PIN\"\nmsgstr \"PIN non valido\"\nmsgctxt \"#30107\"\n-msgid \"Disabled PIN verfication\"\n-msgstr \"Verifica del PIN disabilitata\"\n+msgid \"PIN protection is off.\"\n+msgstr \"\"\nmsgctxt \"#30108\"\n-msgid \"Enabled PIN verfication\"\n-msgstr \"Verifica del PIN abilitata\"\n+msgid \"All content is protected by PIN.\"\n+msgstr \"\"\nmsgctxt \"#30109\"\nmsgid \"Login successful\"\n@@ -951,3 +951,27 @@ msgstr \"Verifica gli aggiornamenti ora\"\nmsgctxt \"#30231\"\nmsgid \"Do you want to check update now?\"\nmsgstr \"Vuoi verificare gli aggiornamenti ora?\"\n+\n+msgctxt \"#30232\"\n+msgid \"Restrict by Maturity Level\"\n+msgstr \"\"\n+\n+msgctxt \"#30233\"\n+msgid \"Little Kids [T]\"\n+msgstr \"\"\n+\n+msgctxt \"#30234\"\n+msgid \"Older Kids\"\n+msgstr \"\"\n+\n+msgctxt \"#30235\"\n+msgid \"Teens [VM14]\"\n+msgstr \"\"\n+\n+msgctxt \"#30236\"\n+msgid \"Adults [VM18]\"\n+msgstr \"\"\n+\n+msgctxt \"#30237\"\n+msgid \"Content for {} will require the PIN to start playback.\"\n+msgstr \"\"\n" }, { "change_type": "MODIFY", "old_path": "resources/language/resource.language.nl_nl/strings.po", "new_path": "resources/language/resource.language.nl_nl/strings.po", "diff": "@@ -33,8 +33,8 @@ msgid \"Recommendations\"\nmsgstr \"Aanbevelingen\"\nmsgctxt \"#30002\"\n-msgid \"Adult Pin\"\n-msgstr \"Pincode\"\n+msgid \"Enter PIN to watch restricted content\"\n+msgstr \"\"\nmsgctxt \"#30003\"\nmsgid \"Search term\"\n@@ -49,12 +49,12 @@ msgid \"E-mail\"\nmsgstr \"E-mail\"\nmsgctxt \"#30006\"\n-msgid \"Adult verification failed\"\n-msgstr \"Code kinderslot incorrect\"\n+msgid \"Incorrect PIN. Try again.\"\n+msgstr \"\"\nmsgctxt \"#30007\"\n-msgid \"Please Check your adult pin\"\n-msgstr \"Controleer de code van het kinderslot\"\n+msgid \"Parental Control PIN (4 digits)\"\n+msgstr \"\"\nmsgctxt \"#30008\"\nmsgid \"Login failed\"\n@@ -273,8 +273,8 @@ msgid \"Update inside library\"\nmsgstr \"Updaten in de bibliotheek\"\nmsgctxt \"#30062\"\n-msgid \"Enable/disable adult pin. Active:\"\n-msgstr \"Adult PIN Inschakelen/uitschakelen. Ingeschakeld:\"\n+msgid \"Parental controls\"\n+msgstr \"\"\nmsgctxt \"#30063\"\nmsgid \"new episodes added to library\"\n@@ -453,12 +453,12 @@ msgid \"Invalid PIN\"\nmsgstr \"Foutieve PIN\"\nmsgctxt \"#30107\"\n-msgid \"Disabled PIN verfication\"\n-msgstr \"PIN verificatie uitgeschakeld\"\n+msgid \"PIN protection is off.\"\n+msgstr \"\"\nmsgctxt \"#30108\"\n-msgid \"Enabled PIN verfication\"\n-msgstr \"Activeer PIN verificatie\"\n+msgid \"All content is protected by PIN.\"\n+msgstr \"\"\nmsgctxt \"#30109\"\nmsgid \"Login successful\"\n@@ -951,3 +951,27 @@ msgstr \"Controleer nu voor updates\"\nmsgctxt \"#30231\"\nmsgid \"Do you want to check update now?\"\nmsgstr \"Wil je nu controleren voor een update?\"\n+\n+msgctxt \"#30232\"\n+msgid \"Restrict by Maturity Level\"\n+msgstr \"\"\n+\n+msgctxt \"#30233\"\n+msgid \"Little Kids [T]\"\n+msgstr \"\"\n+\n+msgctxt \"#30234\"\n+msgid \"Older Kids\"\n+msgstr \"\"\n+\n+msgctxt \"#30235\"\n+msgid \"Teens [VM14]\"\n+msgstr \"\"\n+\n+msgctxt \"#30236\"\n+msgid \"Adults [VM18]\"\n+msgstr \"\"\n+\n+msgctxt \"#30237\"\n+msgid \"Content for {} will require the PIN to start playback.\"\n+msgstr \"\"\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Adaptation languages
106,046
22.11.2019 15:31:46
-3,600
78d226c7d84f661ffcb0e6ef615096269d73bf4d
Fix get error on empty data
[ { "change_type": "MODIFY", "old_path": "resources/lib/api/data_types.py", "new_path": "resources/lib/api/data_types.py", "diff": "@@ -162,8 +162,7 @@ class CustomVideoList:\ndef __init__(self, path_response):\nself.perpetual_range_selector = path_response.get('_perpetual_range_selector')\nself.data = path_response\n- self.title = common.get_local_string(30048)\n- self.videos = self.data['videos']\n+ self.videos = self.data.get('videos')\nself.videoids = _get_videoids(self.videos)\n# self.artitem = next(itervalues(self.videos))\nself.artitem = list(self.videos.values())[0] if self.videos else None\n" } ]
Python
MIT License
castagnait/plugin.video.netflix
Fix get error on empty data