spolyrics 1.3.2__tar.gz → 1.3.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spolyrics
3
- Version: 1.3.2
3
+ Version: 1.3.4
4
4
  Summary: A minimalist, borderless, zero-delay synced lyrics miniplayer for Spotify on Windows.
5
5
  Author: SpoLyrics Team
6
6
  Requires-Python: >=3.8
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name='spolyrics',
5
- version='1.3.2',
5
+ version='1.3.4',
6
6
  description='A minimalist, borderless, zero-delay synced lyrics miniplayer for Spotify on Windows.',
7
7
  long_description=open('README.md', 'r', encoding='utf-8').read(),
8
8
  long_description_content_type='text/markdown',
@@ -10,7 +10,7 @@ setup(
10
10
  packages=['spolyrics'],
11
11
  entry_points={
12
12
  'gui_scripts': [
13
- 'spolyrics=spolyrics.__main__:main',
13
+ 'spolyrics=spolyrics.__main__:start_app',
14
14
  ],
15
15
  },
16
16
  python_requires='>=3.8',
@@ -26,7 +26,7 @@ from .assets import ICON_B64
26
26
  from tkinter import messagebox
27
27
  from winsdk.windows.media.control import GlobalSystemMediaTransportControlsSessionManager as MediaManager
28
28
 
29
- CURRENT_VERSION = "1.3.2"
29
+ CURRENT_VERSION = "1.3.4"
30
30
  CONFIG_PATH = os.path.join(os.environ.get("APPDATA", ""), "SpoLyrics", "config.json")
31
31
  APP_DIR = os.path.join(os.environ.get("APPDATA", ""), "SpoLyrics")
32
32
  os.makedirs(APP_DIR, exist_ok=True)
@@ -110,11 +110,8 @@ def set_auto_start(enable, force_update=False):
110
110
  exe_path = get_exe_path()
111
111
  if exe_path and os.path.exists(icon_path):
112
112
  if force_update or not os.path.exists(STARTUP_SHORTCUT):
113
- if isinstance(exe_path, tuple):
114
- target, args = exe_path
115
- ps_script = f"$s=(New-Object -COM WScript.Shell).CreateShortcut('{STARTUP_SHORTCUT}');$s.TargetPath='{target}';$s.Arguments='{args}';$s.IconLocation='{icon_path}';$s.Save()"
116
- else:
117
- ps_script = f"$s=(New-Object -COM WScript.Shell).CreateShortcut('{STARTUP_SHORTCUT}');$s.TargetPath='{exe_path}';$s.IconLocation='{icon_path}';$s.Save()"
113
+ launcher_vbs = os.path.join(app_dir, 'launcher.vbs')
114
+ ps_script = f"$s=(New-Object -COM WScript.Shell).CreateShortcut('{STARTUP_SHORTCUT}');$s.TargetPath='wscript.exe';$s.Arguments='\"\"{launcher_vbs}\"\"';$s.IconLocation='{icon_path}';$s.WindowStyle=0;$s.Save()"
118
115
  subprocess.run(["powershell", "-Command", ps_script], creationflags=0x08000000)
119
116
  else:
120
117
  if os.path.exists(STARTUP_SHORTCUT):
@@ -870,15 +867,25 @@ def create_shortcut():
870
867
  path_changed = True
871
868
  with open(path_file, 'w') as f:
872
869
  f.write(str(exe_path))
870
+ launcher_vbs = os.path.join(app_dir, 'launcher.vbs')
871
+ vbs_content = f'Set WshShell = CreateObject("WScript.Shell")\nWshShell.Run """{exe_path}""", 0, False\n'
872
+
873
+ # Selalu update launcher.vbs
874
+ try:
875
+ with open(launcher_vbs, 'w') as f:
876
+ f.write(vbs_content)
877
+ except:
878
+ pass
873
879
 
880
+ needs_update = True
881
+
874
882
  if needs_update:
875
- if exe_path:
876
- if isinstance(exe_path, tuple):
877
- target, args = exe_path
878
- ps_script = f"$s=(New-Object -COM WScript.Shell).CreateShortcut('{shortcut_path}');$s.TargetPath='{target}';$s.Arguments='{args}';$s.IconLocation='{icon_path}';$s.Save()"
879
- else:
880
- ps_script = f"$s=(New-Object -COM WScript.Shell).CreateShortcut('{shortcut_path}');$s.TargetPath='{exe_path}';$s.IconLocation='{icon_path}';$s.Save()"
883
+ try:
884
+ ps_script = f"$s=(New-Object -COM WScript.Shell).CreateShortcut('{shortcut_path}');$s.TargetPath='wscript.exe';$s.Arguments='\"\"{launcher_vbs}\"\"';$s.IconLocation='{icon_path}';$s.WindowStyle=0;$s.Save()"
881
885
  subprocess.run(["powershell", "-Command", ps_script], creationflags=0x08000000)
886
+ path_changed = True
887
+ except:
888
+ pass
882
889
  except Exception as e:
883
890
  logging.error("Failed to create shortcut", exc_info=e)
884
891
  return path_changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spolyrics
3
- Version: 1.3.2
3
+ Version: 1.3.4
4
4
  Summary: A minimalist, borderless, zero-delay synced lyrics miniplayer for Spotify on Windows.
5
5
  Author: SpoLyrics Team
6
6
  Requires-Python: >=3.8
@@ -0,0 +1,2 @@
1
+ [gui_scripts]
2
+ spolyrics = spolyrics.__main__:start_app
@@ -1,2 +0,0 @@
1
- [gui_scripts]
2
- spolyrics = spolyrics.__main__:main
File without changes
File without changes
File without changes
File without changes