1
0
mirror of https://github.com/gryf/pygtktalog.git synced 2025-12-17 11:30:19 +01:00

Introduced files treeview, refactor code for discs view, struggle with files model

This commit is contained in:
2010-05-04 05:55:41 +02:00
parent 1cf1390567
commit 7417b9e98e
9 changed files with 309 additions and 159 deletions

View File

@@ -96,7 +96,7 @@ if __name__ == "__main__":
for id, date in dst_c.execute(sql).fetchall():
sql = "update files set date=? where id=?"
if int(date) > 0:
if date and int(date) > 0:
dst_c.execute(sql, (datetime.fromtimestamp(int(date)), id))
else:
dst_c.execute(sql, (None, id))
@@ -105,10 +105,13 @@ if __name__ == "__main__":
for id, date in dst_c.execute(sql).fetchall():
sql = "update gthumb set date=? where id=?"
if int(date) > 0:
dst_c.execute(sql, (datetime.fromtimestamp(int(date)), id))
else:
dst_c.execute(sql, (None, id))
try:
if int(date) > 0:
dst_c.execute(sql, (datetime.fromtimestamp(int(date)), id))
else:
dst_c.execute(sql, (None, id))
except:
print id, date
dst_con.commit()
dst_c.close()