From 068a842184473e342d7d4278a68a1eb7042e081a Mon Sep 17 00:00:00 2001
From: Abby Gourlay <abbygourlay98@gmail.com>
Date: Sun, 8 Mar 2020 18:07:43 +0000
Subject: [PATCH] Removed profilling code accidentally commited

---
 jellyfin_kodi/jellyfin/api.py |  3 ++-
 jellyfin_kodi/library.py      | 24 ++----------------------
 resources/settings.xml        |  2 +-
 3 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/jellyfin_kodi/jellyfin/api.py b/jellyfin_kodi/jellyfin/api.py
index 66442514..8c704d27 100644
--- a/jellyfin_kodi/jellyfin/api.py
+++ b/jellyfin_kodi/jellyfin/api.py
@@ -399,7 +399,8 @@ class API(object):
             request_settings["verify"] = False
 
         LOG.info("Sending %s request to %s" % (method, path))
-        LOG.debug(request_settings['timeout'], request_settings['headers'])
+        LOG.debug(request_settings['timeout'])
+        LOG.debug(request_settings['headers'])
 
         return request_method(url, **request_settings)
 
diff --git a/jellyfin_kodi/library.py b/jellyfin_kodi/library.py
index 790def45..a1ca26a0 100644
--- a/jellyfin_kodi/library.py
+++ b/jellyfin_kodi/library.py
@@ -127,13 +127,6 @@ class Library(threading.Thread):
     @stop()
     def service(self):
 
-        from kodi_six import xbmc, xbmcaddon
-        from datetime import datetime
-        path = xbmcaddon.Addon(id='plugin.video.jellyfin').getAddonInfo('path')
-        from pyinstrument import Profiler
-
-        profiler = Profiler()
-        profiler.start()
         ''' If error is encountered, it will rerun this function.
             Start new "daemon threads" to process library updates.
             (actual daemon thread is not supported in Kodi)
@@ -153,17 +146,9 @@ class Library(threading.Thread):
             self.worker_userdata()
             self.worker_remove()
             self.worker_notify()
-        profiler.stop()
-        with open(str(path)+'/output-'+str(datetime.now())+'.html', 'w+') as output:
-            output.write(profiler.output_html().encode('utf-8'))
-        if self.pending_refresh:
-            from kodi_six import xbmc, xbmcaddon
-            from datetime import datetime
-            path = xbmcaddon.Addon(id='plugin.video.jellyfin').getAddonInfo('path')
-            from pyinstrument import Profiler
 
-            profiler = Profiler()
-            profiler.start()
+        if self.pending_refresh:
+
             window('jellyfin_sync.bool', True)
 
             if self.total_updates > self.progress_display:
@@ -185,11 +170,6 @@ class Library(threading.Thread):
                 self.screensaver = get_screensaver()
                 set_screensaver(value="")
 
-            profiler.stop()
-            with open(str(path)+'/output-'+str(datetime.now())+'.html', 'w+') as output:
-                output.write(profiler.output_html().encode('utf-8'))
-
-
         if (self.pending_refresh and not self.download_threads and not self.writer_threads['updated'] and not self.writer_threads['userdata'] and not self.writer_threads['removed']):
             self.pending_refresh = False
             self.save_last_sync()
diff --git a/resources/settings.xml b/resources/settings.xml
index 7f1ff7f6..661da59b 100644
--- a/resources/settings.xml
+++ b/resources/settings.xml
@@ -85,7 +85,7 @@
 	</category>
 	
 	<category label="30022"><!-- Advanced -->
-		<setting label="30004" id="logLevel" type="enum" values="Disabled|Info|Debug" default="2" />
+		<setting label="30004" id="logLevel" type="enum" values="Disabled|Info|Debug" default="1" />
 		<setting label="33164" id="maskInfo" type="bool" default="true" />
 		<setting label="30239" type="action" action="RunPlugin(plugin://plugin.video.jellyfin?mode=reset)" option="close" />
 		<setting label="30535" type="action" action="RunPlugin(plugin://plugin.video.jellyfin?mode=deviceid)" option="close" />