Mark movie snatched on manual download

This commit is contained in:
Ruud
2012-09-27 08:39:07 +02:00
parent 2ac2b0ff06
commit 0e23413069
2 changed files with 25 additions and 12 deletions
+5
View File
@@ -161,6 +161,7 @@ class Release(Plugin):
db = get_session()
id = getParam('id')
status_snatched = fireEvent('status.add', 'snatched', single = True)
rel = db.query(Relea).filter_by(id = id).first()
if rel:
@@ -181,6 +182,10 @@ class Release(Plugin):
'files': {}
}), manual = True, single = True)
if success:
rel.status_id = status_snatched.get('id')
db.commit()
#db.close()
return jsonified({
'success': success