From fe41bfa19bfe6d1df54d4b20dcc3fb3e7b430d17 Mon Sep 17 00:00:00 2001 From: Spiros Georgaras Date: Fri, 11 Dec 2020 00:43:09 +0200 Subject: [PATCH] - Version 0.8.8 - Fixing volume display for python 3 MPV, before a Title is received - Finalizing \p command --- Changelog | 7 +- pyradio/__init__.py | 2 +- pyradio/browser.py | 1 - pyradio/config_window.py | 65 ++++++++------ pyradio/player.py | 19 ++-- pyradio/radio.py | 184 +++++++++++++++++++++++++++------------ 6 files changed, 180 insertions(+), 98 deletions(-) diff --git a/Changelog b/Changelog index ae027210..a26d2065 100644 --- a/Changelog +++ b/Changelog @@ -1,7 +1,10 @@ -2020-12-06 s-n-g - * Starting 0.8.8-beta7 +2020-12-10 s-n-g + * Starting 0.8.8 + * Implementing "Paste to playlist" (\p) command * Implementing "Create Playlist" (\n) * Addind \u (show Unnamed Register) command + * Fixing volume display for MPV on python3 before a + valid Title has been received * Revert to stations playlist if default one (set by config) does not exist * Second level config windows will not be displayed diff --git a/pyradio/__init__.py b/pyradio/__init__.py index 5e31f24a..8299998d 100644 --- a/pyradio/__init__.py +++ b/pyradio/__init__.py @@ -6,7 +6,7 @@ # New stable version: '' # Beta version: 'betax', x=1,2,3... # RC version: 'RCx', x=1,23... -app_state = 'beta7' +app_state = '' __version__ = version = '.'.join(map(str, version_info)) __project__ = __name__ diff --git a/pyradio/browser.py b/pyradio/browser.py index 819d7955..b084ec9d 100644 --- a/pyradio/browser.py +++ b/pyradio/browser.py @@ -809,7 +809,6 @@ def get_data_dict(data): callback(my_data, ret) lock.release() - def probeBrowsers(a_browser_url): base_url = a_browser_url.split('/')[2] logger.error('DE base_url = ' + base_url) diff --git a/pyradio/config_window.py b/pyradio/config_window.py index 9172bc1c..129abb6c 100644 --- a/pyradio/config_window.py +++ b/pyradio/config_window.py @@ -674,9 +674,9 @@ def refresh_win(self, set_encoding=True): curses.color_pair(4)) for i in range(1, self.maxX - 1): try: - self._win.addch(self.maxY -4, i, '─', curses.color_pair(3)) + self._win.addch(self.maxY - 4, i, '─', curses.color_pair(3)) except: - self._win.addstr(self.maxY -4 , i, u'─'.encode('utf-8'), curses.color_pair(3)) + self._win.addstr(self.maxY - 4, i, u'─'.encode('utf-8'), curses.color_pair(3)) try: self._win.addch(self.maxY - 4, 0, '├', curses.color_pair(3)) self._win.addch(self.maxY - 4, self.maxX - 1, '┤', curses.color_pair(3)) @@ -981,6 +981,7 @@ def __init__(self, parent, config_path, default_playlist, include_registers=Fals #self._include_registers = True if self._include_registers: self._title = ' Paste: Select target ' + self._playlist_in_editor = self._selected_playlist self.init_window() def __del__(self): @@ -992,10 +993,6 @@ def init_window(self): self.maxY = self._num_of_items + 2 if self.maxY > self._parent_maxY - 2: self.maxY = self._parent_maxY - 2 - #elif self.maxY < 12: - # self.maxY = 12 - #if self.maxY < 7: - # self.maxY = 7 self._calculate_width() self._win = None Y = int((self._parent_maxY - self.maxY) / 2) + self._parent_Y @@ -1007,7 +1004,6 @@ def refresh_and_resize(self, parent_maxYX): self._parent_maxX = parent_maxYX[1] self.init_window() self.refresh_win(resizing=True) - self._resize() def _calculate_width(self): self.maxX = self._max_len + 5 + len(str(self._num_of_items)) @@ -1018,15 +1014,16 @@ def _calculate_width(self): self.maxX = self._parent_maxX - 4 def refresh_win(self, resizing=False): - """ set_encoding is False when resizing """ - #self.init_window(set_encoding) self._win.bkgdset(' ', curses.color_pair(3)) self._win.erase() self._win.box() - self._win.addstr(0, - int((self.maxX - len(self._title)) / 2), + self._win.addstr( + 0, int((self.maxX - len(self._title)) / 2), self._title, - curses.color_pair(4)) + curses.color_pair(4) + ) + if resizing: + self._resize() self.refresh_selection(resizing) def refresh_selection(self, resizing=False): @@ -1036,13 +1033,13 @@ def refresh_selection(self, resizing=False): #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) - col = self._get_color(i) - self._win.hline(i + 1, 1, ' ', self.maxX - 2, col) - self._win.addstr(i + 1, 1, line[:self.maxX - 3], col) + colour = self._get_color(i) + self._win.hline(i + 1, 1, ' ', self.maxX - 2, colour) + self._win.addstr(i + 1, 1, line[:self.maxX - 3], colour) else: break + self._win.refresh() if not resizing: - self._win.refresh() if self._select_playlist_error > -2: self.print_select_playlist_error() @@ -1051,13 +1048,12 @@ def _resize(self): self.startPos = 0 else: self._fix_startPos() - self.refresh_selection() def _get_color(self, i): col = curses.color_pair(5) if self._items[i + self.startPos] == self._orig_playlist: if i + self.startPos == self._selected_playlist_id: - col =curses.color_pair(9) + col = curses.color_pair(9) else: col = curses.color_pair(4) elif i + self.startPos == self._selected_playlist_id: @@ -1066,12 +1062,13 @@ def _get_color(self, i): def _format_line(self, i, pad): """ PyRadioSelectPlaylist format line """ - line = '{0}. {1}'.format(str(i + self.startPos + 1).rjust(pad), - self._items[i + self.startPos]) + line = '{0}. {1}'.format( + str(i + self.startPos + 1).rjust(pad), + self._items[i + self.startPos] + ) return line, pad def _read_items(self): - to_del = -1 self._items = [] self._items = glob.glob(path.join(self._config_path, '*.csv')) if len(self._items) > 0: @@ -1088,20 +1085,22 @@ def _read_items(self): return 0, -1 for i, an_item in enumerate(self._items): if self._include_registers: - self._items[i] = an_item.replace(self._registers_path + sep, '').replace('.csv', '').replace('register_', 'Register: ') + self._items[i] = an_item.replace(self._registers_path + sep, '').replace('.csv', '').replace('register_', 'Register: ') self._items[i] = self._items[i].replace(self._config_path + sep, '') - if self._items[i] == self._selected_playlist: - to_del = i else: self._items[i] = an_item.replace(self._config_path + sep, '').replace('.csv', '') - """ get already loaded playlist id """ - if not self._include_registers: + if self._include_registers: + """ Remove playlist in editor """ + try: + self._items.remove(self._playlist_in_editor) + except ValueError: + pass + else: + """ get already loaded playlist id """ for i, a_playlist in enumerate(self._items): if a_playlist ==self._selected_playlist: self._selected_playlist_id = i break - if to_del >= 0: - del self._items[to_del] self._max_len = cjklen(max(self._items, key=cjklen)) self._num_of_items = len(self._items) @@ -1144,7 +1143,7 @@ def _get_result(self): ret = self._items[self._selected_playlist_id].replace('Register: ', 'register_') ret = path.join(self._config_path, '.registers', ret + '.csv') else: - ret = path.join(self._config_path, self._items[self._selected_playlist_id], ret + '.csv') + ret = path.join(self._config_path, self._items[self._selected_playlist_id] + '.csv') if platform == 'win32': ret.replace('.registers', '_registers') return 0, ret @@ -1215,6 +1214,14 @@ def _fix_startPos(self): self.startPos = self._selected_playlist_id - int((self.maxY - 2) / 2) def keypress(self, char): + """ Return restlt from playlist selection window + + Results are: + -1, '' - Continue in window + 0, station title - selected station title (for config window) + 0, station path - selected station path (for paste window) + 1, '' - Cancel + """ if self._select_playlist_error == -1 or \ self._select_playlist_error == 0: self._error_win = None diff --git a/pyradio/player.py b/pyradio/player.py index 58b393bf..b00abf90 100644 --- a/pyradio/player.py +++ b/pyradio/player.py @@ -1011,8 +1011,7 @@ def _set_mpv_playback_is_on(self, stop): self.outputStream.write(msg=new_input, counter='') if self.oldUserInput['Title'] == '': self.oldUserInput['Input'] = new_input - else: - self.oldUserInput['Title'] = new_input + self.oldUserInput['Title'] = new_input self.playback_is_on = True if stop(): return False @@ -1107,12 +1106,17 @@ def play(self, name, streamUrl, encoding = ''): stdout=subprocess.DEVNULL, stdin=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - t = threading.Thread(target=self.updateMPVStatus, args=(lambda: self.stop_mpv_status_update_thread, )) + t = threading.Thread( + target=self.updateMPVStatus, + args=(lambda: self.stop_mpv_status_update_thread, ) + ) else: - self.process = subprocess.Popen(opts, shell=False, - stdout=subprocess.PIPE, - stdin=subprocess.PIPE, - stderr=subprocess.STDOUT) + self.process = subprocess.Popen( + opts, shell=False, + stdout=subprocess.PIPE, + stdin=subprocess.PIPE, + stderr=subprocess.STDOUT + ) t = threading.Thread(target=self.updateStatus, args=()) t.start() # start playback check timer thread @@ -1156,7 +1160,6 @@ def close(self): self._no_mute_on_stop_playback() # First close the subprocess - logger.error('DE self._stop()') self._stop() # Here is fallback solution and cleanup self.stop_timeout_counter_thread = True diff --git a/pyradio/radio.py b/pyradio/radio.py index f0abea0f..09899fda 100644 --- a/pyradio/radio.py +++ b/pyradio/radio.py @@ -219,7 +219,7 @@ def __init__(self, pyradio_config, play=False, req_player='', theme=''): self.ws.SELECT_ENCODING_MODE: self._redisplay_encoding_select_win_refresh_and_resize, self.ws.SELECT_STATION_ENCODING_MODE: self._redisplay_encoding_select_win_refresh_and_resize, self.ws.SELECT_PLAYLIST_MODE: self._playlist_select_win_refresh_and_resize, - self.ws.PASTE_MODE: self._playlist_select_win_refresh_and_resize, + self.ws.PASTE_MODE: self._playlist_select_paste_win_refresh_and_resize, self.ws.SELECT_STATION_MODE: self._redisplay_station_select_win_refresh_and_resize, self.ws.MAIN_HELP_MODE: self._show_main_help, self.ws.MAIN_HELP_MODE_PAGE_2: self._show_main_help_page_2, @@ -380,9 +380,17 @@ def setup(self, stdscr): else: git_info = git_description.split('-') if git_info[1] != '0': - self.info = " PyRadio {0}-r{1} ".format(version, git_info[1]) - if logger.isEnabledFor(logging.INFO): - logger.info("RyRadio built from git: https://github.com/coderholic/pyradio/commit/{0} (rev. {1})".format(git_info[-1], git_info[1])) + try: + if 'beta' in git_info[1] or 'rc' in git_info[1].lower(): + self.info = " Pyradio {1}-{1}".format(git_info[0], git_info[1]) + if logger.isEnabledFor(logging.INFO): + logger.info("RyRadio built from git: https://github.com/coderholic/pyradio/commit/{0} (rev. {1})".format(git_info[-1], git_info[2])) + else: + self.info = " PyRadio {0}-r{1} ".format(version, git_info[1]) + if logger.isEnabledFor(logging.INFO): + logger.info("RyRadio built from git: https://github.com/coderholic/pyradio/commit/{0} (rev. {1})".format(git_info[-1], git_info[1])) + except: + pass try: curses.curs_set(0) @@ -476,8 +484,10 @@ def initHead(self, info): rightStr = " www.coderholic.com/pyradio" rightStr = " https://github.com/coderholic/pyradio" try: - self.headWin.addstr(0, self.maxX - len(rightStr) -1, rightStr, - curses.color_pair(2)) + self.headWin.addstr( + 0, self.maxX - len(rightStr) -1, + rightStr, curses.color_pair(2) + ) except: pass try: @@ -612,14 +622,14 @@ def _print_body_header(self): if self._cnf.dirty_playlist: align += 1 w_header = '*' + self._cnf.station_title - while len(w_header)> self.bodyMaxX - 14: + while len(w_header) > self.bodyMaxX - 14: w_header = w_header[:-1] self.outerBodyWin.addstr( 0, int((self.bodyMaxX - len(w_header)) / 2) - align, '[', curses.color_pair(5)) - self.outerBodyWin.addstr(w_header,curses.color_pair(4)) - self.outerBodyWin.addstr(']',curses.color_pair(5)) + self.outerBodyWin.addstr(w_header, curses.color_pair(4)) + self.outerBodyWin.addstr(']', curses.color_pair(5)) elif cur_mode == self.ws.PLAYLIST_MODE or \ self.ws.operation_mode == self.ws.PLAYLIST_LOAD_ERROR_MODE or \ @@ -632,10 +642,10 @@ def _print_body_header(self): w_header = ' All registers are empty ' else: w_header = ' Select playlist to open ' - self.outerBodyWin.addstr(0, - int((self.bodyMaxX - len(w_header)) / 2), - w_header, - curses.color_pair(4)) + self.outerBodyWin.addstr( + 0, int((self.bodyMaxX - len(w_header)) / 2), + w_header, curses.color_pair(4) + ) def __displayBodyLine(self, lineNum, pad, station): col = curses.color_pair(5) @@ -948,7 +958,6 @@ def connectionFailed(self): def stopPlayer(self, show_message=True): """ stop player """ try: - logger.error('DE ---- self.player.close()') self.player.close() except: pass @@ -958,7 +967,11 @@ def stopPlayer(self, show_message=True): self._show_player_is_stopped() def _show_player_is_stopped(self): - self.log.write(msg='{}'.format(self._format_player_string()) + player_start_stop_token[1], help_msg=True, suffix=self._status_suffix, counter='') + self.log.write( + msg='{}'.format(self._format_player_string()) + + player_start_stop_token[1], + help_msg=True, suffix=self._status_suffix, counter='' + ) def removeStation(self): if self._cnf.confirm_station_deletion and not self._cnf.is_register: @@ -2438,6 +2451,7 @@ def _open_playlist(self): self.number_of_items, self.playing = self.readPlaylists() else: self.ws.close_window() + self._update_status_bar_right(status_suffix='') self._show_notification_with_delay( txt='____All registers are empty!!!____', mode_to_set=self.ws.NORMAL_MODE, @@ -2759,18 +2773,18 @@ def delay(secs, stop): def to_ver(this_version): a_v = this_version.replace('-', '.').lower() a_l = a_v.split('.') + while len(a_l) < 4: + a_l.append('0') a_n_l = [] for n in a_l: if 'beta' in n: - a_n_l.append(100+int(a_l[-1].replace('beta', ''))) + a_n_l.append(-200+int(a_l[-1].replace('beta', ''))) elif 'rc' in n: - a_n_l.append(200+int(a_l[-1].replace('rc', ''))) + a_n_l.append(-100+int(a_l[-1].replace('rc', ''))) elif 'r' in n: a_n_l.append(int(a_l[-1].replace('r', ''))) else: a_n_l.append(int(n)) - if len(a_n_l) < 4: - a_n_l.append(0) return a_n_l def clean_date_files(files, start=0): @@ -2823,13 +2837,12 @@ def to_time(secs): clean_date_files(files) a_date = path.split(path.splitext(files[0])[0])[1][1:] - d1 = datetime.now() d2 = datetime.strptime(a_date, '%Y-%m-%d') delta = (d1 - d2).days # PROGRAM DEBUG: Uncomment this to force check - #delta=check_days + delta=check_days if delta < check_days: clean_date_files(files) if logger.isEnabledFor(logging.INFO): @@ -2888,6 +2901,8 @@ def to_time(secs): #this_version='0.8.8-RC1' existing_version = to_ver(this_version) new_version = to_ver(last_tag) + if logger.isEnabledFor(logging.DEBUG): + logger.debug('current version = {0}, upstream version = {1}'.format(existing_version, new_version)) if existing_version < new_version: if stop(): if logger.isEnabledFor(logging.DEBUG): @@ -3164,22 +3179,16 @@ def _paste(self, playlist=''): # paste to playlist / register file if logger.isEnabledFor(logging.DEBUG): logger.debug('pasting to "{}"'.format(playlist)) - ret = self._cnf.paste_station_to_named_playlist(self._unnamed_register, playlist) + ret = self._cnf.paste_station_to_named_playlist( + self._unnamed_register, + playlist + ) if ret == 0: - self._show_notification_with_delay( - txt='___Station pasted!!!___', - mode_to_set=self.ws.operation_mode, - callback_function=self.refreshBody) + self._show_statiosn_pasted() else: - self._show_notification_with_delay(delay=1.5, - txt='___Paste failed...___', - mode_to_set=self.ws.operation_mode, - callback_function=self.refreshBody) + self._show_paste_failed() else: - self._show_notification_with_delay( - txt='___Nothing to paste!!!___', - mode_to_set=self.ws.operation_mode, - callback_function=self.refreshBody) + self._show_nothing_to_paste() def _fix_playlist_highlight_after_rename(self, old_file, new_file, copy_file, open_file): search = (old_file if copy_file else new_file, new_file) @@ -3216,8 +3225,10 @@ def keypress(self, char): self._do_display_notify() return - elif self.ws.operation_mode in (self.ws.NO_PLAYER_ERROR_MODE, \ - self.ws.CONFIG_SAVE_ERROR_MODE): + elif self.ws.operation_mode in ( + self.ws.NO_PLAYER_ERROR_MODE, + self.ws.CONFIG_SAVE_ERROR_MODE + ): """ if no player or config error, don't serve keyboard """ return @@ -3249,7 +3260,7 @@ def keypress(self, char): self.jumpnr = '' self._cnf.jump_tag = -1 return - elif (self._register_open_pressed \ + elif (self._register_open_pressed and self.ws.operation_mode == self.ws.NORMAL_MODE): if char == ord('?'): self._show_register_help() @@ -3338,7 +3349,21 @@ def keypress(self, char): self._update_status_bar_right(status_suffix='') if self.ws.operation_mode == self.ws.NORMAL_MODE: # paste to another playlist / register - self._print_not_implemented_yet() + if self._unnamed_register: + self.ws.operation_mode = self.ws.PASTE_MODE + self._playlist_select_win = None + self._playlist_select_win = PyRadioSelectPlaylist( + self.bodyWin, + self._cnf.stations_dir, + self._cnf.station_title, + include_registers=True + ) + self._playlist_select_win.init_window() + self._playlist_select_win.refresh_win() + self._playlist_select_win.setPlaylist(self._cnf.station_title) + else: + self._show_nothing_to_paste() + #self._print_not_implemented_yet() else: self._paste(playlist=self.stations[self.selection][-1]) @@ -3397,6 +3422,7 @@ def keypress(self, char): if glob.glob(path.join(self._cnf.registers_dir, '*.csv')): self._print_clear_all_registers() else: + self._update_status_bar_right(status_suffix='') self._show_notification_with_delay( txt='____All registers are empty!!!____', mode_to_set=self.ws.NORMAL_MODE, @@ -3573,9 +3599,11 @@ def keypress(self, char): """ Config > Select Default Playlist """ self.ws.operation_mode = self.ws.SELECT_PLAYLIST_MODE if self._playlist_select_win is None: - self._playlist_select_win = PyRadioSelectPlaylist(self.bodyWin, - self._cnf.stations_dir, - self._config_win._config_options['default_playlist'][1]) + self._playlist_select_win = PyRadioSelectPlaylist( + self.bodyWin, + self._cnf.stations_dir, + self._config_win._config_options['default_playlist'][1] + ) else: self._playlist_select_win._parent_maxY, self._playlist_select_win._parent_maxX = self.bodyWin.getmaxyx() self._playlist_select_win.init_window() @@ -3586,10 +3614,12 @@ def keypress(self, char): """ Config > Select Default Station """ self.ws.operation_mode = self.ws.SELECT_STATION_MODE if self._station_select_win is None: - self._station_select_win = PyRadioSelectStation(self.bodyWin, - self._cnf.stations_dir, - self._config_win._config_options['default_playlist'][1], - self._config_win._config_options['default_station'][1]) + self._station_select_win = PyRadioSelectStation( + self.bodyWin, + self._cnf.stations_dir, + self._config_win._config_options['default_playlist'][1], + self._config_win._config_options['default_station'][1] + ) else: self._station_select_win._parent_maxY, self._station_select_win._parent_maxX = self.outerBodyWin.getmaxyx() self._station_select_win.update_playlist_and_station(self._config_win._config_options['default_playlist'][1], self._config_win._config_options['default_station'][1]) @@ -3953,14 +3983,34 @@ def keypress(self, char): # """ error """ # self._print_foreign_playlist_copy_error() elif not char in (ord('#'), curses.KEY_RESIZE): - self.ws.close_window() - self.refreshBody() - # Do this here to properly resize - return + self.ws.close_window() + self.refreshBody() + # Do this here to properly resize + return elif self.ws.operation_mode == self.ws.PASTE_MODE: - self.ws.close_window() - self.refreshBody() + """ Return from station selection window for pasting """ + if char == ord('?'): + self._show_config_playlist_help() + else: + ret, a_playlist = self._playlist_select_win.keypress(char) + if ret == 1: + self._playlist_select_win = None + self.ws.close_window() + self.refreshBody() + elif ret == 0: + self._playlist_select_win = None + self.ws.close_window() + ret = self._cnf.paste_station_to_named_playlist( + self._unnamed_register, + a_playlist + ) + self.refreshBody() + if ret == 0: + self._show_statiosn_pasted() + else: + self._show_paste_failed() + self.refreshBody() return elif self.ws.operation_mode == self.ws.THEME_MODE and ( @@ -4744,7 +4794,7 @@ def keypress(self, char): self._random_requested = False if char in (curses.KEY_ENTER, ord('\n'), ord('\r'), - curses.KEY_RIGHT, ord('l')): + curses.KEY_RIGHT, ord('l')): self._update_status_bar_right(status_suffix='') if self._cnf.open_register_list: self.playlist_selections[self.ws.REGISTER_MODE] = [self.selection, self.startPos, self.playing] @@ -4766,16 +4816,13 @@ def keypress(self, char): self._print_playlist_load_error() if logger.isEnabledFor(logging.DEBUG): logger.debug('Error loading playlist: "{}"'.format(self.stations[self.selection][-1])) - return elif ret == -2: self.stations = self._cnf.playlists self._print_playlist_not_found_error() if logger.isEnabledFor(logging.DEBUG): logger.debug('Playlist not found: "{}"'.format(self.stations[self.selection][-1])) - return elif ret == -7: self._print_playlist_recovery_error() - return else: self._playlist_in_editor = playlist_to_try_to_open self._playlist_error_message = '' @@ -4797,7 +4844,6 @@ def keypress(self, char): self._put_selection_in_the_middle(force=True) self.refreshBody() self._do_display_notify() - return elif char in (ord('r'), ): self._update_status_bar_right() @@ -4831,13 +4877,34 @@ def keypress(self, char): else: self._status_suffix = '' self._register_open_pressed = False + self._update_status_bar_right(status_suffix='') self._show_notification_with_delay( txt='____All registers are empty!!!____', mode_to_set=self.ws.PLAYLIST_MODE, callback_function=self.refreshBody) self._update_status_bar_right(reg_open_pressed=self._register_open_pressed, status_suffix=self._status_suffix) self._do_display_notify() - return + + # else: + # self._update_status_bar_right(status_suffix='') + + def _show_statiosn_pasted(self): + self._show_notification_with_delay( + txt='___Station pasted!!!___', + mode_to_set=self.ws.operation_mode, + callback_function=self.refreshBody) + + def _show_nothing_to_paste(self): + self._show_notification_with_delay( + txt='___Nothing to paste!!!___', + mode_to_set=self.ws.operation_mode, + callback_function=self.refreshBody) + + def _show_paste_failed(self): + self._show_notification_with_delay(delay=1.5, + txt='___Paste failed...___', + mode_to_set=self.ws.operation_mode, + callback_function=self.refreshBody) def _rename_playlist_from_playlist_mode(self, copy, open_file, last_history): it = self._search_sublist_last_item(self._cnf.playlists, self.new_filename) @@ -5250,6 +5317,9 @@ def _redisplay_encoding_select_win_refresh_and_resize(self): if not self._config_win.too_small: self._encoding_select_win.refresh_and_resize(self.outerBodyMaxY, self.outerBodyMaxX) + def _playlist_select_paste_win_refresh_and_resize(self): + self._playlist_select_win.refresh_and_resize(self.bodyWin.getmaxyx()) + def _playlist_select_win_refresh_and_resize(self): if not self._config_win.too_small: self._playlist_select_win.refresh_and_resize(self.bodyWin.getmaxyx())