unicode cleanup

This commit is contained in:
Ruud
2012-01-15 00:09:42 +01:00
parent 44cebc7ecd
commit 88c7f3e9b3
5 changed files with 14 additions and 12 deletions
+2 -2
View File
@@ -48,12 +48,12 @@ class FileManager(Plugin):
def add(self, path = '', part = 1, type = (), available = 1, properties = {}):
db = get_session()
f = db.query(File).filter(or_(File.path == toUnicode(path), File.path == path)).first()
f = db.query(File).filter(File.path == toUnicode(path)).first()
if not f:
f = File()
db.add(f)
f.path = path
f.path = toUnicode(path)
f.part = part
f.available = available
f.type_id = self.getType(type).id