Start Kodi ids at 0, not 1

This commit is contained in:
croneter 2018-02-28 13:45:34 +01:00
parent db3be4cf09
commit f0bbcb5086

View file

@ -244,7 +244,7 @@ class KodiDBMethods(object):
query = ''' query = '''
SELECT %s FROM %s WHERE name = ? COLLATE NOCASE LIMIT 1 SELECT %s FROM %s WHERE name = ? COLLATE NOCASE LIMIT 1
''' % (key, table) ''' % (key, table)
query_id = 'SELECT COALESCE(MAX(%s),0) FROM %s' % (key, table) query_id = 'SELECT COALESCE(MAX(%s), -1) FROM %s' % (key, table)
query_new = ('INSERT INTO %s(%s, name) values(?, ?)' query_new = ('INSERT INTO %s(%s, name) values(?, ?)'
% (table, key)) % (table, key))
entry_ids = [] entry_ids = []