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
b924e9aa
Commit
b924e9aa
authored
Apr 23, 2012
by
Ruud
Browse files
Options
Downloads
Patches
Plain Diff
Search with imdbid. closes #133
parent
d7d8d7ac
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/movie/main.py
+6
-1
6 additions, 1 deletion
couchpotato/core/plugins/movie/main.py
couchpotato/core/plugins/movie/static/search.js
+3
-0
3 additions, 0 deletions
couchpotato/core/plugins/movie/static/search.js
with
9 additions
and
1 deletion
couchpotato/core/plugins/movie/main.py
+
6
−
1
View file @
b924e9aa
...
...
@@ -4,6 +4,7 @@ from couchpotato.core.event import fireEvent, fireEventAsync, addEvent
from
couchpotato.core.helpers.encoding
import
toUnicode
,
tryUrlencode
,
\
simplifyString
from
couchpotato.core.helpers.request
import
getParams
,
jsonified
,
getParam
from
couchpotato.core.helpers.variable
import
getImdb
from
couchpotato.core.logger
import
CPLog
from
couchpotato.core.plugins.base
import
Plugin
from
couchpotato.core.settings.model
import
Movie
,
Library
,
LibraryTitle
...
...
@@ -239,6 +240,10 @@ class MoviePlugin(Plugin):
movies
=
Env
.
get
(
'
cache
'
).
get
(
cache_key
)
if
not
movies
:
if
getImdb
(
q
):
movies
=
[
fireEvent
(
'
movie.info
'
,
identifier
=
q
,
merge
=
True
)]
else
:
movies
=
fireEvent
(
'
movie.search
'
,
q
=
q
,
merge
=
True
)
Env
.
get
(
'
cache
'
).
set
(
cache_key
,
movies
)
...
...
This diff is collapsed.
Click to expand it.
couchpotato/core/plugins/movie/static/search.js
+
3
−
0
View file @
b924e9aa
...
...
@@ -148,6 +148,9 @@ Block.Search = new Class({
$
(
m
).
inject
(
self
.
results
)
self
.
movies
[
movie
.
imdb
||
'
r-
'
+
Math
.
floor
(
Math
.
random
()
*
10000
)]
=
m
if
(
q
==
movie
.
imdb
)
m
.
showOptions
()
});
if
(
q
!=
self
.
q
())
...
...
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