Skip to content

Commit b40d563

Browse files
committed
- version 0.9.3.11.14 - 0.9.3.14-beta14
- the "Open Directory" window now inclues options to open the config directories of the installed players
1 parent 49d7e69 commit b40d563

File tree

11 files changed

+60
-22
lines changed

11 files changed

+60
-22
lines changed

Changelog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
* fixing a crash that would occur when trying to use the external
66
player before playing a station for the first time
77
* fixing #294 Keypresses shows up as characters in the Pyradio window
8+
* the "Open Directory" window now inclues options to open the config
9+
directories of the installed players
10+
* fixing a bug occurring when saving the volume of a station; the
11+
profle would not be found, resulting in creating duplicate profile
12+
entries.
13+
14+
Users are strongly encouraged to open the players' config file and
15+
manually remove any duplicate profiles
816

917
2025-05-19 s-n-g
1018
* version 0.9.3.11.13 - 0.9.3.13-beta13

docs/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ <h2 id="changelog">Changelog <span style="padding-left: 10px;"><sup style="font-
197197
* fixing a crash that would occur when trying to use the external
198198
player before playing a station for the first time
199199
* fixing #294 Keypresses shows up as characters in the Pyradio window
200+
* the "Open Directory" window now inclues options to open the config
201+
directories of the installed players
202+
* fixing a bug occurring when saving the volume of a station; the
203+
profle would not be found, resulting in creating duplicate profile
204+
entries.
205+
206+
Users are strongly encouraged to open the players' config file and
207+
manually remove any duplicate profiles
200208

201209
2025-05-19 s-n-g
202210
* version 0.9.3.11.13 - 0.9.3.13-beta13

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pyradio"
3-
version = "0.9.3.11.13"
3+
version = "0.9.3.11.14"
44
authors = [
55
{ name="Ben Dowling", email="[email protected]" },
66
{ name="Spiros Georgaras", email="[email protected]" },

pyradio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
" pyradio -- Console radio player. "
33

4-
version_info = (0, 9, 3, 11, 13)
4+
version_info = (0, 9, 3, 11, 14)
55

66
# Set it to True if new stations have been
77
# added to the package's stations.csv

pyradio/config_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4705,7 +4705,7 @@ def show(self, parent=None, reset=False):
47054705
# self._win.addstr(Y, X, self._widgets[1].active_width * '─', curses.color_pair(12))
47064706
# self._win.addstr(Y, self._widgets[1].left_pad + int((self._widgets[1].active_width - len(' Help '))/2), ' Help ', curses.color_pair(4))
47074707
# Y += 1
4708-
# self._win.addstr(Y, X, 'asdasd ads asd as', curses.color_pair(5))
4708+
# self._win.addstr(Y, X, 'test text', curses.color_pair(5))
47094709
# self._win.refresh()
47104710
# for i in range(len(self._widgets)):
47114711
# try:

pyradio/edit.py

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from time import sleep
66
import logging
77
from sys import platform
8-
from os import path, remove, sep, access, X_OK, environ
8+
from os import path, remove, sep, access, X_OK, environ, makedirs
99
from string import punctuation as string_punctuation
1010
try:
1111
# python 3
@@ -54,58 +54,74 @@ def __init__(self, config, parent, global_functions):
5454
self._cnf = config
5555

5656
if self._cnf.xdg_compliant:
57-
self._items = (
57+
self._items = [
5858
'Config Directory',
5959
'Data Directory',
6060
'State Directory',
6161
'Cache Directory',
6262
'Code Directory',
6363
'Recordings Directory ',
64-
)
65-
self._dir = (
64+
]
65+
self._dir = [
6666
self._cnf.stations_dir,
6767
self._cnf.data_dir,
6868
self._cnf.state_dir,
6969
self._cnf.cache_dir,
7070
path.dirname(__file__),
7171
self._cnf.recording_dir
72-
)
73-
self._ord = (
72+
]
73+
self._ord = [
7474
ord('1'),
7575
ord('2'),
7676
ord('3'),
7777
ord('4'),
7878
ord('5'),
7979
ord('6')
80-
)
80+
]
8181
else:
82-
self._items = (
82+
self._items = [
8383
'Config Directory',
8484
'Data Directory',
8585
'Cache Directory',
8686
'Code Directory',
8787
'Recordings Directory ',
88-
)
89-
self._dir = (
88+
]
89+
self._dir = [
9090
self._cnf.stations_dir,
9191
self._cnf.data_dir,
9292
self._cnf.cache_dir,
9393
path.dirname(__file__),
9494
self._cnf.recording_dir
95-
)
96-
self._ord = (
95+
]
96+
self._ord = [
9797
ord('1'),
9898
ord('2'),
9999
ord('3'),
100100
ord('4'),
101101
ord('5')
102-
)
102+
]
103103

104104
# if logger.isEnabledFor(logging.DEBUG):
105105
# logger.debug('Open Directory Window')
106106
# for n in self._dir:
107107
# logger.debug('dir: "{}"'.format(n))
108108

109+
# logger.error(self._cnf.profile_manager.config_files)
110+
for a_player in self._cnf.AVAILABLE_PLAYERS:
111+
if logger.isEnabledFor(logging.DEBUG):
112+
logger.debug(a_player.PLAYER_DISPLAY_NAME + ' player found')
113+
try:
114+
base = path.dirname(self._cnf.profile_manager.config_files[a_player.PLAYER_NAME][0])
115+
# logger.error(f'{base = }')
116+
makedirs(base, exist_ok=True)
117+
self._items.append(a_player.PLAYER_DISPLAY_NAME + ' Config Directory')
118+
self._dir.append(base)
119+
self._ord.append( ord(str(int(chr(self._ord[-1]))+1)) )
120+
except KeyError:
121+
if logger.isEnabledFor(logging.ERROR):
122+
logger.error(a_player.PLAYER_DISPLAY_NAME + ' not in config')
123+
pass
124+
109125
SimpleCursesMenu.__init__(
110126
self,
111127
Y = -1, X = -1,
@@ -122,6 +138,7 @@ def __init__(self, config, parent, global_functions):
122138
color_cursor_active=curses.color_pair(9),
123139
window_type=SimpleCursesMenu.CENTERED,
124140
margin=1,
141+
max_height=11,
125142
global_functions=global_functions
126143
)
127144
# self._group_selection_window.show(parent=self.bodyWin)

pyradio/install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
''' This is PyRadio version this
1818
install.py was released for
1919
'''
20-
PyRadioInstallPyReleaseVersion = '0.9.3.11.13'
20+
PyRadioInstallPyReleaseVersion = '0.9.3.11.14'
2121

2222
locale.setlocale(locale.LC_ALL, "")
2323

pyradio/player.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2639,6 +2639,7 @@ def _is_accepted_input(self, input_string):
26392639
class MpvPlayer(Player):
26402640
'''Implementation of Player object for MPV'''
26412641

2642+
PLAYER_DISPLAY_NAME = 'MPV'
26422643
PLAYER_NAME = 'mpv'
26432644
PLAYER_CMD = 'mpv'
26442645
WIN = False
@@ -3174,6 +3175,7 @@ def _display_mpv_volume_value(self):
31743175
class MpPlayer(Player):
31753176
'''Implementation of Player object for MPlayer'''
31763177

3178+
PLAYER_DISPLAY_NAME = 'MPlayer'
31773179
PLAYER_NAME = 'mplayer'
31783180
PLAYER_CMD = 'mplayer'
31793181
WIN = False
@@ -3513,7 +3515,8 @@ def _format_volume_string(self, volume_string):
35133515

35143516
class VlcPlayer(Player):
35153517
'''Implementation of Player for VLC'''
3516-
PLAYER_NAME = "vlc"
3518+
PLAYER_DISPLAY_NAME = 'VLC'
3519+
PLAYER_NAME = 'vlc'
35173520
WIN = False
35183521
if platform.startswith('win'):
35193522
WIN = True

pyradio/radio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8017,9 +8017,9 @@ def keypress(self, char):
80178017

80188018
elif ret == self.ws.LOCALIZED_CONFIG_MODE:
80198019
''' keyboard localized window '''
8020-
# self._print_not_implemented_yet()
8021-
self.ws.operation_mode = self.ws.LOCALIZED_CONFIG_MODE
8022-
self._localized_init_config()
8020+
self._print_not_implemented_yet()
8021+
# self.ws.operation_mode = self.ws.LOCALIZED_CONFIG_MODE
8022+
# self._localized_init_config()
80238023
return
80248024

80258025
else:

pyradio/simple_curses_widgets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,6 +2337,7 @@ def _get_window(self):
23372337
self._maxY = items_max_Y = len(self._items)
23382338
if self._maxY > Y - 2 * self._outer_margin:
23392339
self._maxY = Y - 2 * self._outer_margin
2340+
# logger.error(f'1 {self._maxY = }')
23402341

23412342
# logger.error('max = {}'.format(max(len(x) for x in self._items)))
23422343
self._maxX = items_max_X = max(cjklen(x) for x in self._items) + 2
@@ -2352,6 +2353,7 @@ def _get_window(self):
23522353
self._maxY = 10
23532354
if self._maxX < 30:
23542355
self._maxX = 30
2356+
# logger.error(f'2 {self._maxY = }')
23552357

23562358
aY, aX = self._parent.getbegyx()
23572359
self._Y = aY + int((Y-self._maxY)/2)

pyradio/win.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
https://sourceforge.net/projects/mpv-player-windows/files/latest/download
3939
'''
4040
zurl = [
41-
'https://sourceforge.com/projects/mpv-player-windows/files/64bit/mpv-x86_64-20250608-git-a418d21.7z/download',
41+
'https://sourceforge.com/projects/mpv-player-windows/files/64bit/mpv-x86_64-20250615-git-e8ade13.7z/download',
4242
'https://sourceforge.net/projects/mplayerwin/files/MPlayer-MEncoder/r38151/mplayer-svn-38151-x86_64.7z/download'
4343
]
4444

0 commit comments

Comments
 (0)