Skip to content

Commit d50a883

Browse files
committed
rearranging config groups
1 parent 071c332 commit d50a883

File tree

3 files changed

+22
-28
lines changed

3 files changed

+22
-28
lines changed

pyradio/config.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,35 +1320,35 @@ class PyRadioConfig(PyRadioStations):
13201320
opts['enable_mouse'] = ['Enable mouse support: ', False]
13211321
opts['recording_dir'] = ['Recordings dir: ', '']
13221322
opts['resource_opener'] = ['Resource Opener: ', 'auto']
1323+
opts['playlist_manngement_title'] = ['Playlist Management Options', '']
1324+
opts['confirm_station_deletion'] = ['Confirm station deletion: ', True]
1325+
opts['confirm_playlist_reload'] = ['Confirm playlist reload: ', True]
1326+
opts['auto_save_playlist'] = ['Auto save playlist: ', False]
1327+
opts['conn_title'] = ['Connection Options: ', '']
1328+
opts['connection_timeout'] = ['Connection timeout: ', '10']
1329+
opts['force_http'] = ['Force http connections: ', False]
13231330
opts['notification'] = ['Notifications', '']
13241331
opts['enable_notifications'] = ['Enable notifications: ', '-1']
13251332
opts['use_station_icon'] = [' Use station icon: ', True]
13261333
opts['remove_station_icons'] = [' Remove cached icons: ', True]
13271334
opts['clock_title'] = ['Clock', '']
13281335
opts['enable_clock'] = ['Display on startup: ', False]
13291336
opts['time_format'] = ['Time format: ', '1']
1330-
opts['conn_title'] = ['Connection Options: ', '']
1331-
opts['connection_timeout'] = ['Connection timeout: ', '10']
1332-
opts['force_http'] = ['Force http connections: ', False]
13331337
opts['theme_title'] = ['Theme Options', '']
13341338
opts['theme'] = ['Theme: ', 'dark']
13351339
opts['use_transparency'] = ['Use transparency: ', False]
13361340
opts['force_transparency'] = [' Force transparency: ', False]
13371341
opts['calculated_color_factor'] = ['Calculated color: ', '0']
13381342
opts['console_theme'] = ['Console theme: ', 'dark']
1339-
opts['playlist_manngement_title'] = ['Playlist Management Options', '']
1340-
opts['confirm_station_deletion'] = ['Confirm station deletion: ', True]
1341-
opts['confirm_playlist_reload'] = ['Confirm playlist reload: ', True]
1342-
opts['auto_save_playlist'] = ['Auto save playlist: ', False]
13431343
opts['remote'] = ['Remote Control Server', '']
13441344
opts['remote_control_server_ip'] = ['Server IP: ', 'localhost']
13451345
opts['remote_control_server_port'] = ['Server Port: ', '9998']
13461346
opts['remote_control_server_auto_start'] = ['Auto-start Server: ', False]
1347-
opts['online_header'] = ['Online services', '']
1348-
opts['radiobrowser'] = ['RadioBrowser', '-']
13491347
opts['shortcuts'] = ['Keyboard Shortcuts', '']
13501348
opts['shortcuts_keys'] = ['Shortcuts', '-']
13511349
opts['localized_keys'] = ['Localized Shortcuts', '-']
1350+
opts['online_header'] = ['Online services', '']
1351+
opts['radiobrowser'] = ['RadioBrowser', '-']
13521352
opts['requested_player'] = ['', '']
13531353
opts['dirty_config'] = ['', False]
13541354

pyradio/config_window.py

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -75,26 +75,26 @@ class PyRadioConfigWindow():
7575
_help_text.append(['If this options is enabled, the mouse can be used to scroll the playlist, start, stop and mute the player, adjust its volume etc.', '|', 'Mouse support is highly terminal dependent, that\'s why it is disabled by default.', '|', 'Default value: False'])
7676
_help_text.append([ 'This is the folder where recorded files will be saved', '|', 'Tip: When you open the window "h" will display HTML help about this parameter (not in Line Editor).', '|', 'Default value: "pyradio-recordings" in home dir' ])
7777
_help_text.append(['This is a Linux (et al) only parameter. It has no effect on Windows or MacOS.', '|',
78-
'A Resource Opener is a program used to open files passed to it as arguments. PyRadio will use it to open either directories or HTML files.', '|',
7978
'Default value is "auto", in which case, PyRadio will try to use xdg-open, gio, mimeopen, mimeo or handlr, in that order of detection. If none if found, the requested file will simply not open.'
8079
])
81-
82-
_help_text.append(None)
83-
_help_text.append(['If this options is enabled, a Desktop Notification will be displayed using the notification daemon / service.', '|', 'If enabled but no notification is displayed, please refer to', 'https://github.com/coderholic/pyradio/desktop-notification.md', '|', 'Valid values are:', ' -1: disabled ', ' 0: enabled (no repetition) ', ' x: repeat every x seconds ', '|', 'Default value: -1'])
84-
_help_text.append(['Notice: Not applicable on Windows!', '|', 'Online Radio Directory Services (like RadioBrowser) will usually provide an icon for the stations they advertise.', '|', 'PyRadio can use this icon (provided that one exists and is of JPG or PNG format) while displaying Desktop Notifications.', '|', 'Setting this option to True, will enable the behavior above.', '|', 'If this option is False, the default icon will be used.', '|', 'Default value: True'])
85-
_help_text.append(['Notice: Not applicable on Windows!', '|', 'If the previous option is enabled, Stations Icons will be cached.', '|', 'If this option is set to True, all icons will be deleted at program exit.', '|', 'If set to False, the icons will be available for future use.', '|', 'Default value: True'])
86-
87-
8880
_help_text.append(None)
89-
_help_text.append(['If this option is enabled, the current time will be displayed at the bottom left corner of the window at program startup.', '|', 'Adjust the time format in the next option to change how the current time is displayed.', '|', r'You can always hide it by pressing \t (default shortcut).', '|', 'Default value: False'])
90-
_help_text.append(['This is the time format to be used when the clock is visible.', '|', 'Available values are:', ' 0: 24h, with seconds', ' 1: 24h, no seconds', ' 2: 12h, with am/pm and seconds', ' 3: 12h, no am/pm, with seconds', ' 4: 12h, with am/pm, no seconds', ' 5: 12h, no am/pm, no seconds', '|', 'Default value: 1'])
81+
_help_text.append(['Specify whether you will be asked to confirm every station deletion action.', '|', 'Default value: True'])
82+
_help_text.append(['Specify whether you will be asked to confirm playlist reloading, when the playlist has not been modified within PyRadio.', '|', 'Default value: True'])
83+
_help_text.append(['Specify whether you will be asked to save a modified playlist whenever it needs saving.', '|', 'Default value: False'])
9184
_help_text.append(None)
9285
_help_text.append(['PyRadio will wait for this number of seconds to get a station/server message indicating that playback has actually started.', '|',
9386
'If this does not happen within this number of seconds after the connection is initiated, PyRadio will consider the station unreachable, and display the "Failed to connect to: station" message.', '|', 'Press "h"/Left or "l"/Right to change value.',
9487
'|', 'Valid values: 5 - 60, 0 disables check', 'Default value: 10'])
9588
_help_text.append(['Most radio stations use plain old http protocol to broadcast, but some of them use https.', '|', 'If this parameter is enabled, all connections will use http; results depend on the combination of station/player.', '|', 'This value is read at program startup, use "z" to change its effect while mid-session.',
9689
'|', 'Default value: False'])
9790
_help_text.append(None)
91+
_help_text.append(['If this options is enabled, a Desktop Notification will be displayed using the notification daemon / service.', '|', 'If enabled but no notification is displayed, please refer to', 'https://github.com/coderholic/pyradio/desktop-notification.md', '|', 'Valid values are:', ' -1: disabled ', ' 0: enabled (no repetition) ', ' x: repeat every x seconds ', '|', 'Default value: -1'])
92+
_help_text.append(['Notice: Not applicable on Windows!', '|', 'Online Radio Directory Services (like RadioBrowser) will usually provide an icon for the stations they advertise.', '|', 'PyRadio can use this icon (provided that one exists and is of JPG or PNG format) while displaying Desktop Notifications.', '|', 'Setting this option to True, will enable the behavior above.', '|', 'If this option is False, the default icon will be used.', '|', 'Default value: True'])
93+
_help_text.append(['Notice: Not applicable on Windows!', '|', 'If the previous option is enabled, Stations Icons will be cached.', '|', 'If this option is set to True, all icons will be deleted at program exit.', '|', 'If set to False, the icons will be available for future use.', '|', 'Default value: True'])
94+
_help_text.append(None)
95+
_help_text.append(['If this option is enabled, the current time will be displayed at the bottom left corner of the window at program startup.', '|', 'Adjust the time format in the next option to change how the current time is displayed.', '|', r'You can always hide it by pressing \t (default shortcut).', '|', 'Default value: False'])
96+
_help_text.append(['This is the time format to be used when the clock is visible.', '|', 'Available values are:', ' 0: 24h, with seconds', ' 1: 24h, no seconds', ' 2: 12h, with am/pm and seconds', ' 3: 12h, no am/pm, with seconds', ' 4: 12h, with am/pm, no seconds', ' 5: 12h, no am/pm, no seconds', '|', 'Default value: 1'])
97+
_help_text.append(None)
9898
_help_text.append(['The theme to be used by default.', '|',
9999
'This is the equivalent to the -t , --theme command line option.', '|',
100100
'If a theme uses more colors than those supported by the terminal in use, the "dark" theme will be used instead (but the "light" theme will be used, if the "light_16colors" theme was requested but not supported).',
@@ -105,21 +105,15 @@ class PyRadioConfigWindow():
105105
_help_text.append(['Pyradio can calculate and use an alternative color for secondary windows.', '|', 'This option will determine if this color will be used (value > 0) or not (value = 0), provided that the theme used does not already provide it.', '|', 'The value of this option is actually the factor to darken or lighten the main (stations) background color.', '|', 'Valid Values: 0-0.2', 'Default value: 0'])
106106
_help_text.append(['The console theme is the one used when PyRadio is executed either from the Linux Virtual Console or the terminal used does not support color changes.', '|', 'This change will take effect after PyRadio is restarted.', '|', 'Default value: dark'])
107107
_help_text.append(None)
108-
_help_text.append(['Specify whether you will be asked to confirm every station deletion action.',
109-
'|', 'Default value: True'])
110-
_help_text.append(['Specify whether you will be asked to confirm playlist reloading, when the playlist has not been modified within PyRadio.',
111-
'|', 'Default value: True'])
112-
_help_text.append(['Specify whether you will be asked to save a modified playlist whenever it needs saving.', '|', 'Default value: False'])
113-
_help_text.append(None)
114108
_help_text.append(['This is the IP for the Remote Control Server.', '|', 'Available options:', '- localhost : PyRadio will be accessible from within the current system only.', '- lan : PyRadio will be accessible from any computer in the local network.', '- IP : In case the system has more than one interfaces.', '|', 'Use "Space", "Enter", "l/Right" to change the value.','|', 'Default value: localhost'])
115109
_help_text.append(
116110
['This is the port used by the Remote Control Server (the port the server is listening to).', '|', 'Please make sure that a "free" port is specified here, to avoid any conflicts with existing services and daemons.', '|', 'If an invalid port number is inserted, the cursor will not move to another field.', '|', 'Valid values: 1025-65535', 'Default value: 9998'])
117111
_help_text.append(['If set to True, the Server will be automatically started when PyRadio starts.', '|', r'If set to False, one can start the Server using the "\s" command from the Main program window.', '|', 'Default value: False'])
118112
_help_text.append(None)
119-
_help_text.append(['This options will open the configuration window for the RadioBrowser Online Stations Directory.',])
120-
_help_text.append(None)
121113
_help_text.append(['This options will open the configuration window for the Shortcuts Definitions.', '|', 'Please keep in mind that if you customize the keyboard shortcuts, the documentation may no longer align with your personalized settings. While the in-program runtime help will always reflect your current key configurations, the static documentation will continue to display the default shortcuts.', '|', 'To ensure you have the best experience, refer to the runtime help for the most accurate information regarding your customized key bindings!'])
122114
_help_text.append(['The "Localized Shortcuts" option allows you to define and customize keyboard shortcuts based on your preferred language. This feature enhances your experience by providing a seamless way to interact with the program in your chosen language.', '|', 'You can choose a language name from the list to load the corresponding character mapping file. This file contains the relationship between English letters (A-Z, a-z) and the letters used in your selected language.', '|', 'If the language does not exit, you will be able to create it.'])
115+
_help_text.append(None)
116+
_help_text.append(['This options will open the configuration window for the RadioBrowser Online Stations Directory.',])
123117

124118
_config_options = None
125119

pyradio/player.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ def updateStatus(self, *args):
945945
subsystemOut = subsystemOutRaw.decode('utf-8', 'replace')
946946
got_404 = False
947947
if stop():
948-
rgeak
948+
break
949949
elif subsystemOut == '':
950950
if logger.isEnabledFor(logging.INFO):
951951
logger.info('----==== player crached ====----')

0 commit comments

Comments
 (0)