spolyrics 1.3.0__tar.gz → 1.3.2__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.
- {spolyrics-1.3.0/spolyrics.egg-info → spolyrics-1.3.2}/PKG-INFO +1 -1
- {spolyrics-1.3.0 → spolyrics-1.3.2}/setup.py +6 -2
- {spolyrics-1.3.0 → spolyrics-1.3.2}/spolyrics/__main__.py +21 -20
- {spolyrics-1.3.0 → spolyrics-1.3.2/spolyrics.egg-info}/PKG-INFO +1 -1
- {spolyrics-1.3.0 → spolyrics-1.3.2}/spolyrics.egg-info/SOURCES.txt +1 -1
- spolyrics-1.3.2/spolyrics.egg-info/entry_points.txt +2 -0
- spolyrics-1.3.0/bin/spolyrics.bat +0 -2
- {spolyrics-1.3.0 → spolyrics-1.3.2}/LICENSE +0 -0
- {spolyrics-1.3.0 → spolyrics-1.3.2}/README.md +0 -0
- {spolyrics-1.3.0 → spolyrics-1.3.2}/setup.cfg +0 -0
- {spolyrics-1.3.0 → spolyrics-1.3.2}/spolyrics/__init__.py +0 -0
- {spolyrics-1.3.0 → spolyrics-1.3.2}/spolyrics/assets.py +0 -0
- {spolyrics-1.3.0 → spolyrics-1.3.2}/spolyrics.egg-info/dependency_links.txt +0 -0
- {spolyrics-1.3.0 → spolyrics-1.3.2}/spolyrics.egg-info/requires.txt +0 -0
- {spolyrics-1.3.0 → spolyrics-1.3.2}/spolyrics.egg-info/top_level.txt +0 -0
|
@@ -2,13 +2,17 @@ from setuptools import setup
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='spolyrics',
|
|
5
|
-
version='1.3.
|
|
5
|
+
version='1.3.2',
|
|
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',
|
|
9
9
|
author='SpoLyrics Team',
|
|
10
10
|
packages=['spolyrics'],
|
|
11
|
-
|
|
11
|
+
entry_points={
|
|
12
|
+
'gui_scripts': [
|
|
13
|
+
'spolyrics=spolyrics.__main__:main',
|
|
14
|
+
],
|
|
15
|
+
},
|
|
12
16
|
python_requires='>=3.8',
|
|
13
17
|
install_requires=[
|
|
14
18
|
'winsdk',
|
|
@@ -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.
|
|
29
|
+
CURRENT_VERSION = "1.3.2"
|
|
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)
|
|
@@ -100,20 +100,6 @@ def save_config(config):
|
|
|
100
100
|
|
|
101
101
|
def get_exe_path():
|
|
102
102
|
import sys
|
|
103
|
-
import os
|
|
104
|
-
if getattr(sys, 'frozen', False):
|
|
105
|
-
return sys.executable
|
|
106
|
-
|
|
107
|
-
# Prefer pythonw.exe + main.py to avoid pip launcher bugs and console windows!
|
|
108
|
-
# In venv, pythonw.exe is usually in sys.prefix\Scripts
|
|
109
|
-
pythonw = os.path.join(sys.prefix, 'Scripts', 'pythonw.exe')
|
|
110
|
-
if not os.path.exists(pythonw):
|
|
111
|
-
pythonw = os.path.join(sys.prefix, 'pythonw.exe') # Global install
|
|
112
|
-
|
|
113
|
-
if os.path.exists(pythonw):
|
|
114
|
-
return (pythonw, "-m spolyrics")
|
|
115
|
-
|
|
116
|
-
# Fallback to sys.executable
|
|
117
103
|
return sys.executable
|
|
118
104
|
|
|
119
105
|
def set_auto_start(enable, force_update=False):
|
|
@@ -171,6 +157,11 @@ class MiniLyrics:
|
|
|
171
157
|
self.lbl_next = tk.Label(self.root, text="", fg='#b3b3b3', bg='#191414', font=('Arial', self.font_nxt), wraplength=330, justify="center")
|
|
172
158
|
self.lbl_next.pack(expand=True, fill='both', padx=10, pady=(0, 15))
|
|
173
159
|
|
|
160
|
+
self.progress_bg = tk.Frame(self.root, bg='#333333', height=2)
|
|
161
|
+
self.progress_bg.place(relx=0, rely=1.0, anchor='sw', relwidth=1.0)
|
|
162
|
+
self.progress_fg = tk.Frame(self.progress_bg, bg=self.config['color'], height=2)
|
|
163
|
+
self.progress_fg.place(relx=0, rely=0, anchor='nw', relwidth=0.0)
|
|
164
|
+
|
|
174
165
|
self.update_available = False
|
|
175
166
|
self.root.after(2000, self.check_updates)
|
|
176
167
|
|
|
@@ -204,6 +195,7 @@ class MiniLyrics:
|
|
|
204
195
|
self.current_song = ""
|
|
205
196
|
self.synced_lyrics = []
|
|
206
197
|
self.base_pos = 0.0
|
|
198
|
+
self.duration = 0.0
|
|
207
199
|
self.base_time = time.time()
|
|
208
200
|
self.is_playing = False
|
|
209
201
|
|
|
@@ -225,11 +217,16 @@ class MiniLyrics:
|
|
|
225
217
|
|
|
226
218
|
|
|
227
219
|
def render_lyrics(self):
|
|
220
|
+
pos = self.base_pos
|
|
221
|
+
if self.is_playing:
|
|
222
|
+
pos += time.time() - self.base_time
|
|
223
|
+
|
|
224
|
+
if self.duration > 0:
|
|
225
|
+
self.progress_fg.place(relwidth=min(1.0, max(0.0, pos / self.duration)))
|
|
226
|
+
else:
|
|
227
|
+
self.progress_fg.place(relwidth=0.0)
|
|
228
|
+
|
|
228
229
|
if self.synced_lyrics:
|
|
229
|
-
pos = self.base_pos
|
|
230
|
-
if self.is_playing:
|
|
231
|
-
pos += time.time() - self.base_time
|
|
232
|
-
|
|
233
230
|
cur_text, next_text = "...", ""
|
|
234
231
|
for i, (lyric_time, txt) in enumerate(self.synced_lyrics):
|
|
235
232
|
if pos >= lyric_time:
|
|
@@ -757,6 +754,7 @@ class MiniLyrics:
|
|
|
757
754
|
pos += diff
|
|
758
755
|
|
|
759
756
|
self.base_pos = pos
|
|
757
|
+
self.duration = duration
|
|
760
758
|
self.base_time = time.time()
|
|
761
759
|
|
|
762
760
|
if song_id != self.current_song:
|
|
@@ -826,7 +824,10 @@ class MiniLyrics:
|
|
|
826
824
|
f.write('ping 127.0.0.1 -n 3 > nul\n')
|
|
827
825
|
f.write('taskkill /f /im spolyrics.exe > nul 2>&1\n')
|
|
828
826
|
import sys
|
|
829
|
-
|
|
827
|
+
python_exe = os.path.join(os.path.dirname(sys.executable), "python.exe")
|
|
828
|
+
if not os.path.exists(python_exe):
|
|
829
|
+
python_exe = sys.executable
|
|
830
|
+
f.write(f'"{python_exe}" -m pip install --upgrade --no-cache-dir spolyrics\n')
|
|
830
831
|
f.write(f'start "" {exe_cmd}\n')
|
|
831
832
|
f.write('del "%~f0"\n')
|
|
832
833
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
README.md
|
|
3
3
|
setup.py
|
|
4
|
-
bin/spolyrics.bat
|
|
5
4
|
spolyrics/__init__.py
|
|
6
5
|
spolyrics/__main__.py
|
|
7
6
|
spolyrics/assets.py
|
|
8
7
|
spolyrics.egg-info/PKG-INFO
|
|
9
8
|
spolyrics.egg-info/SOURCES.txt
|
|
10
9
|
spolyrics.egg-info/dependency_links.txt
|
|
10
|
+
spolyrics.egg-info/entry_points.txt
|
|
11
11
|
spolyrics.egg-info/requires.txt
|
|
12
12
|
spolyrics.egg-info/top_level.txt
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|