Private GIT

Skip to content
Snippets Groups Projects
Commit 9e2c753d authored by echel0n's avatar echel0n
Browse files

Fixed WebFileBrowser code in WebUI

parent 2d947537
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,6 @@
import os
import string
from tornado.httputil import HTTPHeaders
from tornado.web import RequestHandler
from sickbeard import encodingKludge as ek
from sickbeard import logger
......@@ -105,14 +104,3 @@ def foldersAtPath(path, includeParent=False, includeFiles=False):
entries.extend(fileList)
return entries
\ No newline at end of file
class WebFileBrowser(RequestHandler):
def index(self, path='', includeFiles=False, *args, **kwargs):
self.set_header("Content-Type", "application/json")
return json.dumps(foldersAtPath(path, True, bool(int(includeFiles))))
def complete(self, term, includeFiles=0):
self.set_header("Content-Type", "application/json")
paths = [entry['path'] for entry in foldersAtPath(os.path.dirname(term), includeFiles=bool(int(includeFiles))) if 'path' in entry]
return json.dumps(paths)
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment