chore(performance): Further speed up of imports
[plugin.video.netflix.git] / addon.py
index 80355f325cae0afd75221e2093d27df83384a3f9..5b2d7e8faa90381dbdd61a81e5d8a69fcccfbf59 100644 (file)
--- a/addon.py
+++ b/addon.py
@@ -3,20 +3,11 @@
 # Module: default
 # Created on: 13.01.2017
 
-# import local classes
-if __package__ is None:
-    import sys
-    import os
-    sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-    from resources.lib.NetflixSession import NetflixSession
-    from resources.lib.KodiHelper import KodiHelper
-    from resources.lib.Navigation import Navigation
-    from resources.lib.Library import Library
-else:
-    from .resources.lib.NetflixSession import NetflixSession
-    from .resources.lib.KodiHelper import KodiHelper
-    from .resources.lib.Navigation import Navigation
-    from .resources.lib.Library import Library
+import sys
+from resources.lib.NetflixSession import NetflixSession
+from resources.lib.KodiHelper import KodiHelper
+from resources.lib.Navigation import Navigation
+from resources.lib.Library import Library
 
 # Setup plugin
 plugin_handle = int(sys.argv[1])
@@ -30,10 +21,10 @@ kodi_helper = KodiHelper(
 netflix_session = NetflixSession(
     cookie_path=kodi_helper.cookie_path,
     data_path=kodi_helper.data_path,
+    verify_ssl=kodi_helper.get_ssl_verification_setting(),
     log_fn=kodi_helper.log
 )
 library = Library(
-    base_url=base_url,
     root_folder=kodi_helper.base_data_path,
     library_settings=kodi_helper.get_custom_library_settings(),
     log_fn=kodi_helper.log
@@ -50,4 +41,5 @@ kodi_helper.set_library(library=library)
 if __name__ == '__main__':
     # Call the router function and pass the plugin call parameters to it.
     # We use string slicing to trim the leading '?' from the plugin call paramstring
+    kodi_helper.log('started')
     navigation.router(paramstring=sys.argv[2][1:])