mytunes-pro 2.1.1__py3-none-any.whl → 2.1.4__py3-none-any.whl
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.
- mytunes/app.py +19 -31
- {mytunes_pro-2.1.1.dist-info → mytunes_pro-2.1.4.dist-info}/METADATA +16 -3
- mytunes_pro-2.1.4.dist-info/RECORD +8 -0
- mytunes_pro-2.1.1.dist-info/RECORD +0 -8
- {mytunes_pro-2.1.1.dist-info → mytunes_pro-2.1.4.dist-info}/WHEEL +0 -0
- {mytunes_pro-2.1.1.dist-info → mytunes_pro-2.1.4.dist-info}/entry_points.txt +0 -0
- {mytunes_pro-2.1.1.dist-info → mytunes_pro-2.1.4.dist-info}/licenses/LICENSE +0 -0
- {mytunes_pro-2.1.1.dist-info → mytunes_pro-2.1.4.dist-info}/top_level.txt +0 -0
mytunes/app.py
CHANGED
|
@@ -44,7 +44,7 @@ MPV_SOCKET = "/tmp/mpv_socket"
|
|
|
44
44
|
LOG_FILE = "/tmp/mytunes_mpv.log"
|
|
45
45
|
PID_FILE = "/tmp/mytunes_mpv.pid"
|
|
46
46
|
APP_NAME = "MyTunes Pro"
|
|
47
|
-
APP_VERSION = "2.1.
|
|
47
|
+
APP_VERSION = "2.1.4"
|
|
48
48
|
|
|
49
49
|
# Initial Locale Setup for WSL/Windows Multibyte/Emoji Harmony
|
|
50
50
|
try:
|
|
@@ -461,7 +461,9 @@ class Player:
|
|
|
461
461
|
# 3. Pre-check: Skip if socket file doesn't exist (e.g. killed elsewhere)
|
|
462
462
|
if not os.path.exists(MPV_SOCKET):
|
|
463
463
|
self.socket_fail_count += 1
|
|
464
|
-
|
|
464
|
+
# Be more patient during loading (mpv takes time to create socket)
|
|
465
|
+
threshold = 15 if self.loading else 2
|
|
466
|
+
if self.socket_fail_count >= threshold:
|
|
465
467
|
self.socket_ok = False
|
|
466
468
|
self.socket_retry_ts = now + 1.5 # 1.5s cool-down
|
|
467
469
|
return None
|
|
@@ -488,7 +490,8 @@ class Player:
|
|
|
488
490
|
return json.loads(response.decode('utf-8'))
|
|
489
491
|
except:
|
|
490
492
|
self.socket_fail_count += 1
|
|
491
|
-
if self.
|
|
493
|
+
threshold = 15 if self.loading else 2
|
|
494
|
+
if self.socket_fail_count >= threshold:
|
|
492
495
|
self.socket_ok = False
|
|
493
496
|
self.socket_retry_ts = now + 1.5 # 1.5s cool-down
|
|
494
497
|
return None
|
|
@@ -603,9 +606,7 @@ class MyTunesApp:
|
|
|
603
606
|
signal.signal(signal.SIGHUP, self.handle_disconnect)
|
|
604
607
|
except: pass
|
|
605
608
|
|
|
606
|
-
|
|
607
|
-
curses.mousemask(curses.ALL_MOUSE_EVENTS | curses.REPORT_MOUSE_POSITION)
|
|
608
|
-
print("\033[?1003h") # Enable mouse tracking
|
|
609
|
+
|
|
609
610
|
|
|
610
611
|
self.sent_history = {}
|
|
611
612
|
|
|
@@ -678,7 +679,15 @@ class MyTunesApp:
|
|
|
678
679
|
def update_playback_state(self):
|
|
679
680
|
# Poll MPV for state with throttling to reduce CPU/IPC overhead
|
|
680
681
|
try:
|
|
681
|
-
#
|
|
682
|
+
# A. Safety: If loading takes too long (> 8s), force reset to allow error handling/skip
|
|
683
|
+
# Must check this even if socket_ok is False!
|
|
684
|
+
now = time.time()
|
|
685
|
+
if self.player.loading and (now - self.player.loading_ts > 8):
|
|
686
|
+
self.player.loading = False
|
|
687
|
+
self.player.socket_ok = True # Reset health to try again
|
|
688
|
+
self.show_feedback("⚠️ Load timed out. Skipping...")
|
|
689
|
+
|
|
690
|
+
# B. Health Check: If socket is known-bad, exit immediately to keep TUI responsive
|
|
682
691
|
if not self.player.socket_ok:
|
|
683
692
|
return
|
|
684
693
|
|
|
@@ -700,12 +709,6 @@ class MyTunesApp:
|
|
|
700
709
|
self.dm.set_progress(self.current_track['url'], self.playback_time)
|
|
701
710
|
|
|
702
711
|
|
|
703
|
-
# Safety: If loading takes too long (> 8s), force reset to allow error handling/skip
|
|
704
|
-
now = time.time()
|
|
705
|
-
if self.player.loading and (now - self.player.loading_ts > 8):
|
|
706
|
-
self.player.loading = False
|
|
707
|
-
self.show_feedback("⚠️ Load timed out. Skipping...")
|
|
708
|
-
|
|
709
712
|
# 2. Frequent: Pause state (Every 2 loops ~400ms)
|
|
710
713
|
if self.loop_count % 2 == 0:
|
|
711
714
|
p = self.player.get_property("pause")
|
|
@@ -767,19 +770,8 @@ class MyTunesApp:
|
|
|
767
770
|
return "EXIT_BKG" # Standard ESC
|
|
768
771
|
|
|
769
772
|
# 3. Mouse Click
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
_, mx, my, _, bstate = curses.getmouse()
|
|
773
|
-
if bstate & (curses.BUTTON1_CLICKED | curses.BUTTON1_RELEASED):
|
|
774
|
-
h, w = self.stdscr.getmaxyx()
|
|
775
|
-
branding = "mytunes-pro.com/postgresql.co.kr"
|
|
776
|
-
branding_x = w - 2 - len(branding)
|
|
777
|
-
if my == h - 2 and branding_x <= mx < w - 2:
|
|
778
|
-
rel_x = mx - branding_x
|
|
779
|
-
if rel_x < 15: return "OPEN_HOME"
|
|
780
|
-
if rel_x > 15: return "OPEN_PARTNER"
|
|
781
|
-
except: pass
|
|
782
|
-
return "MOUSE_CLICK"
|
|
773
|
+
# 3. Mouse Click & Scroll
|
|
774
|
+
# 3. Mouse Click (Removed)
|
|
783
775
|
|
|
784
776
|
# 4. Standard Keys Mapping
|
|
785
777
|
k_char = str(key).lower() if isinstance(key, str) else str(key)
|
|
@@ -1201,7 +1193,7 @@ class MyTunesApp:
|
|
|
1201
1193
|
else:
|
|
1202
1194
|
start_pos = 0
|
|
1203
1195
|
|
|
1204
|
-
self.player.play(item['url'], start_pos)
|
|
1196
|
+
self.player.play(item['url'], start_pos, initial_eq_preset=target_eq_preset)
|
|
1205
1197
|
|
|
1206
1198
|
# Re-apply EQ logic (double check: mpv restart wipes af property?)
|
|
1207
1199
|
# Yes, play() might restart mpv if socket fails.
|
|
@@ -1221,10 +1213,6 @@ class MyTunesApp:
|
|
|
1221
1213
|
self.playback_time = start_pos
|
|
1222
1214
|
self.playback_duration = 0
|
|
1223
1215
|
self.is_paused = False
|
|
1224
|
-
self.stdscr.nodelay(False) # Blocking input for dialog
|
|
1225
|
-
h, w = self.stdscr.getmaxyx()
|
|
1226
|
-
box_h, box_w = 8, 60
|
|
1227
|
-
box_y, box_x = (h - box_h) // 2, (w - box_w) // 2
|
|
1228
1216
|
|
|
1229
1217
|
def ask_resume(self, saved_time, track_title):
|
|
1230
1218
|
self.stdscr.nodelay(False) # Blocking input for dialog
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mytunes-pro
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.4
|
|
4
4
|
Summary: A lightweight, keyboard-centric terminal player for streaming YouTube music.
|
|
5
5
|
Author-email: loxo <loxo5432@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/postgresql-co-kr/mytunes
|
|
@@ -18,9 +18,9 @@ Requires-Dist: yt-dlp
|
|
|
18
18
|
Requires-Dist: pusher
|
|
19
19
|
Dynamic: license-file
|
|
20
20
|
|
|
21
|
-
# 🎵 MyTunes Pro - Professional TUI Edition v2.1.
|
|
21
|
+
# 🎵 MyTunes Pro - Professional TUI Edition v2.1.4
|
|
22
22
|
|
|
23
|
-
## 🚀 Terminal-based Media Workflow Experiment v2.1.
|
|
23
|
+
## 🚀 Terminal-based Media Workflow Experiment v2.1.3
|
|
24
24
|
|
|
25
25
|
> [!IMPORTANT]
|
|
26
26
|
> **Legal Disclaimer:** This project is a personal, non-commercial research experiment for developer education.
|
|
@@ -390,6 +390,19 @@ Windows 환경에서 한글 검색이 안 되거나 설치가 어려운 분들
|
|
|
390
390
|
|
|
391
391
|
## 🔄 Changelog
|
|
392
392
|
|
|
393
|
+
### v2.1.4 (2026-02-03)
|
|
394
|
+
- **Mouse Support Removed**: Reverted to pure keyboard interface for cleaner experience.
|
|
395
|
+
- **Bug Fixes**: Resolved IndentationError and key loop crashes.
|
|
396
|
+
- **Stability**: Removed unused code paths.
|
|
397
|
+
|
|
398
|
+
### v2.1.3 (2026-02-02)
|
|
399
|
+
- **Resolved TUI Freeze on Song Launch**: Fixed a critical regression from v2.0.6 where misplaced blocking input code caused the TUI to freeze on "Loading" during song transitions or resume until a key was pressed.
|
|
400
|
+
- **Fixed EQ Application**: Restored correct Auto EQ initialization during `play_music` in `app.py`.
|
|
401
|
+
|
|
402
|
+
### v2.1.2 (2026-02-02)
|
|
403
|
+
- **Fix "Loading" Stuck**: Improved IPC resilience to prevent the TUI from being stuck on "Loading" during song transitions or resume, by increasing the initial socket connection timeout patience.
|
|
404
|
+
- **Fail-Safe Loading**: Implemented a hard reset for the loading state if mpv takes longer than 8 seconds to respond, ensuring the TUI remains interactive.
|
|
405
|
+
|
|
393
406
|
### v2.1.1 (2026-02-02)
|
|
394
407
|
- **WSL UI Polish**: Hides Equalizer (EQ) labels and status in the TUI when running on WSL to avoid confusion, as the feature is disabled in that environment for stability.
|
|
395
408
|
- **Improved Feedback**: Provides a clear status message when the 'E' key is pressed on WSL.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
mytunes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
mytunes/app.py,sha256=2EAFeMB4j-7EZAe3vaRGbkjZd5qzcYvFxlyDzKzI8FM,83690
|
|
3
|
+
mytunes_pro-2.1.4.dist-info/licenses/LICENSE,sha256=lOrP0EIjxcgJia__W3f3PVDZkRd2oRzFkyH2g3LRRCg,1063
|
|
4
|
+
mytunes_pro-2.1.4.dist-info/METADATA,sha256=kUyvNfHdHKX7_mrkme6WQ33D4oUKXX6-SOqZlEv7nEE,30989
|
|
5
|
+
mytunes_pro-2.1.4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
6
|
+
mytunes_pro-2.1.4.dist-info/entry_points.txt,sha256=6-MsC13nIgzLvrREaGotc32FgxHx_Iuu1z2qCzJs1_4,65
|
|
7
|
+
mytunes_pro-2.1.4.dist-info/top_level.txt,sha256=KWzdFyNNG_sO7GT83-sN5fYArP4_DL5I8HYIwgazXyY,8
|
|
8
|
+
mytunes_pro-2.1.4.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
mytunes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
mytunes/app.py,sha256=ns6bWufnE3ElzBbLHtlfdjjqlKJq2B-VnaQiJLmLcUk,84259
|
|
3
|
-
mytunes_pro-2.1.1.dist-info/licenses/LICENSE,sha256=lOrP0EIjxcgJia__W3f3PVDZkRd2oRzFkyH2g3LRRCg,1063
|
|
4
|
-
mytunes_pro-2.1.1.dist-info/METADATA,sha256=K7UsewSpojOy421P374Hye4Bhe96hwDxKCxQwJs9VSk,30046
|
|
5
|
-
mytunes_pro-2.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
6
|
-
mytunes_pro-2.1.1.dist-info/entry_points.txt,sha256=6-MsC13nIgzLvrREaGotc32FgxHx_Iuu1z2qCzJs1_4,65
|
|
7
|
-
mytunes_pro-2.1.1.dist-info/top_level.txt,sha256=KWzdFyNNG_sO7GT83-sN5fYArP4_DL5I8HYIwgazXyY,8
|
|
8
|
-
mytunes_pro-2.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|