mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-11-10 18:36:33 +00:00
Removed debug code.
This commit is contained in:
parent
ea73d0fcf7
commit
5f9a66ae61
2 changed files with 1 additions and 39 deletions
|
|
@ -11,7 +11,7 @@ from kodi_six import xbmc
|
||||||
import downloader as server
|
import downloader as server
|
||||||
import helper.xmls as xmls
|
import helper.xmls as xmls
|
||||||
from database import Database, get_sync, save_sync, jellyfin_db
|
from database import Database, get_sync, save_sync, jellyfin_db
|
||||||
from helper import translate, settings, window, progress, dialog, LibraryException, debug
|
from helper import translate, settings, window, progress, dialog, LibraryException
|
||||||
from helper.utils import get_screensaver, set_screensaver
|
from helper.utils import get_screensaver, set_screensaver
|
||||||
|
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
|
|
@ -249,7 +249,6 @@ class FullSync(object):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
@progress()
|
@progress()
|
||||||
@debug.profile
|
|
||||||
def movies(self, library, dialog):
|
def movies(self, library, dialog):
|
||||||
|
|
||||||
''' Process movies from a single library.
|
''' Process movies from a single library.
|
||||||
|
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
##################################################################################################
|
|
||||||
|
|
||||||
import cProfile
|
|
||||||
import json
|
|
||||||
import logging
|
|
||||||
import pstats
|
|
||||||
import StringIO
|
|
||||||
|
|
||||||
##################################################################################################
|
|
||||||
|
|
||||||
LOG = logging.getLogger("JELLYFIN." + __name__)
|
|
||||||
|
|
||||||
class JsonDebugPrinter(object):
|
|
||||||
|
|
||||||
def __init__(self, json):
|
|
||||||
self.json = json
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
return json.dumps(self.json, indent=4)
|
|
||||||
|
|
||||||
def profile(fn):
|
|
||||||
def profiling_wrapper(*args, **kargs):
|
|
||||||
pr = cProfile.Profile()
|
|
||||||
pr.enable()
|
|
||||||
|
|
||||||
fn(*args, **kargs)
|
|
||||||
|
|
||||||
pr.disable()
|
|
||||||
s = StringIO.StringIO()
|
|
||||||
sortby = 'cumulative'
|
|
||||||
ps = pstats.Stats(pr, stream=s).sort_stats(sortby)
|
|
||||||
ps.print_stats()
|
|
||||||
LOG.debug(s.getvalue())
|
|
||||||
return profiling_wrapper
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue