mytunes-pro 1.7.5__tar.gz → 1.8.6__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: mytunes-pro
3
- Version: 1.7.5
3
+ Version: 1.8.6
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
@@ -19,7 +19,7 @@ Dynamic: license-file
19
19
 
20
20
  # 🎵 MyTunes Pro (Korean)
21
21
 
22
- **현대적인 CLI 유튜브 뮤직 플레이어 (v1.7.5)**
22
+ **현대적인 CLI 유튜브 뮤직 플레이어 (v1.8.6)**
23
23
  터미널 환경에서 **YouTube 음악을 검색하여 듣는** 가볍고 빠른 키보드 중심의 플레이어입니다.
24
24
  한국어 입력 환경에서도 **숫자 키(1~5)**를 통해 지연 없는 쾌적한 조작이 가능합니다.
25
25
 
@@ -208,7 +208,7 @@ Windows 환경에서 한글 검색이 안 되거나 설치가 어려운 분들
208
208
 
209
209
  # 🎵 MyTunes Pro (English)
210
210
 
211
- **Modern CLI YouTube Music Player (v1.7.5)**
211
+ **Modern CLI YouTube Music Player (v1.8.6)**
212
212
  A lightweight, keyboard-centric terminal player for streaming YouTube music.
213
213
 
214
214
  ---
@@ -296,7 +296,65 @@ sudo apt install mpv python3 python3-pip pipx python3-venv -y
296
296
 
297
297
  ## 🔄 Changelog
298
298
 
299
- ### v1.7.5 (Latest)
299
+ ### v1.8.6 (Latest)
300
+
301
+ - **Browser Popup Optimization (Context7)**: Improved Live Station (F8) experience with optimized CLI flags for a perfectly minimalist UI.
302
+ - **Forced Window Dimensions**: Implemented profile isolation using a timestamped `user-data-dir` to ensure window size and position are always respected, overriding session memory.
303
+ - **UI Cleanup**: Automatically hides distraction-bars (translation, password, automation infobars) and enables instant autoplay for live streams.
304
+
305
+ ### v1.8.5
306
+
307
+ - **Looping Navigation (Menu Wrapping)**: Pressing UP at the first item now wraps to the last item, and pressing DOWN at the last item wraps to the first.
308
+ - **Improved UI Flow**: Enhanced keyboard navigation experience across all list views (Main, Search, Favorites, History).
309
+
310
+ ### v1.8.4
311
+
312
+ - **Python Crash Fix (WSL)**: Eliminated premature termination by implementing `start_new_session=True` for browser launches, isolating them from the TUI process group.
313
+ - **Hybrid Browser Strategy**: Switched to the standard `webbrowser` library for F7 (YouTube links) for maximum internal stability.
314
+ - **Global Error Protection**: Wrapped the main application loop in an exception guard to catch and log transient OS errors without crashing the entire app.
315
+ - **Refined Process Cleanup**: Specialized the `pkill` logic to prevent accidental self-termination while maintaining reliable MPV management.
316
+
317
+ ### v1.8.3
318
+
319
+ - **Direct Binary Execution (WSL)**: Resolved shell parsing issues by bypassing `cmd.exe` and directly executing Windows browser binaries via `/mnt/c/` paths.
320
+ - **App Mode Reliability**: Guaranteed 712x800 popup mode by ensuring flags are delivered directly to the browser process without intermediate shell mangling.
321
+ - **Fixed URL Resolution**: Eliminated the "Empty URL" bug by standardizing argument passing between WSL and Windows.
322
+
323
+ ### v1.8.1
324
+
325
+ - **Fixed App Mode (WSL/Win)**: Guaranteed the browser opens in a clean "App Mode" popup by fixing shell quoting issues in the launch command.
326
+ - **URL Resolution Fix**: Resolved the "Empty URL" bug on WSL/Windows by ensuring the `--app` flag is correctly parsed by the native Windows shell.
327
+ - **Reliable Popup UI**: Standardized on `start "" chrome` for WSL to ensure flags are never misidentified as window titles.
328
+
329
+ ### v1.8.0
330
+
331
+ - **Stabilized Browser Launch (Windows/WSL)**: Completely removed the `--user-data-dir` flag for all Windows-based environments. This permanently resolves the "cannot read or write" directory errors while maintaining reliable 712x800 window sizing through pure app-mode flags.
332
+ - **Clean CMD Execution**: Simplified the WSL-to-Windows transition by using standard `cmd.exe` calls without complex path or variable expansion, ensuring consistent behavior across all systems.
333
+
334
+ ### v1.7.9
335
+
336
+ - **Pure CMD-based Launch (WSL/Win)**: Final fix for WSL-to-Windows browser launch using `cmd.exe /c` with native `%LOCALAPPDATA%` expansion.
337
+ - **Directory Reliability**: Ensured Chrome data directory creation and access by using native Windows shell commands, eliminating the "cannot read or write" errors seen in v1.7.8.
338
+ - **Stable Window Sizing**: Guaranteed 712x800 window size for Live Station (F8) from WSL by correctly isolating browser profiles via native Windows paths.
339
+
340
+ ### v1.7.8
341
+
342
+ - **Native PowerShell Profile Management**: Resolved directory read/write errors in WSL by moving all profile creation and path handling to the Windows side via PowerShell.
343
+ - **Improved Security & Isolation**: Profiles are now created in the standard Windows `LOCALAPPDATA` directory with native permissions, ensuring Chrome can always access its data.
344
+ - **Backslash Consistency**: Forced backslash-only paths through pure PowerShell logic, fixing the mixed-slash issue seen in WSL.
345
+
346
+ ### v1.7.7
347
+
348
+ - **PowerShell Launch (WSL/Win)**: Switched to `powershell.exe` for launching browsers from WSL to ensure robust argument parsing and path handling.
349
+ - **Directory Fix**: Resolved "cannot read or write" error on Windows/WSL by utilizing `$env:TEMP` directly within a native shell context.
350
+ - **Reliable Sizing**: Guaranteed window size application by combining isolated profiles with PowerShell's superior process management.
351
+
352
+ ### v1.7.6
353
+
354
+ - **Isolated Browser Profile**: Guaranteed window sizing for the Live Station (F8) on Windows/WSL by forcing an isolated browser profile using the Windows `%TEMP%` directory.
355
+ - **WSL Path Translation**: Implemented automatic Windows temp path resolution in WSL to enable session persistence and profile isolation.
356
+
357
+ ### v1.7.5
300
358
 
301
359
  - **WSL Integration**: Fully optimized browser launch from WSL by utilizing `cmd.exe` to trigger native Windows browsers.
302
360
  - **F7 Windows Resolve**: Fixed an issue where YouTube (F7) wouldn't open in WSL environments.
@@ -1,6 +1,6 @@
1
1
  # 🎵 MyTunes Pro (Korean)
2
2
 
3
- **현대적인 CLI 유튜브 뮤직 플레이어 (v1.7.5)**
3
+ **현대적인 CLI 유튜브 뮤직 플레이어 (v1.8.6)**
4
4
  터미널 환경에서 **YouTube 음악을 검색하여 듣는** 가볍고 빠른 키보드 중심의 플레이어입니다.
5
5
  한국어 입력 환경에서도 **숫자 키(1~5)**를 통해 지연 없는 쾌적한 조작이 가능합니다.
6
6
 
@@ -189,7 +189,7 @@ Windows 환경에서 한글 검색이 안 되거나 설치가 어려운 분들
189
189
 
190
190
  # 🎵 MyTunes Pro (English)
191
191
 
192
- **Modern CLI YouTube Music Player (v1.7.5)**
192
+ **Modern CLI YouTube Music Player (v1.8.6)**
193
193
  A lightweight, keyboard-centric terminal player for streaming YouTube music.
194
194
 
195
195
  ---
@@ -277,7 +277,65 @@ sudo apt install mpv python3 python3-pip pipx python3-venv -y
277
277
 
278
278
  ## 🔄 Changelog
279
279
 
280
- ### v1.7.5 (Latest)
280
+ ### v1.8.6 (Latest)
281
+
282
+ - **Browser Popup Optimization (Context7)**: Improved Live Station (F8) experience with optimized CLI flags for a perfectly minimalist UI.
283
+ - **Forced Window Dimensions**: Implemented profile isolation using a timestamped `user-data-dir` to ensure window size and position are always respected, overriding session memory.
284
+ - **UI Cleanup**: Automatically hides distraction-bars (translation, password, automation infobars) and enables instant autoplay for live streams.
285
+
286
+ ### v1.8.5
287
+
288
+ - **Looping Navigation (Menu Wrapping)**: Pressing UP at the first item now wraps to the last item, and pressing DOWN at the last item wraps to the first.
289
+ - **Improved UI Flow**: Enhanced keyboard navigation experience across all list views (Main, Search, Favorites, History).
290
+
291
+ ### v1.8.4
292
+
293
+ - **Python Crash Fix (WSL)**: Eliminated premature termination by implementing `start_new_session=True` for browser launches, isolating them from the TUI process group.
294
+ - **Hybrid Browser Strategy**: Switched to the standard `webbrowser` library for F7 (YouTube links) for maximum internal stability.
295
+ - **Global Error Protection**: Wrapped the main application loop in an exception guard to catch and log transient OS errors without crashing the entire app.
296
+ - **Refined Process Cleanup**: Specialized the `pkill` logic to prevent accidental self-termination while maintaining reliable MPV management.
297
+
298
+ ### v1.8.3
299
+
300
+ - **Direct Binary Execution (WSL)**: Resolved shell parsing issues by bypassing `cmd.exe` and directly executing Windows browser binaries via `/mnt/c/` paths.
301
+ - **App Mode Reliability**: Guaranteed 712x800 popup mode by ensuring flags are delivered directly to the browser process without intermediate shell mangling.
302
+ - **Fixed URL Resolution**: Eliminated the "Empty URL" bug by standardizing argument passing between WSL and Windows.
303
+
304
+ ### v1.8.1
305
+
306
+ - **Fixed App Mode (WSL/Win)**: Guaranteed the browser opens in a clean "App Mode" popup by fixing shell quoting issues in the launch command.
307
+ - **URL Resolution Fix**: Resolved the "Empty URL" bug on WSL/Windows by ensuring the `--app` flag is correctly parsed by the native Windows shell.
308
+ - **Reliable Popup UI**: Standardized on `start "" chrome` for WSL to ensure flags are never misidentified as window titles.
309
+
310
+ ### v1.8.0
311
+
312
+ - **Stabilized Browser Launch (Windows/WSL)**: Completely removed the `--user-data-dir` flag for all Windows-based environments. This permanently resolves the "cannot read or write" directory errors while maintaining reliable 712x800 window sizing through pure app-mode flags.
313
+ - **Clean CMD Execution**: Simplified the WSL-to-Windows transition by using standard `cmd.exe` calls without complex path or variable expansion, ensuring consistent behavior across all systems.
314
+
315
+ ### v1.7.9
316
+
317
+ - **Pure CMD-based Launch (WSL/Win)**: Final fix for WSL-to-Windows browser launch using `cmd.exe /c` with native `%LOCALAPPDATA%` expansion.
318
+ - **Directory Reliability**: Ensured Chrome data directory creation and access by using native Windows shell commands, eliminating the "cannot read or write" errors seen in v1.7.8.
319
+ - **Stable Window Sizing**: Guaranteed 712x800 window size for Live Station (F8) from WSL by correctly isolating browser profiles via native Windows paths.
320
+
321
+ ### v1.7.8
322
+
323
+ - **Native PowerShell Profile Management**: Resolved directory read/write errors in WSL by moving all profile creation and path handling to the Windows side via PowerShell.
324
+ - **Improved Security & Isolation**: Profiles are now created in the standard Windows `LOCALAPPDATA` directory with native permissions, ensuring Chrome can always access its data.
325
+ - **Backslash Consistency**: Forced backslash-only paths through pure PowerShell logic, fixing the mixed-slash issue seen in WSL.
326
+
327
+ ### v1.7.7
328
+
329
+ - **PowerShell Launch (WSL/Win)**: Switched to `powershell.exe` for launching browsers from WSL to ensure robust argument parsing and path handling.
330
+ - **Directory Fix**: Resolved "cannot read or write" error on Windows/WSL by utilizing `$env:TEMP` directly within a native shell context.
331
+ - **Reliable Sizing**: Guaranteed window size application by combining isolated profiles with PowerShell's superior process management.
332
+
333
+ ### v1.7.6
334
+
335
+ - **Isolated Browser Profile**: Guaranteed window sizing for the Live Station (F8) on Windows/WSL by forcing an isolated browser profile using the Windows `%TEMP%` directory.
336
+ - **WSL Path Translation**: Implemented automatic Windows temp path resolution in WSL to enable session persistence and profile isolation.
337
+
338
+ ### v1.7.5
281
339
 
282
340
  - **WSL Integration**: Fully optimized browser launch from WSL by utilizing `cmd.exe` to trigger native Windows browsers.
283
341
  - **F7 Windows Resolve**: Fixed an issue where YouTube (F7) wouldn't open in WSL environments.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "mytunes-pro"
7
- version = "1.7.5"
7
+ version = "1.8.6"
8
8
  authors = [
9
9
  { name = "loxo", email = "loxo5432@gmail.com" },
10
10
  ]
@@ -35,7 +35,7 @@ MPV_SOCKET = "/tmp/mpv_socket"
35
35
  LOG_FILE = "/tmp/mytunes_mpv.log"
36
36
  PID_FILE = "/tmp/mytunes_mpv.pid"
37
37
  APP_NAME = "MyTunes Pro"
38
- APP_VERSION = "1.7.5"
38
+ APP_VERSION = "1.8.6"
39
39
 
40
40
  # === [Strings & Localization] ===
41
41
  STRINGS = {
@@ -245,10 +245,12 @@ class Player:
245
245
  # self.cleanup_orphaned_mpv() # Moved to play() per user request
246
246
 
247
247
  def cleanup_orphaned_mpv(self):
248
- # User requested revert to aggressive pkill for reliability
249
- # This ensures any previous background instances are killed
248
+ # Precise pkill to avoid matching the main TUI process
249
+ # Matches 'mpv ' (with space) or 'mpv' as exact process name
250
250
  try:
251
- subprocess.run(["pkill", "-f", "mpv"], stderr=subprocess.DEVNULL)
251
+ subprocess.run(["pkill", "-x", "mpv"], stderr=subprocess.DEVNULL)
252
+ # Second pass for variants or sub-arguments if needed
253
+ subprocess.run(["pkill", "-f", "mpv --video=no"], stderr=subprocess.DEVNULL)
252
254
  except: pass
253
255
 
254
256
  def play(self, url, start_pos=0):
@@ -331,7 +333,6 @@ class Player:
331
333
  try:
332
334
  self.current_proc.terminate()
333
335
  self.current_proc.wait(timeout=1)
334
- self.current_proc.wait(timeout=1)
335
336
  except:
336
337
  # If terminate fails, try socket quit
337
338
  try: self.send_cmd(["quit"])
@@ -619,14 +620,24 @@ class MyTunesApp:
619
620
  if self.selection_idx > 0:
620
621
  self.selection_idx -= 1
621
622
  if self.selection_idx < self.scroll_offset: self.scroll_offset = self.selection_idx
623
+ elif current_list:
624
+ # v1.8.5 - Wrapping: Top to Bottom
625
+ self.selection_idx = len(current_list) - 1
626
+ h, _ = self.stdscr.getmaxyx()
627
+ # Maintain scroll consistency (h - 10 matches draw() layout)
628
+ list_area_height = h - 10
629
+ self.scroll_offset = max(0, self.selection_idx - list_area_height + 1)
622
630
  elif key == curses.KEY_DOWN or k_char in ['j', 'ㅓ']:
623
631
  if self.selection_idx < len(current_list) - 1:
624
632
  self.selection_idx += 1
625
633
  h, _ = self.stdscr.getmaxyx()
626
- # Use h - 10 to match inner_h in draw() (h - footer_h(5) - header_top(3) - borders(2))
627
634
  list_area_height = h - 10
628
635
  if self.selection_idx >= self.scroll_offset + list_area_height:
629
636
  self.scroll_offset = self.selection_idx - list_area_height + 1
637
+ elif current_list:
638
+ # v1.8.5 - Wrapping: Bottom to Top
639
+ self.selection_idx = 0
640
+ self.scroll_offset = 0
630
641
 
631
642
  # Enter / Select: Enter Only (L moved to Forward)
632
643
  elif key == '\n' or key == 10 or key == 13:
@@ -743,58 +754,47 @@ class MyTunesApp:
743
754
  if self.is_remote():
744
755
  self.show_copy_dialog("YouTube", url)
745
756
  else:
746
- try:
747
- # Robust multi-platform open
748
- if sys.platform == 'darwin':
749
- subprocess.Popen(["open", url], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
750
- elif sys.platform == 'win32':
751
- os.startfile(url)
752
- elif self.is_wsl():
753
- # In WSL, call the Windows shell to open the URL in Windows browser
754
- subprocess.Popen(["cmd.exe", "/c", "start", url.replace("&", "^&")], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
755
- else:
756
- webbrowser.open(url)
757
- self.status_msg = "🌐 Opening YouTube in Browser..."
758
- except:
759
- webbrowser.open(url)
760
- self.status_msg = "🌐 Opening YouTube..."
757
+ # v1.8.4 - Use standard webbrowser library for maximum stability on F7
758
+ self.status_msg = "🌐 Opening YouTube in Browser..."
759
+ threading.Thread(target=webbrowser.open, args=(url,), daemon=True).start()
761
760
 
762
- # Open Live Station: F8
761
+ # Open Live Station (F8): App Mode with Optimized Flags (v1.8.6)
763
762
  elif key == curses.KEY_F8:
764
763
  live_url = "https://mytunes.postgresql.co.kr/live/"
765
764
  if self.is_remote():
766
765
  self.show_copy_dialog("Live Station", live_url)
767
766
  return
768
767
 
769
- # Add timestamp to user-data-dir to force size/position flags to be respected (prevents "remembering")
770
- # Using int(time.time() / 3600) to keep it stable within the same hour but fresh enough for new versions
771
- temp_user_data = os.path.join(tempfile.gettempdir(), f"mytunes_v174_{int(time.time() / 10)}")
768
+ # v1.8.6 - Force window size/position by isolating profile
769
+ temp_user_data = os.path.join(tempfile.gettempdir(), f"mytunes_v186_{int(time.time() / 10)}")
772
770
 
773
- # Universal flags
771
+ # Optimized Flag Set (Context7 Research)
774
772
  flags = [
775
773
  f"--app={live_url}",
776
774
  "--window-size=712,800",
777
775
  "--window-position=100,100",
778
- f"--user-data-dir={temp_user_data}",
776
+ f"--user-data-dir={temp_user_data}",
779
777
  "--no-first-run",
780
- "--disable-extensions",
778
+ "--no-default-browser-check",
781
779
  "--disable-default-apps",
780
+ "--disable-infobars",
781
+ "--disable-translate",
782
782
  "--disable-features=Translation",
783
783
  "--disable-save-password-bubble",
784
- "--disable-translate"
784
+ "--autoplay-policy=no-user-gesture-required",
785
+ "--new-window",
786
+ "--disable-extensions"
785
787
  ]
786
788
 
787
789
  launched = False
788
- # 1. macOS (Avoid AppleScript to prevent permission prompts)
790
+ # v1.8.4 - Subprocess Isolation (start_new_session) to prevent crashes on WSL/Linux
791
+ # 1. macOS
789
792
  if sys.platform == 'darwin':
790
- browsers = [
791
- "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
792
- "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
793
- ]
793
+ browsers = ["/Applications/Google Chrome.app/Contents/MacOS/Google Chrome", "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"]
794
794
  for b_path in browsers:
795
795
  if os.path.exists(b_path):
796
796
  try:
797
- # Use 'open -na' but without AppleScript to stay 'standard' and avoid prompts
797
+ # Use -na to open a fresh instance
798
798
  subprocess.Popen(["open", "-na", b_path, "--args"] + flags, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
799
799
  launched = True; break
800
800
  except: pass
@@ -802,35 +802,37 @@ class MyTunesApp:
802
802
  # 2. Windows Native
803
803
  elif sys.platform == 'win32':
804
804
  win_paths = [
805
- os.path.join(os.environ.get('PROGRAMFILES', 'C:\\Program Files'), 'Google\\Chrome\\Application\\chrome.exe'),
806
- os.path.join(os.environ.get('PROGRAMFILES(X86)', 'C:\\Program Files (x86)'), 'Google\\Chrome\\Application\\chrome.exe'),
805
+ os.path.join(os.environ.get('PROGRAMFILES', ''), 'Google\\Chrome\\Application\\chrome.exe'),
806
+ os.path.join(os.environ.get('PROGRAMFILES(X86)', ''), 'Google\\Chrome\\Application\\chrome.exe'),
807
807
  os.path.join(os.environ.get('LOCALAPPDATA', ''), 'Google\\Chrome\\Application\\chrome.exe'),
808
- os.path.join(os.environ.get('PROGRAMFILES', 'C:\\Program Files'), 'BraveSoftware\\Brave-Browser\\Application\\brave.exe'),
809
- os.path.join(os.environ.get('PROGRAMFILES(X86)', 'C:\\Program Files (x86)'), 'Microsoft\\Edge\\Application\\msedge.exe'),
810
- os.path.join(os.environ.get('PROGRAMFILES', 'C:\\Program Files'), 'Microsoft\\Edge\\Application\\msedge.exe'),
811
808
  ]
812
- # Windows specific order: --app MUST be early for some Chrome versions to ignore toolbars
813
- win_flags = flags + ["--new-window"]
814
809
  for p in win_paths:
815
- if os.path.exists(p):
810
+ if p and os.path.exists(p):
816
811
  try:
817
- # Use shell=False (default) for list-based Popen on Windows
818
- subprocess.Popen([p] + win_flags, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
812
+ subprocess.Popen([p] + flags, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
819
813
  launched = True; break
820
814
  except: pass
821
815
 
822
- # 3. WSL (Run Windows Chrome via cmd.exe)
816
+ # 3. WSL / Linux (Direct path with session isolation)
823
817
  elif self.is_wsl():
824
- # In WSL, we use cmd.exe to start the browser. Window size flags work best when passed directly.
825
- # Note: user-data-dir is skipped in WSL for now as Windows can't see /tmp safely without complex path translation.
826
- wsl_flags = f"--app={live_url} --window-size=712,800 --window-position=100,100 --new-window --no-first-run --disable-extensions"
827
- try:
828
- subprocess.Popen(["cmd.exe", "/c", f"start chrome {wsl_flags}"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
829
- launched = True
830
- except:
831
- # Fallback to general start if chrome command fails
818
+ wsl_paths = [
819
+ "/mnt/c/Program Files/Google/Chrome/Application/chrome.exe",
820
+ "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
821
+ "/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe",
822
+ ]
823
+ for p in wsl_paths:
824
+ if os.path.exists(p):
825
+ try:
826
+ # CRITICAL: start_new_session=True isolates the browser from the TUI process group
827
+ # This prevents the TUI from dying when navigating or if the browser has shell issues.
828
+ subprocess.Popen([p] + flags, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, start_new_session=True)
829
+ launched = True; break
830
+ except: pass
831
+
832
+ if not launched:
832
833
  try:
833
- subprocess.Popen(["cmd.exe", "/c", "start", live_url], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
834
+ # Fallback for WSL to CMD (Keep flags for consistency)
835
+ subprocess.Popen(["cmd.exe", "/c", f"start chrome --app={live_url} --user-data-dir={temp_user_data}"], stdout=subprocess.DEVNULL, stderr=stderr=subprocess.DEVNULL, start_new_session=True)
834
836
  launched = True
835
837
  except: pass
836
838
 
@@ -1436,11 +1438,20 @@ class MyTunesApp:
1436
1438
 
1437
1439
  def run(self):
1438
1440
  while self.running:
1439
- self.loop_count = (self.loop_count + 1) % 1000
1440
- self.update_playback_state()
1441
- self.check_autoplay()
1442
- self.draw()
1443
- self.handle_input()
1441
+ try:
1442
+ self.loop_count = (self.loop_count + 1) % 1000
1443
+ self.update_playback_state()
1444
+ self.check_autoplay()
1445
+ self.draw()
1446
+ self.handle_input()
1447
+ except Exception as e:
1448
+ # v1.8.4 - Global resilience: Catch and log loop errors instead of crashing
1449
+ try:
1450
+ with open("/tmp/mytunes_error.log", "a") as f:
1451
+ f.write(f"[{time.ctime()}] Loop Error: {str(e)}\n")
1452
+ except: pass
1453
+ # Small sleep to prevent infinite tight loop on persistent error
1454
+ time.sleep(0.1)
1444
1455
 
1445
1456
  if self.stop_on_exit:
1446
1457
  self.player.stop()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mytunes-pro
3
- Version: 1.7.5
3
+ Version: 1.8.6
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
@@ -19,7 +19,7 @@ Dynamic: license-file
19
19
 
20
20
  # 🎵 MyTunes Pro (Korean)
21
21
 
22
- **현대적인 CLI 유튜브 뮤직 플레이어 (v1.7.5)**
22
+ **현대적인 CLI 유튜브 뮤직 플레이어 (v1.8.6)**
23
23
  터미널 환경에서 **YouTube 음악을 검색하여 듣는** 가볍고 빠른 키보드 중심의 플레이어입니다.
24
24
  한국어 입력 환경에서도 **숫자 키(1~5)**를 통해 지연 없는 쾌적한 조작이 가능합니다.
25
25
 
@@ -208,7 +208,7 @@ Windows 환경에서 한글 검색이 안 되거나 설치가 어려운 분들
208
208
 
209
209
  # 🎵 MyTunes Pro (English)
210
210
 
211
- **Modern CLI YouTube Music Player (v1.7.5)**
211
+ **Modern CLI YouTube Music Player (v1.8.6)**
212
212
  A lightweight, keyboard-centric terminal player for streaming YouTube music.
213
213
 
214
214
  ---
@@ -296,7 +296,65 @@ sudo apt install mpv python3 python3-pip pipx python3-venv -y
296
296
 
297
297
  ## 🔄 Changelog
298
298
 
299
- ### v1.7.5 (Latest)
299
+ ### v1.8.6 (Latest)
300
+
301
+ - **Browser Popup Optimization (Context7)**: Improved Live Station (F8) experience with optimized CLI flags for a perfectly minimalist UI.
302
+ - **Forced Window Dimensions**: Implemented profile isolation using a timestamped `user-data-dir` to ensure window size and position are always respected, overriding session memory.
303
+ - **UI Cleanup**: Automatically hides distraction-bars (translation, password, automation infobars) and enables instant autoplay for live streams.
304
+
305
+ ### v1.8.5
306
+
307
+ - **Looping Navigation (Menu Wrapping)**: Pressing UP at the first item now wraps to the last item, and pressing DOWN at the last item wraps to the first.
308
+ - **Improved UI Flow**: Enhanced keyboard navigation experience across all list views (Main, Search, Favorites, History).
309
+
310
+ ### v1.8.4
311
+
312
+ - **Python Crash Fix (WSL)**: Eliminated premature termination by implementing `start_new_session=True` for browser launches, isolating them from the TUI process group.
313
+ - **Hybrid Browser Strategy**: Switched to the standard `webbrowser` library for F7 (YouTube links) for maximum internal stability.
314
+ - **Global Error Protection**: Wrapped the main application loop in an exception guard to catch and log transient OS errors without crashing the entire app.
315
+ - **Refined Process Cleanup**: Specialized the `pkill` logic to prevent accidental self-termination while maintaining reliable MPV management.
316
+
317
+ ### v1.8.3
318
+
319
+ - **Direct Binary Execution (WSL)**: Resolved shell parsing issues by bypassing `cmd.exe` and directly executing Windows browser binaries via `/mnt/c/` paths.
320
+ - **App Mode Reliability**: Guaranteed 712x800 popup mode by ensuring flags are delivered directly to the browser process without intermediate shell mangling.
321
+ - **Fixed URL Resolution**: Eliminated the "Empty URL" bug by standardizing argument passing between WSL and Windows.
322
+
323
+ ### v1.8.1
324
+
325
+ - **Fixed App Mode (WSL/Win)**: Guaranteed the browser opens in a clean "App Mode" popup by fixing shell quoting issues in the launch command.
326
+ - **URL Resolution Fix**: Resolved the "Empty URL" bug on WSL/Windows by ensuring the `--app` flag is correctly parsed by the native Windows shell.
327
+ - **Reliable Popup UI**: Standardized on `start "" chrome` for WSL to ensure flags are never misidentified as window titles.
328
+
329
+ ### v1.8.0
330
+
331
+ - **Stabilized Browser Launch (Windows/WSL)**: Completely removed the `--user-data-dir` flag for all Windows-based environments. This permanently resolves the "cannot read or write" directory errors while maintaining reliable 712x800 window sizing through pure app-mode flags.
332
+ - **Clean CMD Execution**: Simplified the WSL-to-Windows transition by using standard `cmd.exe` calls without complex path or variable expansion, ensuring consistent behavior across all systems.
333
+
334
+ ### v1.7.9
335
+
336
+ - **Pure CMD-based Launch (WSL/Win)**: Final fix for WSL-to-Windows browser launch using `cmd.exe /c` with native `%LOCALAPPDATA%` expansion.
337
+ - **Directory Reliability**: Ensured Chrome data directory creation and access by using native Windows shell commands, eliminating the "cannot read or write" errors seen in v1.7.8.
338
+ - **Stable Window Sizing**: Guaranteed 712x800 window size for Live Station (F8) from WSL by correctly isolating browser profiles via native Windows paths.
339
+
340
+ ### v1.7.8
341
+
342
+ - **Native PowerShell Profile Management**: Resolved directory read/write errors in WSL by moving all profile creation and path handling to the Windows side via PowerShell.
343
+ - **Improved Security & Isolation**: Profiles are now created in the standard Windows `LOCALAPPDATA` directory with native permissions, ensuring Chrome can always access its data.
344
+ - **Backslash Consistency**: Forced backslash-only paths through pure PowerShell logic, fixing the mixed-slash issue seen in WSL.
345
+
346
+ ### v1.7.7
347
+
348
+ - **PowerShell Launch (WSL/Win)**: Switched to `powershell.exe` for launching browsers from WSL to ensure robust argument parsing and path handling.
349
+ - **Directory Fix**: Resolved "cannot read or write" error on Windows/WSL by utilizing `$env:TEMP` directly within a native shell context.
350
+ - **Reliable Sizing**: Guaranteed window size application by combining isolated profiles with PowerShell's superior process management.
351
+
352
+ ### v1.7.6
353
+
354
+ - **Isolated Browser Profile**: Guaranteed window sizing for the Live Station (F8) on Windows/WSL by forcing an isolated browser profile using the Windows `%TEMP%` directory.
355
+ - **WSL Path Translation**: Implemented automatic Windows temp path resolution in WSL to enable session persistence and profile isolation.
356
+
357
+ ### v1.7.5
300
358
 
301
359
  - **WSL Integration**: Fully optimized browser launch from WSL by utilizing `cmd.exe` to trigger native Windows browsers.
302
360
  - **F7 Windows Resolve**: Fixed an issue where YouTube (F7) wouldn't open in WSL environments.
File without changes
File without changes