mirror of
https://github.com/WorldObservationLog/AppleMusicDecrypt.git
synced 2026-01-15 14:22:54 -03:00
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# DO NOT EDIT IT
|
# DO NOT EDIT IT
|
||||||
version = "0.0.5"
|
version = "0.0.6"
|
||||||
|
|
||||||
[instance]
|
[instance]
|
||||||
url = "127.0.0.1:8080"
|
url = "127.0.0.1:8080"
|
||||||
@@ -19,6 +19,7 @@ memorySize = "512M"
|
|||||||
cpuModel = "Cascadelake-Server-v5"
|
cpuModel = "Cascadelake-Server-v5"
|
||||||
# Waiting time for wrapper-manager to start
|
# Waiting time for wrapper-manager to start
|
||||||
timeout = 80
|
timeout = 80
|
||||||
|
showWindow = false
|
||||||
|
|
||||||
[region]
|
[region]
|
||||||
# The language of song metadata. Influence song title, author and other information.
|
# The language of song metadata. Influence song title, author and other information.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from creart import exists_module
|
|||||||
from creart.creator import AbstractCreator, CreateTargetInfo
|
from creart.creator import AbstractCreator, CreateTargetInfo
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
CONFIG_VERSION = "0.0.5"
|
CONFIG_VERSION = "0.0.6"
|
||||||
|
|
||||||
|
|
||||||
class Instance(BaseModel):
|
class Instance(BaseModel):
|
||||||
@@ -20,6 +20,7 @@ class LocalInstance(BaseModel):
|
|||||||
memorySize: str = "512M"
|
memorySize: str = "512M"
|
||||||
cpuModel: str = "Cascadelake-Server-v5"
|
cpuModel: str = "Cascadelake-Server-v5"
|
||||||
timeout: int = 30
|
timeout: int = 30
|
||||||
|
showWindow: bool = False
|
||||||
|
|
||||||
|
|
||||||
class Region(BaseModel):
|
class Region(BaseModel):
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ from src.config import Config
|
|||||||
from src.logger import GlobalLogger
|
from src.logger import GlobalLogger
|
||||||
|
|
||||||
ARGUMENTS = ["qemu-system-x86_64", "-machine q35", f"-cpu {it(Config).localInstance.cpuModel}",
|
ARGUMENTS = ["qemu-system-x86_64", "-machine q35", f"-cpu {it(Config).localInstance.cpuModel}",
|
||||||
f"-m {it(Config).localInstance.memorySize}", "-display none", "-hda assets/wrapper-manager.qcow2",
|
f"-m {it(Config).localInstance.memorySize}", "-hda assets/wrapper-manager.qcow2",
|
||||||
"-device virtio-net-pci,netdev=net0", "-netdev user,id=net0,hostfwd=tcp:127.0.0.1:32767-:32767"]
|
"-device virtio-net-pci,netdev=net0", "-netdev user,id=net0,hostfwd=tcp:127.0.0.1:32767-:32767"]
|
||||||
HWACCEL = f"-accel {it(Config).localInstance.hardwareAccelerator}"
|
HWACCEL = f"-accel {it(Config).localInstance.hardwareAccelerator}"
|
||||||
|
|
||||||
@@ -24,6 +24,8 @@ class QemuInstance:
|
|||||||
await self.get_instance_image()
|
await self.get_instance_image()
|
||||||
if it(Config).localInstance.enableHardwareAcceleration:
|
if it(Config).localInstance.enableHardwareAcceleration:
|
||||||
ARGUMENTS.insert(3, HWACCEL)
|
ARGUMENTS.insert(3, HWACCEL)
|
||||||
|
if not it(Config).localInstance.showWindow:
|
||||||
|
ARGUMENTS.insert(5, "-display none")
|
||||||
self.proc = loop.create_task(
|
self.proc = loop.create_task(
|
||||||
asyncio.create_subprocess_shell(" ".join(ARGUMENTS), stdout=asyncio.subprocess.PIPE,
|
asyncio.create_subprocess_shell(" ".join(ARGUMENTS), stdout=asyncio.subprocess.PIPE,
|
||||||
stderr=asyncio.subprocess.PIPE))
|
stderr=asyncio.subprocess.PIPE))
|
||||||
|
|||||||
Reference in New Issue
Block a user