Get group category from the new db
(grp)
| 102 | |
| 103 | groupcats = {} |
| 104 | def getgroupcat(grp): |
| 105 | """Get group category from the new db""" |
| 106 | if grp in groupcats: |
| 107 | cat = groupcats[grp] |
| 108 | else: |
| 109 | query = 'SELECT categoryID FROM invgroups WHERE groupID = ?' |
| 110 | new_cursor.execute(query, (grp,)) |
| 111 | cat = 0 |
| 112 | for row in new_cursor: |
| 113 | cat = row[0] |
| 114 | groupcats[grp] = cat |
| 115 | return cat |
| 116 | |
| 117 | itemnames = {} |
| 118 | def getitemname(item): |