mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Add default thumb and art to Live TV library
This commit is contained in:
parent
bfa4d3dfec
commit
ccf0e0dae7
4 changed files with 20 additions and 0 deletions
|
@ -1943,6 +1943,19 @@ def dbcheck():
|
|||
'ALTER TABLE library_sections ADD COLUMN is_active INTEGER DEFAULT 1'
|
||||
)
|
||||
|
||||
# Upgrade library_sections table from earlier versions
|
||||
try:
|
||||
result = c_db.execute('SELECT thumb, art FROM library_sections WHERE section_id = ?',
|
||||
[common.LIVE_TV_SECTION_ID]).fetchone()
|
||||
if result and (not result[0] or not result[1]):
|
||||
logger.debug("Altering database. Updating database table library_sections.")
|
||||
c_db.execute('UPDATE library_sections SET thumb = ?, art =? WHERE section_id = ?',
|
||||
[common.DEFAULT_LIVE_TV_THUMB,
|
||||
common.DEFAULT_LIVE_TV_ART_FULL,
|
||||
common.LIVE_TV_SECTION_ID])
|
||||
except sqlite3.OperationalError:
|
||||
pass
|
||||
|
||||
# Upgrade users table from earlier versions (remove UNIQUE constraint on username)
|
||||
try:
|
||||
result = c_db.execute('SELECT SQL FROM sqlite_master WHERE type="table" AND name="users"').fetchone()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue