Don't allow empty titles in library

This commit is contained in:
Ruud
2012-04-04 23:53:34 +02:00
parent ed280b988b
commit b595cf8ebc
3 changed files with 15 additions and 4 deletions
+9 -3
View File
@@ -33,13 +33,19 @@ class Searcher(Plugin):
).all()
for movie in movies:
self.single(movie.to_dict({
movie_dict = movie.to_dict({
'profile': {'types': {'quality': {}}},
'releases': {'status': {}, 'quality': {}},
'library': {'titles': {}, 'files':{}},
'files': {}
}))
})
try:
self.single(movie_dict)
except IndexError:
fireEvent('library.update', movie_dict['library']['identifier'], force = True)
except:
log.error('Search failed for %s: %s' % (movie_dict['library']['identifier'], traceback.format_exc()))
# Break if CP wants to shut down
if self.shuttingDown():