Fixes for Release.add after renaming
This commit is contained in:
1 parent
89e1d220a7
commit
0420bdeec5
4 files changed
+18
-13
No files matched your search
@@ -60,10 +60,10 @@ class Release(Plugin):
|
||||
added_file = self.saveFile(file, type = type, include_media_info = type is 'movie')
|
||||
try:
|
||||
added_file = db.query(File).filter_by(id = added_file.get('id')).one()
|
||||
Relea.files.append(added_file)
|
||||
rel.files.append(added_file)
|
||||
db.commit()
|
||||
except Exception, e:
|
||||
log.debug('Failed to attach "%s" to Relea: %s' % (file, e))
|
||||
log.debug('Failed to attach "%s" to release: %s' % (file, e))
|
||||
|
||||
db.remove()
|
||||
|
||||
@@ -77,7 +77,7 @@ class Release(Plugin):
|
||||
properties = {}
|
||||
|
||||
# Check database and update/insert if necessary
|
||||
return fireEvent('file.add', path = file, part = fireEvent('scanner.partnumber', file, single = True), type = Scanner.file_types[type], properties = properties, single = True)
|
||||
return fireEvent('file.add', path = file, part = fireEvent('scanner.partnumber', file, single = True), type = Scanner.file_types.get(type), properties = properties, single = True)
|
||||
|
||||
def delete(self):
|
||||
|
||||
|
||||
Reference in new issue
Block a user