Skip to content

Commit

Permalink
Version 0.8.8.5 (BUG FIX release)
Browse files Browse the repository at this point in the history
commenting out log error messages
  • Loading branch information
s-n-g committed Feb 27, 2021
1 parent e848cae commit bbbd6a3
Show file tree
Hide file tree
Showing 9 changed files with 131 additions and 128 deletions.
14 changes: 9 additions & 5 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
2021-02-27 s-n-g
* Version 0.8.8.5 (BUG FIX release)
* Fixing -ap value not activated by player
* Commenting out excessive error log messages

2021-02-27 s-n-g
* Version 0.8.8.4 (BUG FIX release)
* Fixing double click behavior (while in playback
double clicking to a different station will start it.
* vcl will not start muted (volume = 0)

2021-02-26 s-n-g
* Version 0.8.8.3
* Basic mouse support implemented
* Config option to enable mouse support added
* Implementing players extra parameters set.
Expand All @@ -14,15 +22,11 @@
changes (encoding, connection type, player parameters).
* When restarting playback, play the correct station
not the selected one.
* Fixing several minor bugs.

2021-01-09 s-n-g
* adding autostart BAT file on Windows to
prevent session locking when Windows
terminate while PyRadio is still running

2020-12-24 s-n-g
* pyradio will always use a profile
* Fixing several minor bugs.

2020-12-21 s-n-g
* Theme selection window will not crash when resizing
Expand Down
2 changes: 1 addition & 1 deletion pyradio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
" pyradio -- Console radio player. "

version_info = (0, 8, 8, 4)
version_info = (0, 8, 8, 5)

# Application state:
# New stable version: ''
Expand Down
22 changes: 11 additions & 11 deletions pyradio/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def read_playlist_file(self, stationFile='', is_register=False):
return -1

self.stations = list(self._reading_stations)
#logger.error('DE stations\n{}\n\n'.format(self.stations))
# logger.error('DE stations\n{}\n\n'.format(self.stations))
self._reading_stations = []
self._ps.add(is_register=self._open_register_list or is_register)
self._set_playlist_elements(stationFile)
Expand Down Expand Up @@ -760,7 +760,7 @@ def remove_station(self, target):
def insert_station(self, station, target):
''' Insert a station in the list at index target
It is inserted ABOVE old target (old target becomes old target + 1)'''
#logger.error('DE target= {0}, number_of_stations = {1}'.format(target, self.number_of_stations))
# logger.error('DE target= {0}, number_of_stations = {1}'.format(target, self.number_of_stations))
if target < 0 or \
target > self.number_of_stations or \
self.number_of_stations == 0:
Expand All @@ -777,21 +777,21 @@ def insert_station(self, station, target):
self.stations = list(d)
self.dirty_playlist = True
self.number_of_stations = len(self.stations)
#logger.error('DE number_of_stations = {}'.format(self.number_of_stations))
# logger.error('DE number_of_stations = {}'.format(self.number_of_stations))
return True, self.number_of_stations

def move_station(self, source, target):
''' Moves a station in the list from index source to index target
It is moved ABOVE old target (old target becomes old target + 1)'''
#logger.error('DE source = {0}, target = {1}'.format(source, target))
#logger.error('DE number_of_stations = {}'.format(self.number_of_stations))
# logger.error('DE source = {0}, target = {1}'.format(source, target))
# logger.error('DE number_of_stations = {}'.format(self.number_of_stations))
if source == target or \
source < 0 or \
target < 0 or \
source >= self.number_of_stations or \
target >= self.number_of_stations or \
self.number_of_stations == 0:
#logger.error('\n\nreturning False\n\n')
# logger.error('\n\nreturning False\n\n')
return False
if source < target:
step = 1
Expand All @@ -800,7 +800,7 @@ def move_station(self, source, target):
d = collections.deque(self.stations)
d.rotate(-source)
source_item = d.popleft()
#logger.error('DE source_item = "{}"'.format(source_item))
# logger.error('DE source_item = "{}"'.format(source_item))
d.rotate(source)
d.rotate(-target)
d.appendleft(source_item)
Expand Down Expand Up @@ -890,11 +890,11 @@ def open_browser(self, url):
self.dirty_playlist = False

def save_station_position(self, startPos, selection, playing):
#logger.error('DE startPos = {0}, selection = {1}'.format(startPos, selection))
# logger.error('DE startPos = {0}, selection = {1}'.format(startPos, selection))
self._ps.startPos = startPos
self._ps.selection = selection
self._ps.playing = playing
#logger.error('DE self._ps._p\n\n{}\n\n'.format(self._ps._p))
# logger.error('DE self._ps._p\n\n{}\n\n'.format(self._ps._p))

def append_to_register(self, register, station):
reg_file = path.join(self.registers_dir, 'register_' + register + '.csv')
Expand Down Expand Up @@ -1516,7 +1516,7 @@ def _config_to_params(self, a_param):

def check_parameters(self):
''' Config parameters check '''
#logger.error('DE check_params: params = {}'.format(self.params))
# logger.error('DE check_params: params = {}'.format(self.params))

for a_key in self.saved_params.keys():
if self.saved_params[a_key] != self.params[a_key]:
Expand Down Expand Up @@ -1898,7 +1898,7 @@ def add(self, station_path='',
startPos, selection, playing,
is_register,
browsing_station_service])
#logger.error('DE playlist history\n{}\n'.format(self._p))
# logger.error('DE playlist history\n{}\n'.format(self._p))

def get_item_member(self, member, item_id=-1):
if member in self._id.keys():
Expand Down
5 changes: 2 additions & 3 deletions pyradio/config_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,6 @@ def _dict_to_list(self):
self._selections[a_param_set][2] = int(a_param) - 1
else:
self._items_dict[a_param_set].append(a_param)
logger.error('DE selections = {}'.format(self._selections))

def _list_to_dict(self):
''' convert self._items_dict to self._working_params '''
Expand Down Expand Up @@ -1979,9 +1978,9 @@ def refresh_win(self, resizing=False):

def refresh_selection(self, resizing=False):
pad = len(str(self.startPos + self.maxY - 2 - self.pad_adjustment))
#logger.error('DE \n\npos = {0}, pad = {1}\n\n'.format(self.startPos + self.maxY - 2 - self.pad_adjustment, pad))
# logger.error('DE \n\npos = {0}, pad = {1}\n\n'.format(self.startPos + self.maxY - 2 - self.pad_adjustment, pad))
for i in range(0, self.maxY - 2):
#logger.error('de i = {0}, startPos = {1}'.format(i, self.startPos))
# logger.error('de i = {0}, startPos = {1}'.format(i, self.startPos))
if i + self.startPos < self._num_of_items:
line, pad = self._format_line(i, pad)
colour = self._get_color(i)
Expand Down
14 changes: 7 additions & 7 deletions pyradio/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,12 +625,12 @@ def __init__(self, filename, parent, create=False,
else:
self._to_path = self._from_path
self._display_from_file = self._from_file
logger.error('filename = {0}\nfrom path = {1}\nfrom file = {2}\nto path = {3}\ndisplay name = {4}'.format(
filename,
self._from_path,
self._from_file,
self._to_path,
self._display_from_file))
# logger.error('filename = {0}\nfrom path = {1}\nfrom file = {2}\nto path = {3}\ndisplay name = {4}'.format(
# filename,
# self._from_path,
# self._from_file,
# self._to_path,
# self._display_from_file))

self._parent_win = parent
self._create = create
Expand Down Expand Up @@ -818,7 +818,7 @@ def show(self):
self.checked_checkbox = None


#logger.error('DE \n\nmaxY = {}, maxX = {}\n\n'.format(self.maxY, self.maxX))
# logger.error('DE \n\nmaxY = {}, maxX = {}\n\n'.format(self.maxY, self.maxX))
if self.maxY < 22 + adjust_line_Y or self.maxX < 74:
if self.maxY < 11 or self.maxX < 44:
txt = ' Window too small to display content '
Expand Down
28 changes: 17 additions & 11 deletions pyradio/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class Log(object):

_player_stopped = 0

_show_status_updates = False

def __init__(self):
self.width = None

Expand Down Expand Up @@ -118,11 +120,12 @@ def write(self,
except:
if logger.isEnabledFor(logging.ERROR):
logger.error('Cannot update the Status Bar...')
if logger.isEnabledFor(logging.DEBUG):
try:
logger.debug('Status: "{}"'.format(self.msg))
except:
pass
if self._show_status_updates:
if logger.isEnabledFor(logging.DEBUG):
try:
logger.debug('Status: "{}"'.format(self.msg))
except:
pass

self._active_width = self.width

Expand All @@ -147,8 +150,9 @@ def write(self,
first_print = self._do_i_print_last_char(first_print)
self.cursesScreen.refresh()
self._active_width -= len(d_msg)
if logger.isEnabledFor(logging.DEBUG):
logger.debug('Suffix: {}'.format(self.suffix))
if self._show_status_updates:
if logger.isEnabledFor(logging.DEBUG):
logger.debug('Suffix: {}'.format(self.suffix))

''' display counter '''
if self.counter:
Expand All @@ -166,8 +170,9 @@ def write(self,
self.cursesScreen.refresh()
self._active_width -= len(d_msg)
self.display_help_message = False
if logger.isEnabledFor(logging.DEBUG):
logger.debug('Counter: {}'.format(self.counter))
if self._show_status_updates:
if logger.isEnabledFor(logging.DEBUG):
logger.debug('Counter: {}'.format(self.counter))

if self.asked_to_stop:
self.asked_to_stop = False
Expand All @@ -184,8 +189,9 @@ def write(self,
suffix_string)
self.cursesScreen.refresh()
self.display_help_message = True
if logger.isEnabledFor(logging.DEBUG):
logger.debug('Press ? for help: yes')
if self._show_status_updates:
if logger.isEnabledFor(logging.DEBUG):
logger.debug('Press ? for help: yes')
else:
if logger.isEnabledFor(logging.DEBUG):
logger.debug('Press ? for help: no')
Expand Down
Loading

0 comments on commit bbbd6a3

Please sign in to comment.