Fixes for Release.add after renaming

This commit is contained in:
Ruud committed 2011-11-08 23:37:00 +01:00
1 parent 89e1d220a7
commit 0420bdeec5
4 files changed
+18 -13

No files matched your search

+3 -3
View File
@@ -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):