fm.install_file(xml_path, font_dir) #Install custom includes im = IncludeManager() include_path = os.path.join(__addon_path__, "resources/skins/DefaultSkin/720p/includes.xml") im.install_file(include_path) reload_skin() #Import spotify & friends sys.path.append(os.path.join(libs_dir, "CherryPy.egg")) sys.path.append(os.path.join(libs_dir, "PyspotifyCtypes.egg")) sys.path.append(os.path.join(libs_dir, "PyspotifyCtypesProxy.egg")) #Load & start the actual gui, no init code beyond this point from spotimcgui import main session = main(__addon_path__) gc.collect() session = None #Some debug info... from _spotify import _library_refs print _library_refs from spotify.utils.finalize import _finalize_refs print _finalize_refs import threading print 'threads: %d' % threading.activeCount() #import objgraph #objgraph.show_backrefs(objs, max_depth=5) from _spotify import unload_library
#Install custom includes im = IncludeManager() include_path = os.path.join( __addon_path__, "resources/skins/DefaultSkin/720p/includes.xml") im.install_file(include_path) reload_skin() #Import spotify & friends sys.path.insert(0, os.path.join(libs_dir, "CherryPy.egg")) sys.path.insert(0, os.path.join(libs_dir, "PyspotifyCtypes.egg")) sys.path.insert(0, os.path.join(libs_dir, "PyspotifyCtypesProxy.egg")) #Load & start the actual gui, no init code beyond this point from spotimcgui import main session = main(__addon_path__) gc.collect() session = None from _spotify import unload_library unload_library() finally: #Cleanup includes and fonts if im is not None: del im if fm is not None: del fm #Close the background loading window
#Install custom fonts fm = FontManager() skin_dir = os.path.join(__addon_path__, "resources/skins/DefaultSkin") xml_path = os.path.join(skin_dir, "720p/font.xml") font_dir = os.path.join(skin_dir, "fonts") fm.install_file(xml_path, font_dir) #Install custom includes im = IncludeManager() include_path = os.path.join(__addon_path__, "resources/skins/DefaultSkin/720p/includes.xml") im.install_file(include_path) reload_skin() #Load & start the actual gui, no init code beyond this point main(__addon_path__) #Do a final garbage collection after main gc.collect() #from _spotify.utils.moduletracker import _tracked_modules #print "tracked modules after: %d" % len(_tracked_modules) #import objgraph #objgraph.show_backrefs(_tracked_modules, max_depth=5) except (SystemExit, Exception) as ex: if str(ex) != '': dlg = xbmcgui.Dialog() dlg.ok(ex.__class__.__name__, str(ex)) traceback.print_exc()
fm.install_file(xml_path, font_dir) #Install custom includes im = IncludeManager() include_path = os.path.join(__addon_path__, "resources/skins/DefaultSkin/720p/includes.xml") im.install_file(include_path) reload_skin() #Import spotify & friends sys.path.insert(0, os.path.join(libs_dir, "CherryPy.egg")) sys.path.insert(0, os.path.join(libs_dir, "PyspotifyCtypes.egg")) sys.path.insert(0, os.path.join(libs_dir, "PyspotifyCtypesProxy.egg")) #Load & start the actual gui, no init code beyond this point from spotimcgui import main main(__addon_path__) from _spotify import unload_library unload_library() finally: #Cleanup includes and fonts if im is not None: del im if fm is not None: del fm #Close the background loading window loadingwin.close()