mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 00:32:58 -07:00
Fix show full changelog on fresh install
This commit is contained in:
parent
0010cbe21f
commit
dc743ac378
1 changed files with 11 additions and 6 deletions
|
@ -22,6 +22,7 @@ import subprocess
|
||||||
import threading
|
import threading
|
||||||
import datetime
|
import datetime
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
# Some cut down versions of Python may not include this module and it's not critical for us
|
# Some cut down versions of Python may not include this module and it's not critical for us
|
||||||
try:
|
try:
|
||||||
import webbrowser
|
import webbrowser
|
||||||
|
@ -213,6 +214,8 @@ def initialize(config_file):
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
logger.error(u"Unable to read previous version from file '%s': %s" %
|
logger.error(u"Unable to read previous version from file '%s': %s" %
|
||||||
(version_lock_file, e))
|
(version_lock_file, e))
|
||||||
|
else:
|
||||||
|
prev_version = 'cfd30996264b7e9fe4ef87f02d1cc52d1ae8bfca'
|
||||||
|
|
||||||
# Get the currently installed version. Returns None, 'win32' or the git
|
# Get the currently installed version. Returns None, 'win32' or the git
|
||||||
# hash.
|
# hash.
|
||||||
|
@ -284,6 +287,7 @@ def initialize(config_file):
|
||||||
_INITIALIZED = True
|
_INITIALIZED = True
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def daemonize():
|
def daemonize():
|
||||||
if threading.activeCount() != 1:
|
if threading.activeCount() != 1:
|
||||||
logger.warn(
|
logger.warn(
|
||||||
|
@ -1080,9 +1084,9 @@ def dbcheck():
|
||||||
)
|
)
|
||||||
c_db.execute(
|
c_db.execute(
|
||||||
'UPDATE session_history_media_info SET transcode_decision = (CASE '
|
'UPDATE session_history_media_info SET transcode_decision = (CASE '
|
||||||
'WHEN video_decision = "transcode" OR audio_decision = "transcode" THEN "transcode" '
|
'WHEN video_decision = "transcode" OR audio_decision = "transcode" THEN "transcode" '
|
||||||
'WHEN video_decision = "copy" OR audio_decision = "copy" THEN "copy" '
|
'WHEN video_decision = "copy" OR audio_decision = "copy" THEN "copy" '
|
||||||
'WHEN video_decision = "direct play" OR audio_decision = "direct play" THEN "direct play" END)'
|
'WHEN video_decision = "direct play" OR audio_decision = "direct play" THEN "direct play" END)'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Upgrade session_history_media_info table from earlier versions
|
# Upgrade session_history_media_info table from earlier versions
|
||||||
|
@ -1241,7 +1245,6 @@ def dbcheck():
|
||||||
'UPDATE session_history_media_info SET subtitle_codec = "" WHERE subtitle_codec IS NULL '
|
'UPDATE session_history_media_info SET subtitle_codec = "" WHERE subtitle_codec IS NULL '
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Upgrade session_history_media_info table from earlier versions
|
# Upgrade session_history_media_info table from earlier versions
|
||||||
try:
|
try:
|
||||||
result = c_db.execute('SELECT stream_container FROM session_history_media_info '
|
result = c_db.execute('SELECT stream_container FROM session_history_media_info '
|
||||||
|
@ -1586,24 +1589,26 @@ def dbcheck():
|
||||||
if not result.fetchone():
|
if not result.fetchone():
|
||||||
logger.debug(u"User 'Local' does not exist. Adding user.")
|
logger.debug(u"User 'Local' does not exist. Adding user.")
|
||||||
c_db.execute('INSERT INTO users (user_id, username) VALUES (0, "Local")')
|
c_db.execute('INSERT INTO users (user_id, username) VALUES (0, "Local")')
|
||||||
|
|
||||||
# Create table indices
|
# Create table indices
|
||||||
c_db.execute(
|
c_db.execute(
|
||||||
'CREATE UNIQUE INDEX IF NOT EXISTS idx_tvmaze_lookup ON tvmaze_lookup (rating_key)'
|
'CREATE UNIQUE INDEX IF NOT EXISTS idx_tvmaze_lookup ON tvmaze_lookup (rating_key)'
|
||||||
)
|
)
|
||||||
c_db.execute(
|
c_db.execute(
|
||||||
'CREATE UNIQUE INDEX IF NOT EXISTS idx_themoviedb_lookup ON themoviedb_lookup (rating_key)'
|
'CREATE UNIQUE INDEX IF NOT EXISTS idx_themoviedb_lookup ON themoviedb_lookup (rating_key)'
|
||||||
)
|
)
|
||||||
|
|
||||||
conn_db.commit()
|
conn_db.commit()
|
||||||
c_db.close()
|
c_db.close()
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
if CONFIG.UPDATE_NOTIFIERS_DB:
|
if CONFIG.UPDATE_NOTIFIERS_DB:
|
||||||
notifiers.upgrade_config_to_db()
|
notifiers.upgrade_config_to_db()
|
||||||
if CONFIG.UPDATE_LIBRARIES_DB_NOTIFY:
|
if CONFIG.UPDATE_LIBRARIES_DB_NOTIFY:
|
||||||
libraries.update_libraries_db_notify()
|
libraries.update_libraries_db_notify()
|
||||||
|
|
||||||
|
|
||||||
def shutdown(restart=False, update=False, checkout=False):
|
def shutdown(restart=False, update=False, checkout=False):
|
||||||
cherrypy.engine.exit()
|
cherrypy.engine.exit()
|
||||||
SCHED.shutdown(wait=False)
|
SCHED.shutdown(wait=False)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue