c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Boxcar'",(settings_notifier_Boxcar_enabled,settings_notifier_Boxcar_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Faast'",(settings_notifier_Faast_enabled,settings_notifier_Faast_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Growl'",(settings_notifier_Growl_enabled,settings_notifier_Growl_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Mattermost'",(settings_notifier_Mattermost_enabled,settings_notifier_Mattermost_url))
settings_notifier_NMA_enabled=request.forms.get('settings_notifier_Notify My Android_enabled')
ifsettings_notifier_NMA_enabled=='on':
settings_notifier_NMA_enabled=1
else:
settings_notifier_NMA_enabled=0
settings_notifier_NMA_url=request.forms.get('settings_notifier_Notify My Android_url')
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Notify My Android'",(settings_notifier_NMA_enabled,settings_notifier_NMA_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Prowl'",(settings_notifier_Prowl_enabled,settings_notifier_Prowl_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Pushalot'",(settings_notifier_Pushalot_enabled,settings_notifier_Pushalot_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'PushBullet'",(settings_notifier_PushBullet_enabled,settings_notifier_PushBullet_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Pushjet'",(settings_notifier_Pushjet_enabled,settings_notifier_Pushjet_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Pushover'",(settings_notifier_Pushover_enabled,settings_notifier_Pushover_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Rocket.Chat'",(settings_notifier_RocketChat_enabled,settings_notifier_RocketChat_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Slack'",(settings_notifier_Slack_enabled,settings_notifier_Slack_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Super Toasty'",(settings_notifier_SuperToasty_enabled,settings_notifier_SuperToasty_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Telegram'",(settings_notifier_Telegram_enabled,settings_notifier_Telegram_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Twitter'",(settings_notifier_Twitter_enabled,settings_notifier_Twitter_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Discord'",(settings_notifier_Discord_enabled,settings_notifier_Discord_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'E-Mail'",(settings_notifier_E_Mail_enabled,settings_notifier_E_Mail_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'IFTTT'",(settings_notifier_IFTTT_enabled,settings_notifier_IFTTT_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Stride'",(settings_notifier_Stride_enabled,settings_notifier_Stride_url))
c.execute("UPDATE table_settings_notifier SET enabled = ?, url = ? WHERE name = 'Windows'",(settings_notifier_Windows_enabled,settings_notifier_Windows_url))
notifiers=c.execute("SELECT * FROM table_settings_notifier ORDER BY name").fetchall()
providers=['Boxcar','Faast','Growl','Join','KODI','Mattermost','Notify My Android','Prowl','Pushalot','PushBullet','Pushjet','Pushover','Rocket.Chat','Slack','Super Toasty','Telegram','Twitter','XBMC']
forproviderinproviders:
c.execute('INSERT INTO `table_settings_notifier` (name, enabled) VALUES (?, ?);',(provider,'0'))
c.execute('CREATE TABLE "table_movies" ( `tmdbId` TEXT NOT NULL UNIQUE, `title` TEXT NOT NULL, `path` TEXT NOT NULL UNIQUE, `languages` TEXT, `subtitles` TEXT, `missing_subtitles` TEXT, `hearing_impaired` TEXT, `radarrId` INTEGER NOT NULL UNIQUE, `overview` TEXT, `poster` TEXT, `fanart` TEXT, "audio_language""text", `sceneName` TEXT, PRIMARY KEY(`tmdbId`) )')
except:
pass
try:
c.execute('CREATE TABLE "table_history_movie" ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, `action` INTEGER NOT NULL, `radarrId` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL, `description` TEXT NOT NULL )')
except:
pass
try:
c.execute('DELETE FROM table_settings_notifier WHERE rowid > 24')#Modify this if we add more notification provider
rows=c.execute('SELECT name FROM table_settings_notifier WHERE name = "Discord"').fetchall()
rows=c.execute('SELECT name FROM table_settings_notifier WHERE name = "Kodi/XBMC"').fetchall()