mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Log a full_title field into the metadata table.
Create a clear_all_history_new endpoint to delete all old PlexPy session history IMMEDIATELY. Add icon in history_new to indicate if video was transcoded or not. Replace relatively inaccurate percent_completed with icons in history_new.
This commit is contained in:
parent
65b3930baa
commit
2b317f6fd4
6 changed files with 71 additions and 19 deletions
|
@ -405,8 +405,8 @@ def dbcheck():
|
|||
c_db.execute(
|
||||
'CREATE TABLE IF NOT EXISTS session_history_metadata (id INTEGER PRIMARY KEY, '
|
||||
'rating_key INTEGER, parent_rating_key INTEGER, grandparent_rating_key INTEGER, '
|
||||
'title TEXT, parent_title TEXT, grandparent_title TEXT, media_index INTEGER, parent_media_index INTEGER, '
|
||||
'thumb TEXT, parent_thumb TEXT, grandparent_thumb TEXT, art TEXT, media_type TEXT, '
|
||||
'title TEXT, parent_title TEXT, grandparent_title TEXT, full_title TEXT, media_index INTEGER, '
|
||||
'parent_media_index INTEGER, thumb TEXT, parent_thumb TEXT, grandparent_thumb TEXT, art TEXT, media_type TEXT, '
|
||||
'year INTEGER, originally_available_at TEXT, added_at INTEGER, updated_at INTEGER, last_viewed_at INTEGER, '
|
||||
'content_rating TEXT, summary TEXT, rating TEXT, duration INTEGER, guid TEXT, '
|
||||
'directors TEXT, writers TEXT, actors TEXT, genres TEXT, studio TEXT)'
|
||||
|
@ -547,6 +547,15 @@ def dbcheck():
|
|||
'ALTER TABLE sessions ADD COLUMN transcode_height INTEGER'
|
||||
)
|
||||
|
||||
# Upgrade sessions table from earlier versions
|
||||
try:
|
||||
c_db.execute('SELECT full_title from session_history_metadata')
|
||||
except sqlite3.OperationalError:
|
||||
logger.debug(u"Altering database. Updating database table sessions.")
|
||||
c_db.execute(
|
||||
'ALTER TABLE session_history_metadata ADD COLUMN full_title TEXT'
|
||||
)
|
||||
|
||||
conn_db.commit()
|
||||
c_db.close()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue