Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SickRage-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
SickRage-1
Commits
9e2c753d
Commit
9e2c753d
authored
Dec 8, 2014
by
echel0n
Browse files
Options
Downloads
Patches
Plain Diff
Fixed WebFileBrowser code in WebUI
parent
2d947537
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sickbeard/browser.py
+1
-13
1 addition, 13 deletions
sickbeard/browser.py
sickbeard/webserve.py
+146
-137
146 additions, 137 deletions
sickbeard/webserve.py
with
147 additions
and
150 deletions
sickbeard/browser.py
+
1
−
13
View file @
9e2c753d
...
...
@@ -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.
Click to expand it.
sickbeard/webserve.py
+
146
−
137
View file @
9e2c753d
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment