Skip to content

Commit 8c29344

Browse files
committed
- version 0.9.2
- Do not check for stations.csv update when session is locked and using -us - updating docs
1 parent da60da1 commit 8c29344

File tree

6 files changed

+63
-10
lines changed

6 files changed

+63
-10
lines changed

Changelog

+21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
2023-03-23 s-n-g
2+
* version 0.9.2
3+
* implementing "player change" (key: \m)
4+
* working on stations deletion, do not delete stations
5+
when session is locked
6+
* changing the way stations.csv updates are done
7+
* adding --update-stations (-us) command line option
8+
* adding indication to denote forced http connection mode
9+
* adding Catppuccin themes - https://github.com/catppuccin
10+
* using rich to add color to console messages as per #174
11+
(python 3 only)
12+
* "Press ? for help" message will not show up when overlapping
13+
normal messages
14+
* working on MPV auto-installation on first install on Windows
15+
* moving last-playlist file in data dir
16+
* fixing pyradio not terminating when answering no to save a
17+
modified playlist
18+
* fixing a theme save crash
19+
* removing some curses.ungetch calls
20+
* updating docs
21+
122
2023-02-20 s-n-g
223
* version 0.9.1
324
* adding pyproject.toml (as per pep-0518)

README.html

+21
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,27 @@ <h2 id="requirements">Requirements <span style="padding-left: 10px;"><sup style=
200200
<h2 id="changelog">Changelog <span style="padding-left: 10px;"><sup style="font-size: 50%"><a href="#" title="Go to top of the page">Top</a></sup></span></h2>
201201
<pre style="height: 200px;">
202202

203+
2023-03-23 s-n-g
204+
* version 0.9.2
205+
* implementing "player change" (key: \m)
206+
* working on stations deletion, do not delete stations
207+
when session is locked
208+
* changing the way stations.csv updates are done
209+
* adding --update-stations (-us) command line option
210+
* adding indication to denote forced http connection mode
211+
* adding Catppuccin themes - https://github.com/catppuccin
212+
* using rich to add color to console messages as per #174
213+
(python 3 only)
214+
* "Press ? for help" message will not show up when overlapping
215+
normal messages
216+
* working on MPV auto-installation on first install on Windows
217+
* moving last-playlist file in data dir
218+
* fixing pyradio not terminating when answering no to save a
219+
modified playlist
220+
* fixing a theme save crash
221+
* removing some curses.ungetch calls
222+
* updating docs
223+
203224
2023-02-20 s-n-g
204225
* version 0.9.1
205226
* adding pyproject.toml (as per pep-0518)

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pyradio"
3-
version = "0.9.1"
3+
version = "0.9.2"
44
authors = [
55
{ name="Ben Dowling", email="[email protected]" },
66
{ name="Spiros Georgaras", email="[email protected]" },

pyradio/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" pyradio -- Console radio player. "
22

3-
version_info = (0, 9, 1)
3+
version_info = (0, 9, 2)
44

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

pyradio/main.py

+16-7
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ def __configureLogger(pyradio_config, debug=None, titles=None):
127127
titles=titles
128128
)
129129

130+
def print_session_is_locked():
131+
print_simple_error('Error: This session is locked!')
132+
print(' Please exist any other instances of the program')
133+
print(' that are currently running and try again.')
134+
sys.exit(1)
135+
130136
def shell():
131137
version_too_old = False
132138
if sys.version_info[0] == 2:
@@ -391,8 +397,7 @@ def shell():
391397

392398
if args.toggle_load_last_playlist:
393399
if pyradio_config.locked:
394-
print_simple_error('Error: Another instance of PyRadio is already running!')
395-
print(' Please close it and try again...')
400+
print_session_is_locked()
396401
sys.exit(1)
397402
else:
398403
read_config(pyradio_config)
@@ -563,9 +568,7 @@ def shell():
563568
if args.extra_player_parameters:
564569
if ':' in args.extra_player_parameters:
565570
if pyradio_config.locked:
566-
print_simple_error('Error: This session is locked!')
567-
print(' Please exist any other instances of the program')
568-
print(' that are currently running and try again.')
571+
print_session_is_locked()
569572
sys.exit(1)
570573
else:
571574
if args.extra_player_parameters.startswith('vlc:profile'):
@@ -606,7 +609,9 @@ def shell():
606609
sys.exit()
607610

608611
if args.list_playlists:
609-
pyradio_config.read_config()
612+
if not config_already_read:
613+
pyradio_config.read_config()
614+
config_already_read = True
610615
pyradio_config.list_playlists()
611616
sys.exit()
612617

@@ -617,7 +622,11 @@ def shell():
617622
config_already_read = True
618623

619624
if args.update_stations:
620-
do_update_stations(pyradio_config)
625+
if pyradio_config.locked:
626+
print_session_is_locked()
627+
sys.exit(1)
628+
else:
629+
do_update_stations(pyradio_config)
621630

622631
if args.no_themes:
623632
pyradio_config.use_themes = False

pyradio/radio.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -2760,7 +2760,9 @@ def _show_main_help_page_4(self, from_keyboard=False):
27602760
reset_metrics=False)
27612761

27622762
def _show_main_help_page_5(self, from_keyboard=False):
2763-
txt = '''!Remote Control Server
2763+
txt = '''!Change Player
2764+
\m |Open player selection window.
2765+
!Remote Control Server
27642766
\s |Start/Stop the |Server|.
27652767
!Title Logger
27662768
W |Toggle Logger on/off

0 commit comments

Comments
 (0)