Remove unused variables
This commit is contained in:
@@ -51,7 +51,10 @@ class LibraryPlugin(Plugin):
|
||||
handle = fireEventAsync if update_after is 'async' else fireEvent
|
||||
handle('library.update', identifier = l.identifier, default_title = toUnicode(attrs.get('title', '')))
|
||||
|
||||
return l.to_dict(self.default_dict)
|
||||
library_dict = l.to_dict(self.default_dict)
|
||||
|
||||
db.remove()
|
||||
return library_dict
|
||||
|
||||
def update(self, identifier, default_title = '', force = False):
|
||||
|
||||
@@ -127,6 +130,7 @@ class LibraryPlugin(Plugin):
|
||||
|
||||
fireEvent('library.update_finish', data = library_dict)
|
||||
|
||||
db.remove()
|
||||
return library_dict
|
||||
|
||||
def updateReleaseDate(self, identifier):
|
||||
|
||||
@@ -85,6 +85,8 @@ class Release(Plugin):
|
||||
|
||||
db.remove()
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def saveFile(self, filepath, type = 'unknown', include_media_info = False):
|
||||
|
||||
@@ -107,6 +109,7 @@ class Release(Plugin):
|
||||
rel.delete()
|
||||
db.commit()
|
||||
|
||||
db.remove()
|
||||
return jsonified({
|
||||
'success': True
|
||||
})
|
||||
@@ -123,6 +126,7 @@ class Release(Plugin):
|
||||
rel.status_id = available_status.get('id') if rel.status_id is ignored_status.get('id') else ignored_status.get('id')
|
||||
db.commit()
|
||||
|
||||
db.remove()
|
||||
return jsonified({
|
||||
'success': True
|
||||
})
|
||||
@@ -149,12 +153,14 @@ class Release(Plugin):
|
||||
'files': {}
|
||||
}), manual = True)
|
||||
|
||||
db.remove()
|
||||
return jsonified({
|
||||
'success': True
|
||||
})
|
||||
else:
|
||||
log.error('Couldn\'t find release with id: %s' % id)
|
||||
|
||||
db.remove()
|
||||
return jsonified({
|
||||
'success': False
|
||||
})
|
||||
|
||||
@@ -164,7 +164,12 @@ class Event(object):
|
||||
if not self.asynchronous:
|
||||
self.queue.join()
|
||||
|
||||
return self.result or None
|
||||
res = self.result or None
|
||||
|
||||
# Cleanup
|
||||
self.result = {}
|
||||
|
||||
return res
|
||||
|
||||
def count(self):
|
||||
""" Returns the count of registered handlers """
|
||||
|
||||
Reference in New Issue
Block a user