Movie event naming

This commit is contained in:
Ruud
2011-09-26 20:00:19 +02:00
parent e8a8b8a4d4
commit c8ffe13cd0
7 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ class LibraryPlugin(Plugin):
if library.status_id == done_status.get('id') and not force: if library.status_id == done_status.get('id') and not force:
do_update = False do_update = False
else: else:
info = fireEvent('provider.movie.info', merge = True, identifier = identifier) info = fireEvent('movie.info', merge = True, identifier = identifier)
if not info or len(info) == 0: if not info or len(info) == 0:
log.error('Could not update, no movie info to work with: %s' % identifier) log.error('Could not update, no movie info to work with: %s' % identifier)
return False return False
+1 -1
View File
@@ -79,7 +79,7 @@ class MoviePlugin(Plugin):
movies = Env.get('cache').get(cache_key) movies = Env.get('cache').get(cache_key)
if not movies: if not movies:
results = fireEvent('provider.movie.search', q = params.get('q')) results = fireEvent('movie.search', q = params.get('q'), merge = True)
# Combine movie results # Combine movie results
movies = [] movies = []
+3 -3
View File
@@ -318,7 +318,7 @@ class Scanner(Plugin):
# Search based on OpenSubtitleHash # Search based on OpenSubtitleHash
if not imdb_id and not group['is_dvd']: if not imdb_id and not group['is_dvd']:
for file in files['movie']: for file in files['movie']:
movie = fireEvent('provider.movie.by_hash', file = file, merge = True) movie = fireEvent('movie.by_hash', file = file, merge = True)
if len(movie) > 0: if len(movie) > 0:
imdb_id = movie[0]['imdb'] imdb_id = movie[0]['imdb']
@@ -330,7 +330,7 @@ class Scanner(Plugin):
if len(identifier) > 2: if len(identifier) > 2:
movie = fireEvent('provider.movie.search', q = identifier, merge = True, limit = 1) movie = fireEvent('movie.search', q = identifier, merge = True, limit = 1)
if len(movie) > 0: if len(movie) > 0:
imdb_id = movie[0]['imdb'] imdb_id = movie[0]['imdb']
@@ -339,7 +339,7 @@ class Scanner(Plugin):
log.debug('Identifier to short to use for search: %s' % identifier) log.debug('Identifier to short to use for search: %s' % identifier)
if imdb_id: if imdb_id:
#movie = fireEvent('provider.movie.info', identifier = imdb_id, merge = True) #movie = fireEvent('movie.info', identifier = imdb_id, merge = True)
#if movie and movie.get('imdb'): #if movie and movie.get('imdb'):
return fireEvent('library.add', attrs = { return fireEvent('library.add', attrs = {
'identifier': imdb_id 'identifier': imdb_id
+1 -1
View File
@@ -66,7 +66,7 @@ class Searcher(Plugin):
if has_better_quality is 0: if has_better_quality is 0:
log.info('Search for %s in %s' % (default_title, type['quality']['label'])) log.info('Search for %s in %s' % (default_title, type['quality']['label']))
results = fireEvent('provider.yarr.search', movie, type['quality'], merge = True) results = fireEvent('yarr.search', movie, type['quality'], merge = True)
sorted_results = sorted(results, key = lambda k: k['score'], reverse = True) sorted_results = sorted(results, key = lambda k: k['score'], reverse = True)
# Add them to this movie releases list # Add them to this movie releases list
@@ -15,7 +15,7 @@ class CouchPotatoApi(MovieProvider):
apiUrl = 'http://couchpotatoapp.com/api/%s/' apiUrl = 'http://couchpotatoapp.com/api/%s/'
def __init__(self): def __init__(self):
addEvent('provider.movie.release_date', self.releaseDate) addEvent('movie.release_date', self.releaseDate)
addApiView('movie.suggest', self.suggestView) addApiView('movie.suggest', self.suggestView)
def releaseDate(self, imdb_id): def releaseDate(self, imdb_id):
@@ -10,7 +10,7 @@ class IMDB(MovieProvider):
def __init__(self): def __init__(self):
#addEvent('provider.movie.search', self.search) #addEvent('movie.search', self.search)
self.p = IMDb('http') self.p = IMDb('http')
@@ -14,9 +14,9 @@ class TheMovieDb(MovieProvider):
imageUrl = 'http://hwcdn.themoviedb.org' imageUrl = 'http://hwcdn.themoviedb.org'
def __init__(self): def __init__(self):
addEvent('provider.movie.by_hash', self.byHash) addEvent('movie.by_hash', self.byHash)
addEvent('provider.movie.search', self.search) addEvent('movie.search', self.search)
addEvent('provider.movie.info', self.getInfo) addEvent('movie.info', self.getInfo)
# Use base wrapper # Use base wrapper
tmdb.Config.api_key = self.conf('api_key') tmdb.Config.api_key = self.conf('api_key')