blob: f20f750e3967acb0d65507faf5983fa0bb4cbd92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import sqlite3
from subliminal import *
# Get providers list from subliminal
providers_list = sorted(provider_manager.names())
# Open database connection
db = sqlite3.connect('bazarr.db')
c = db.cursor()
# Insert providers in database table
for provider_name in providers_list:
c.execute('''INSERT OR IGNORE INTO table_settings_providers(name) VALUES(?)''', (provider_name, ))
# Commit changes to database table
db.commit()
# Close database connection
db.close()
|