Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CouchPotatoServer
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
CouchPotatoServer
Commits
4bffb299
Commit
4bffb299
authored
Dec 19, 2012
by
Ruud
Browse files
Options
Downloads
Patches
Plain Diff
Catch urlerrors. closes #1154
parent
a2c41195
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
couchpotato/core/plugins/base.py
+3
-1
3 additions, 1 deletion
couchpotato/core/plugins/base.py
couchpotato/core/providers/movie/themoviedb/main.py
+7
-1
7 additions, 1 deletion
couchpotato/core/providers/movie/themoviedb/main.py
with
10 additions
and
2 deletions
couchpotato/core/plugins/base.py
+
3
−
1
View file @
4bffb299
...
@@ -241,9 +241,11 @@ class Plugin(object):
...
@@ -241,9 +241,11 @@ class Plugin(object):
self
.
setCache
(
cache_key
,
data
,
timeout
=
cache_timeout
)
self
.
setCache
(
cache_key
,
data
,
timeout
=
cache_timeout
)
return
data
return
data
except
:
except
:
if
not
kwargs
.
get
(
'
show_error
'
):
if
not
kwargs
.
get
(
'
show_error
'
,
True
):
raise
raise
return
''
def
setCache
(
self
,
cache_key
,
value
,
timeout
=
300
):
def
setCache
(
self
,
cache_key
,
value
,
timeout
=
300
):
log
.
debug
(
'
Setting cache %s
'
,
cache_key
)
log
.
debug
(
'
Setting cache %s
'
,
cache_key
)
Env
.
get
(
'
cache
'
).
set
(
cache_key
,
value
,
timeout
)
Env
.
get
(
'
cache
'
).
set
(
cache_key
,
value
,
timeout
)
...
...
This diff is collapsed.
Click to expand it.
couchpotato/core/providers/movie/themoviedb/main.py
+
7
−
1
View file @
4bffb299
...
@@ -3,6 +3,7 @@ from couchpotato.core.helpers.encoding import simplifyString, toUnicode
...
@@ -3,6 +3,7 @@ from couchpotato.core.helpers.encoding import simplifyString, toUnicode
from
couchpotato.core.logger
import
CPLog
from
couchpotato.core.logger
import
CPLog
from
couchpotato.core.providers.movie.base
import
MovieProvider
from
couchpotato.core.providers.movie.base
import
MovieProvider
from
libs.themoviedb
import
tmdb
from
libs.themoviedb
import
tmdb
import
traceback
log
=
CPLog
(
__name__
)
log
=
CPLog
(
__name__
)
...
@@ -61,7 +62,12 @@ class TheMovieDb(MovieProvider):
...
@@ -61,7 +62,12 @@ class TheMovieDb(MovieProvider):
if
not
results
:
if
not
results
:
log
.
debug
(
'
Searching for movie: %s
'
,
q
)
log
.
debug
(
'
Searching for movie: %s
'
,
q
)
raw
=
None
try
:
raw
=
tmdb
.
search
(
search_string
)
raw
=
tmdb
.
search
(
search_string
)
except
:
log
.
error
(
'
Failed searching TMDB for
"
%s
"
: %s
'
,
(
search_string
,
traceback
.
format_exc
()))
results
=
[]
results
=
[]
if
raw
:
if
raw
:
...
...
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