mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Adjusted update script
This commit is contained in:
parent
0bf6e80e07
commit
fb55944147
@ -30,7 +30,7 @@ Also neat: You can use your **custom artist or track images**.
|
|||||||
|
|
||||||
1) Install Maloja with
|
1) Install Maloja with
|
||||||
|
|
||||||
pip3 install maloja
|
pip3 install malojaserver
|
||||||
|
|
||||||
2) Start the server with
|
2) Start the server with
|
||||||
|
|
||||||
|
10
maloja
10
maloja
@ -42,6 +42,9 @@ def yellow(txt): return "\033[93m" + txt + "\033[0m"
|
|||||||
|
|
||||||
|
|
||||||
def update_version_2():
|
def update_version_2():
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if gotodir():
|
if gotodir():
|
||||||
try:
|
try:
|
||||||
DATA_DIR = os.environ["XDG_DATA_HOME"].split(":")[0]
|
DATA_DIR = os.environ["XDG_DATA_HOME"].split(":")[0]
|
||||||
@ -61,12 +64,14 @@ def update_version_2():
|
|||||||
|
|
||||||
print("Installing pip package...")
|
print("Installing pip package...")
|
||||||
|
|
||||||
os.system("pip3 install maloja --upgrade --no-cache-dir")
|
os.system("pip3 install malojaserver --upgrade --no-cache-dir")
|
||||||
|
|
||||||
print(yellow("Maloja may now be started from any directory with the command"),blue("maloja start"))
|
print(yellow("Maloja may now be started from any directory with the command"),blue("maloja start"))
|
||||||
print(yellow("Updates will continue to work with ") + blue("maloja update") + yellow(", but you may also use pip directly"))
|
print(yellow("Updates will continue to work with ") + blue("maloja update") + yellow(", but you may also use pip directly"))
|
||||||
print(yellow("Please test your new server installation. If it works correctly with all your scrobbles, rules, settings and custom images, you can delete your old Maloja directory."))
|
print(yellow("Please test your new server installation. If it works correctly with all your scrobbles, rules, settings and custom images, you can delete your old Maloja directory."))
|
||||||
|
|
||||||
|
if stop(): os.system("maloja start")
|
||||||
|
|
||||||
def gotodir():
|
def gotodir():
|
||||||
if os.path.exists("./server.py"):
|
if os.path.exists("./server.py"):
|
||||||
return True
|
return True
|
||||||
@ -372,8 +377,7 @@ if __name__ == "__main__":
|
|||||||
if sys.argv[1] == "start": restart()
|
if sys.argv[1] == "start": restart()
|
||||||
elif sys.argv[1] == "restart": restart()
|
elif sys.argv[1] == "restart": restart()
|
||||||
elif sys.argv[1] == "stop": stop()
|
elif sys.argv[1] == "stop": stop()
|
||||||
elif sys.argv[1] == "update": update()
|
elif sys.argv[1] == "update": update_version_2()
|
||||||
elif sys.argv[1] == "import": loadlastfm()
|
elif sys.argv[1] == "import": loadlastfm()
|
||||||
elif sys.argv[1] == "install": installhere()
|
elif sys.argv[1] == "install": installhere()
|
||||||
elif sys.argv[1] == "update_v2": update_version_2()
|
|
||||||
else: print("Valid commands: start restart stop update import install")
|
else: print("Valid commands: start restart stop update import install")
|
||||||
|
@ -5,3 +5,4 @@ nimrodel>=0.4.9
|
|||||||
setproctitle>=1.1.10
|
setproctitle>=1.1.10
|
||||||
wand>=0.5.4
|
wand>=0.5.4
|
||||||
lesscpy>=0.13
|
lesscpy>=0.13
|
||||||
|
pip>=19.3
|
||||||
|
Loading…
Reference in New Issue
Block a user