update strings
This commit is contained in:
parent
ad45b32fdc
commit
d7975a870b
2 changed files with 13 additions and 13 deletions
10
install
10
install
|
@ -35,8 +35,8 @@ class Install(Thread):
|
||||||
try:
|
try:
|
||||||
from OpenSSL.SSL import TLSv1_2_METHOD
|
from OpenSSL.SSL import TLSv1_2_METHOD
|
||||||
except:
|
except:
|
||||||
print("To run Open Media Library on versions of Ubuntu before 15.10 you need to manually update pyOpenSSL")
|
print("To run Open Media Library on versions of Ubuntu before 15.10, you need to manually update pyOpenSSL.")
|
||||||
print("To install the current version of pyOpenSSL:\n\tsudo apt-get install python3-pip python3-dev libffi-dev libssl-dev\n\tsudo pip3 install -U pyOpenSSL")
|
print("To install the current version of pyOpenSSL, run:\n\tsudo apt-get install python3-pip python3-dev libffi-dev libssl-dev\n\tsudo pip3 install -U pyOpenSSL")
|
||||||
self.failed = True
|
self.failed = True
|
||||||
return
|
return
|
||||||
apt_packages = ''
|
apt_packages = ''
|
||||||
|
@ -87,8 +87,8 @@ class Install(Thread):
|
||||||
elif apt_packages:
|
elif apt_packages:
|
||||||
print('You need to install Pillow, lxml and pyOpenSSL\ni.e. sudo pip3 install pillow lxml pyOpenSSL')
|
print('You need to install Pillow, lxml and pyOpenSSL\ni.e. sudo pip3 install pillow lxml pyOpenSSL')
|
||||||
if 'poppler' in apt_packages:
|
if 'poppler' in apt_packages:
|
||||||
print('You need to install pdftocairo (part of poppler-utils)')
|
print('You need to install pdftocairo (part of poppler-utils).')
|
||||||
print("After installing those packages, run install again")
|
print("After installing these packages, run install again.")
|
||||||
self.failed = True
|
self.failed = True
|
||||||
return
|
return
|
||||||
target = self.target
|
target = self.target
|
||||||
|
@ -170,5 +170,5 @@ if __name__ == '__main__':
|
||||||
install = Install(target)
|
install = Install(target)
|
||||||
install.join()
|
install.join()
|
||||||
if not install.failed:
|
if not install.failed:
|
||||||
print("to launch Open Media Library run: %s open"%os.path.join(target, 'ctl'))
|
print("To launch Open Media Library, run: %s open"%os.path.join(target, 'ctl'))
|
||||||
#subprocess.Popen([os.path.join(target, 'ctl'), 'open'])
|
#subprocess.Popen([os.path.join(target, 'ctl'), 'open'])
|
||||||
|
|
|
@ -263,21 +263,21 @@ class Update(Thread):
|
||||||
|
|
||||||
def install(self):
|
def install(self):
|
||||||
while update_available():
|
while update_available():
|
||||||
self.status('Downloading new version...')
|
self.status('Downloading...')
|
||||||
while not download():
|
while not download():
|
||||||
self.status('Download failed... (try again in 10 seconds)')
|
self.status('Download failed, retrying...')
|
||||||
time.sleep(10)
|
time.sleep(5)
|
||||||
self.status('Downloading new version...')
|
self.status('Downloading...')
|
||||||
self.status('Installing new version...')
|
self.status('Installing...')
|
||||||
if not install(False):
|
if not install(False):
|
||||||
self.status('Installation failed...')
|
self.status('Installation failed.')
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def update_database(self):
|
def update_database(self):
|
||||||
db_version = settings.server.get('db_version', 0)
|
db_version = settings.server.get('db_version', 0)
|
||||||
if db_version < settings.DB_VERSION:
|
if db_version < settings.DB_VERSION:
|
||||||
self.status('Migrating database...')
|
self.status('Updating...')
|
||||||
if db_version < 1:
|
if db_version < 1:
|
||||||
db_version = migrate_1()
|
db_version = migrate_1()
|
||||||
if db_version < 2:
|
if db_version < 2:
|
||||||
|
@ -285,7 +285,7 @@ class Update(Thread):
|
||||||
settings.server['db_version'] = settings.DB_VERSION
|
settings.server['db_version'] = settings.DB_VERSION
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.status('Checking for Updates...')
|
self.status('Checking for updates...')
|
||||||
self.update_database()
|
self.update_database()
|
||||||
if self.install():
|
if self.install():
|
||||||
restart_oml()
|
restart_oml()
|
||||||
|
|
Loading…
Reference in a new issue