mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-20 05:13:21 -07:00
Capitalize macOS platform
This commit is contained in:
parent
7696d031d3
commit
822d5a452c
2 changed files with 14 additions and 1 deletions
|
@ -1504,6 +1504,18 @@ def dbcheck():
|
|||
except sqlite3.OperationalError:
|
||||
logger.warn("Unable to capitalize Windows platform values in session_history table.")
|
||||
|
||||
# Upgrade session_history table from earlier versions
|
||||
try:
|
||||
result = c_db.execute("SELECT platform FROM session_history "
|
||||
"WHERE platform = 'macos'").fetchall()
|
||||
if len(result) > 0:
|
||||
logger.debug("Altering database. Capitalizing macOS platform values in session_history table.")
|
||||
c_db.execute(
|
||||
"UPDATE session_history SET platform = 'macOS' WHERE platform = 'macos' "
|
||||
)
|
||||
except sqlite3.OperationalError:
|
||||
logger.warn("Unable to capitalize macOS platform values in session_history table.")
|
||||
|
||||
# Upgrade session_history_metadata table from earlier versions
|
||||
try:
|
||||
c_db.execute("SELECT full_title FROM session_history_metadata")
|
||||
|
|
|
@ -102,7 +102,8 @@ PLATFORM_NAME_OVERRIDES = {
|
|||
'Mystery 5': 'Xbox 360',
|
||||
'WebMAF': 'Playstation 4',
|
||||
'windows': 'Windows',
|
||||
'osx': 'macOS'
|
||||
'osx': 'macOS',
|
||||
'macos': 'macOS',
|
||||
}
|
||||
|
||||
PMS_PLATFORM_NAME_OVERRIDES = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue