Rename notifiers in database

This commit is contained in:
JonnyWong16 2018-03-18 17:44:24 -07:00
parent 034f3ee308
commit bd3497b2bf

View file

@ -1596,6 +1596,15 @@ def dbcheck():
'ALTER TABLE poster_urls ADD COLUMN delete_hash TEXT'
)
# Rename notifiers in the database
logger.debug(u"Altering database. Renaming notifiers.")
c_db.execute(
'UPDATE notifiers SET agent_label = "Kodi" WHERE agent_label = "XBMC"'
)
c_db.execute(
'UPDATE notifiers SET agent_label = "macOS Notification Center" WHERE agent_label = "OSX Notify"'
)
# Add "Local" user to database as default unauthenticated user.
result = c_db.execute('SELECT id FROM users WHERE username = "Local"')
if not result.fetchone():