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