Force expire database objects

This commit is contained in:
Ruud
2013-05-17 21:36:23 +02:00
parent 899868f51e
commit 13df35462b
4 changed files with 20 additions and 13 deletions
+3 -1
View File
@@ -20,7 +20,6 @@ class LibraryPlugin(Plugin):
addEvent('library.update', self.update)
addEvent('library.update_release_date', self.updateReleaseDate)
def add(self, attrs = {}, update_after = True):
db = get_session()
@@ -53,6 +52,7 @@ class LibraryPlugin(Plugin):
library_dict = l.to_dict(self.default_dict)
db.expire_all()
return library_dict
def update(self, identifier, default_title = '', force = False):
@@ -132,6 +132,7 @@ class LibraryPlugin(Plugin):
library_dict = library.to_dict(self.default_dict)
db.expire_all()
return library_dict
def updateReleaseDate(self, identifier):
@@ -150,6 +151,7 @@ class LibraryPlugin(Plugin):
library.info = mergeDicts(library.info, {'release_date': dates })
db.commit()
db.expire_all()
return dates