mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Add progress percent to export table
This commit is contained in:
parent
39d6edd581
commit
44c643d7da
5 changed files with 72 additions and 16 deletions
|
@ -802,7 +802,8 @@ def dbcheck():
|
|||
'metadata_level INTEGER, media_info_level INTEGER, '
|
||||
'thumb_level INTEGER DEFAULT 0, art_level INTEGER DEFAULT 0, '
|
||||
'custom_fields TEXT, individual_files INTEGER DEFAULT 0, '
|
||||
'file_size INTEGER DEFAULT 0, complete INTEGER DEFAULT 0)'
|
||||
'file_size INTEGER DEFAULT 0, complete INTEGER DEFAULT 0, '
|
||||
'exported_items INTEGER DEFAULT 0, total_items INTEGER DEFAULT 0)'
|
||||
)
|
||||
|
||||
# Upgrade sessions table from earlier versions
|
||||
|
@ -2191,6 +2192,18 @@ def dbcheck():
|
|||
'ALTER TABLE exports ADD COLUMN individual_files INTEGER DEFAULT 0'
|
||||
)
|
||||
|
||||
# Upgrade exports table from earlier versions
|
||||
try:
|
||||
c_db.execute('SELECT total_items FROM exports')
|
||||
except sqlite3.OperationalError:
|
||||
logger.debug("Altering database. Updating database table exports.")
|
||||
c_db.execute(
|
||||
'ALTER TABLE exports ADD COLUMN exported_items INTEGER DEFAULT 0'
|
||||
)
|
||||
c_db.execute(
|
||||
'ALTER TABLE exports ADD COLUMN total_items INTEGER DEFAULT 0'
|
||||
)
|
||||
|
||||
# Add "Local" user to database as default unauthenticated user.
|
||||
result = c_db.execute('SELECT id FROM users WHERE username = "Local"')
|
||||
if not result.fetchone():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue