Use @match in userscript
This commit is contained in:
@@ -3,9 +3,9 @@
|
|||||||
// @description Add movies like a real CouchPotato
|
// @description Add movies like a real CouchPotato
|
||||||
// @version {{version}}
|
// @version {{version}}
|
||||||
|
|
||||||
// @include {{host}}*
|
// @match {{host}}*
|
||||||
{% for include in includes %}
|
{% for include in includes %}
|
||||||
// @include {{include}}{% endfor %}
|
// @match {{include}}{% endfor %}
|
||||||
{% for exclude in excludes %}
|
{% for exclude in excludes %}
|
||||||
// @exclude {{exclude}}{% endfor %}
|
// @exclude {{exclude}}{% endfor %}
|
||||||
// @exclude {{host}}{{api.rstrip('/')}}*
|
// @exclude {{host}}{{api.rstrip('/')}}*
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from couchpotato.core.providers.userscript.base import UserscriptBase
|
|||||||
|
|
||||||
class IMDB(UserscriptBase):
|
class IMDB(UserscriptBase):
|
||||||
|
|
||||||
includes = ['http*://*.imdb.com/title/tt*', 'http*://imdb.com/title/tt*']
|
includes = ['*://*.imdb.com/title/tt*', '*://imdb.com/title/tt*']
|
||||||
|
|
||||||
def getMovie(self, url):
|
def getMovie(self, url):
|
||||||
return fireEvent('movie.info', identifier = getImdb(url), merge = True)
|
return fireEvent('movie.info', identifier = getImdb(url), merge = True)
|
||||||
|
|||||||
Reference in New Issue
Block a user