You've already forked RadioPlayer
mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-02-27 06:03:52 +01:00
better space usage
This commit is contained in:
@@ -471,11 +471,11 @@ class DisplayManager:
|
|||||||
"""Draw the files list, optimized to only redraw when necessary."""
|
"""Draw the files list, optimized to only redraw when necessary."""
|
||||||
if not state: raise Exception
|
if not state: raise Exception
|
||||||
header_height = self.get_header_height()
|
header_height = self.get_header_height()
|
||||||
content_start_row = header_height + 5
|
content_start_row = header_height + 6
|
||||||
available_lines = term_height - content_start_row
|
available_lines = term_height - content_start_row
|
||||||
|
|
||||||
start_idx = scroll_offset
|
start_idx = scroll_offset
|
||||||
end_idx = min(start_idx + available_lines, len(file_items))
|
end_idx = min(start_idx + available_lines, len(file_items)) + 1
|
||||||
|
|
||||||
# Create a snapshot of the current state to compare against the last one
|
# Create a snapshot of the current state to compare against the last one
|
||||||
files_display_state = (
|
files_display_state = (
|
||||||
@@ -487,7 +487,7 @@ class DisplayManager:
|
|||||||
if force_redraw or state.last_files_display != files_display_state:
|
if force_redraw or state.last_files_display != files_display_state:
|
||||||
|
|
||||||
# Position info line
|
# Position info line
|
||||||
position_row = header_height + 4
|
position_row = header_height + 5
|
||||||
self.terminal.move_cursor(position_row)
|
self.terminal.move_cursor(position_row)
|
||||||
self.terminal.clear_line()
|
self.terminal.clear_line()
|
||||||
|
|
||||||
@@ -918,4 +918,4 @@ def main():
|
|||||||
|
|
||||||
config = Config(custom_playlist_file=args.playlist)
|
config = Config(custom_playlist_file=args.playlist)
|
||||||
app = Application(config)
|
app = Application(config)
|
||||||
exit(app.run())
|
exit(app.run())
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
rm /usr/local/bin/radioPlayer
|
|
||||||
rm /usr/local/bin/radioPlaylist
|
|
||||||
Reference in New Issue
Block a user