Skip to content

Commit

Permalink
- version 0.9.3.11.2 - 0.9.3.12-beta2
Browse files Browse the repository at this point in the history
- fixing saving keyboard.json
- updating docs
  • Loading branch information
s-n-g committed Dec 5, 2024
1 parent a5b6e66 commit 6fbf308
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 82 deletions.
2 changes: 1 addition & 1 deletion Changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
2024-12-04 s-n-g
2024-12-05 s-n-g
* version 0.9.3.11.2 - 0.9.3.12-beta2
* Implementing the Shortcuts Window, making it possible to customize
PyRadio's key bindings
Expand Down
7 changes: 6 additions & 1 deletion devel/update_win_players
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ function get_mplayer(){

echo -en " Reading published ${cMagenta}MPlayer${cReset} versions ... "

FOUND=$(curl -s -L 'https://sourceforge.net/projects/mplayerwin/files/MPlayer-MEncoder' 2>/dev/null | grep '<tr title' | sed -e 's/<tr title="//' -e 's/".*//'|grep -e '^r')
FOUND=$(curl -s -L 'https://sourceforge.net/projects/mplayerwin/files/MPlayer-MEncoder' 2>/dev/null | \
grep '<tr title' | \
sed -e 's/.*<tr title="//' \
-e 's/".*//' | \
sed -n 1p
)

if [ $? -ne 0 ]
then
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ <h2 id="requirements">Requirements <span style="padding-left: 10px;"><sup style=
<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>
<pre style="height: 200px;">

2024-12-04 s-n-g
2024-12-05 s-n-g
* version 0.9.3.11.2 - 0.9.3.12-beta2
* Implementing the Shortcuts Window, making it possible to customize
PyRadio's key bindings
Expand Down
2 changes: 2 additions & 0 deletions docs/pyradio.1
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ not exist. Not available on Windows.
.IP\ \fB-p\fR\ [\fISTATION_NUMBER\fR],\ \fB--play\fR\ [\fISTATION_NUMBER\fR]
Start and play. The value is num station or empty for
random.
.IP\ \fB-x\fR,\ \fB--external-player\fR
Play station in external player. Can be combined with \fB--play\fR.
.IP\ \fB-u\fR\ \fIPLAYER\fR,\ \fB--use\fR\fB-player\fR\ \fIPLAYER\fR
Use specified player. A comma-separated list can be
used to specify detection order. Supported players:
Expand Down
167 changes: 100 additions & 67 deletions pyradio/config_window.py

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions pyradio/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,15 @@ def read_keyboard_shortcuts(file_path, reset=False):
global kbkey # Declare kbkey as global since we're reassigning it
if reset:
kbkey = populate_dict() # Reassign kbkey with a new OrderedDict
else:
data = None
try:
with open(file_path, 'r', encoding='utf-8', errors='ignore') as json_file:
data = json.load(json_file)
except (FileNotFoundError, json.JSONDecodeError, TypeError, IOError):
pass
if data is not None:
for n in data.keys():
kbkey[n] = data[n] # Modify the existing kbkey
data = None
try:
with open(file_path, 'r', encoding='utf-8', errors='ignore') as json_file:
data = json.load(json_file)
except (FileNotFoundError, json.JSONDecodeError, TypeError, IOError):
pass
if data is not None:
for n in data.keys():
kbkey[n] = data[n] # Modify the existing kbkey

def read_localized_keyboard(file_path, keyboard_path):
''' read file_path which is {'keyboard': 'name of country'},
Expand Down
2 changes: 1 addition & 1 deletion pyradio/messages_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ def set_text(self, parent, *args):
__|Esc| |*|Exit |editing mode|.
__|0| |*| Switch between |c|ocnflicting items.
|*|Available in |editing mode| as well.
__|{h}| |*|Display this help screen.
__|{?}| |*|Display this help screen.
''')) + r'''
To change a |Keyboard Shortcut|, just enter the |editing mode|. This will
Expand Down
2 changes: 1 addition & 1 deletion pyradio/radio.py
Original file line number Diff line number Diff line change
Expand Up @@ -6083,7 +6083,7 @@ def keypress(self, char):
# # logger.error('\n\nbackup params\n{}\n\n'.format(self._cnf.backup_player_params))
# if char == curses.KEY_RESIZE:
# logger.error('\n\nRESIZE\n\n')
logger.error('\n\nchar = {}\n\n'.format(char))
# logger.error('\n\nchar = {}\n\n'.format(char))
# letter = get_unicode_and_cjk_char(self.outerBodyWin, char)
# logger.error('\n\nletter = {}\n\n'.format(letter))
if char in (curses.KEY_RESIZE, ):
Expand Down

0 comments on commit 6fbf308

Please sign in to comment.