Capitalize macOS platform

This commit is contained in:
JonnyWong16 2024-07-12 14:29:48 -07:00
commit 822d5a452c
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 14 additions and 1 deletions

View file

@ -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")

View file

@ -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 = {