for row in xsetbg_db.select(orderBy='-last_shown'):
sys.stdout.buffer.write(
(
- '%d %s %d %s\n' %
- (row.id, row.last_shown, row.is_image, row.full_name)
+ '%d %s %d %d %s\n' %
+ (row.id, row.last_shown, row.is_image, row.show, row.full_name)
).encode(fs_encoding)
)
with SQLiteMassInsert() as txn:
for line in dump_file:
- id, timestamp, is_image, filename = line.strip().split(None, 3)
+ id, timestamp, is_image, show, filename = line.strip().split(None, 4)
id = convert_str(id)
timestamp = convert_str(timestamp)
is_image = convert_str(is_image, bool)
+ show = convert_str(show, bool)
try:
if id:
row = xsetbg_db.get(id)
values = {'last_shown': timestamp,
'full_name': filename.encode('utf-8'),
'is_image': is_image,
+ 'show': show,
}
if id:
values['id'] = id
count_updated += 1
if row.is_image != is_image:
row.is_image = is_image
+ if row.show != show:
+ row.show = show
dump_file.close()