Add args to Windows and MacOS auto startup

This commit is contained in:
JonnyWong16 2020-12-21 13:39:53 -08:00
parent 56a9ccd818
commit 4787f42d2e
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 6 additions and 4 deletions

View file

@ -162,10 +162,11 @@ def set_startup():
plist_file_path = os.path.join(launch_agents, plist_file)
exe = sys.executable
run_args = [arg for arg in plexpy.ARGS if arg != '--nolaunch']
if plexpy.FROZEN:
args = [exe]
args = [exe] + run_args
else:
args = [exe, plexpy.FULL_PATH]
args = [exe, plexpy.FULL_PATH] + run_args
plist_dict = {
'Label': common.PRODUCT,

View file

@ -148,10 +148,11 @@ def set_startup():
startup_reg_path = "Software\\Microsoft\\Windows\\CurrentVersion\\Run"
exe = sys.executable
run_args = [arg for arg in plexpy.ARGS if arg != '--nolaunch']
if plexpy.FROZEN:
args = [exe]
args = [exe] + run_args
else:
args = [exe, plexpy.FULL_PATH]
args = [exe, plexpy.FULL_PATH] + run_args
registry_key_name = '{}_{}'.format(common.PRODUCT, plexpy.CONFIG.PMS_UUID)