sort lists/peers, rename peers

This commit is contained in:
j 2014-05-25 20:06:12 +02:00
commit 8ddf228068
9 changed files with 141 additions and 26 deletions

View file

@ -84,6 +84,20 @@ class PostUpdate(Command):
if old <= '20140521-65-e14c686' and new > '20140521-65-e14c686':
if not os.path.exists(settings.db_path):
r('./ctl', 'setup')
if old <= '20140525-92-eac91e7' and new > '20140525-92-eac91e7':
import user.models
for u in user.models.User.query:
u.update_name()
u.save()
import item.models
for f in item.models.File.query:
changed = False
for key in ('mediastate', 'coverRatio', 'previewRatio'):
if key in f.info:
del f.info[key]
changed = True
if changed:
f.save()
class Setup(Command):
"""