Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sick-Beard
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
Sick-Beard
Commits
f87701e9
Commit
f87701e9
authored
Dec 22, 2011
by
Nic Wolfe
Browse files
Options
Downloads
Plain Diff
Merge pull request #258 from lad1337/api_image_chaining
handle getbanner and getposter while chaining.
parents
61b8229b
1c72aef8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/webapi.py
+12
-9
12 additions, 9 deletions
sickbeard/webapi.py
with
12 additions
and
9 deletions
sickbeard/webapi.py
+
12
−
9
View file @
f87701e9
...
@@ -221,6 +221,7 @@ def call_dispatcher(args, kwargs):
...
@@ -221,6 +221,7 @@ def call_dispatcher(args, kwargs):
cmd
,
cmdIndex
=
cmd
.
split
(
"
_
"
)
# this gives us the clear cmd and the index
cmd
,
cmdIndex
=
cmd
.
split
(
"
_
"
)
# this gives us the clear cmd and the index
logger
.
log
(
u
"
API ::
"
+
cmd
+
"
: curKwargs
"
+
str
(
curKwargs
),
logger
.
DEBUG
)
logger
.
log
(
u
"
API ::
"
+
cmd
+
"
: curKwargs
"
+
str
(
curKwargs
),
logger
.
DEBUG
)
if
not
(
multiCmds
and
cmd
in
(
'
show.getposter
'
,
'
show.getbanner
'
)):
# skip these cmd while chaining
try
:
try
:
if
cmd
in
_functionMaper
:
if
cmd
in
_functionMaper
:
curOutDict
=
_functionMaper
.
get
(
cmd
)(
curArgs
,
curKwargs
).
run
()
# get the cmd class, init it and run()
curOutDict
=
_functionMaper
.
get
(
cmd
)(
curArgs
,
curKwargs
).
run
()
# get the cmd class, init it and run()
...
@@ -230,6 +231,8 @@ def call_dispatcher(args, kwargs):
...
@@ -230,6 +231,8 @@ def call_dispatcher(args, kwargs):
curOutDict
=
_responds
(
RESULT_ERROR
,
"
No such cmd:
'"
+
cmd
+
"'"
)
curOutDict
=
_responds
(
RESULT_ERROR
,
"
No such cmd:
'"
+
cmd
+
"'"
)
except
ApiError
,
e
:
# Api errors that we raised, they are harmless
except
ApiError
,
e
:
# Api errors that we raised, they are harmless
curOutDict
=
_responds
(
RESULT_ERROR
,
msg
=
ex
(
e
))
curOutDict
=
_responds
(
RESULT_ERROR
,
msg
=
ex
(
e
))
else
:
# if someone chained one of the forbiden cmds they will get an error for this one cmd
curOutDict
=
_responds
(
RESULT_ERROR
,
msg
=
"
The cmd
'"
+
cmd
+
"'
is not supported while chaining
"
)
if
multiCmds
:
if
multiCmds
:
# note: if multiple same cmds are issued but one has not an index defined it will override all others
# note: if multiple same cmds are issued but one has not an index defined it will override all others
...
...
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