You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
from couchpotato.core.event import fireEvent
|
|
|
|
from couchpotato.core.providers.userscript.base import UserscriptBase
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
|
|
|
class TMDB(UserscriptBase):
|
|
|
|
|
|
|
|
includes = ['http://www.themoviedb.org/movie/*']
|
|
|
|
|
|
|
|
def getMovie(self, url):
|
|
|
|
match = re.search('(?P<id>\d+)', url)
|
|
|
|
movie = fireEvent('movie.info_by_tmdb', identifier = match.group('id'), merge = True)
|
|
|
|
|
|
|
|
if movie['imdb']:
|
|
|
|
return self.getInfo(movie['imdb'])
|
|
|
|
|