xgi / castero

TUI podcast client for the terminal
MIT License
616 stars 37 forks source link

Crashes after changing keyboard config #118

Closed Knapptr closed 4 years ago

Knapptr commented 4 years ago

I edited the castero.conf to use VI keys- but now when I play an episode and pause, I can not play again- and castero freezes - no keys seem to do anything at that point.

It will also crash if I press play/pause without an episode playing.

Below is my edited .conf.

# https://github.com/xgi/castero

[client]
# Whether to ask for confirmation before deleting a feed.
# default: False
delete_feed_confirmation = True

# The minimum number of feeds before the client asks you for confirmation
# after pressing the reload key.
# default: 10
reload_feeds_threshold = 10

# The maximum number of episodes to retain per feed. Set to -1 for no limit.
# default: -1
max_episodes = -1

# Whether to keep episodes in the client even if they are no longer present on
# the feed (i.e. the RSS feed only shows the x most recent episodes).
# default: False
retain_absent_episodes = False

# Hide vertical borders between menus.
# default: False
disable_vertical_borders = False

# Whether to remove HTML tags from feed/episode descriptions.
# default: True
clean_html_descriptions = True

# Whether to right-align the current episode time/duration.
# default: False
right_align_time = False

# The display refresh delay, in ms. Lower for better responsiveness but higher
# CPU usage.
# default: 70
refresh_delay = 70

# The external player to use for media playback.
# If the given player is not valid or a dependency is not met, the client will
# instead try to use the first valid interface.
# Available players (in order of precedence):
# mpv, vlc
# default: (blank)
player = mpv

# The command to run when you press key_execute (default e). All instances of
# the following tokens are replaced with the corresponding episode attributes:
#   {file} - the episode enclosure, usually a remote mp3 file
#   {title} - the episode name
#   {description} - the episode description
#   {link} - the link to the episode, which is often a blog post 
#   {pubdate} - the publish date/time of the episode
#   {copyright} - the copyright of the episode
# Most of these attributes have spaces, so you will probably want to enclose
# the token with quotations.
# For example, `firefox "{file}"` would open the file in Firefox.
# The client executes the text you enter as a shell command. Use with caution!
# default: (blank)
execute_command =

[feeds]
# Whether to reload/refresh your feeds when the client starts. Depending on how
# many feeds you have, this operation may take a long time.
# default: False
reload_on_start = False

[downloads]
# The (absolute) location to save episodes downloaded for offline playback. Set
# to blank or whitespaces to disable -- the client will default to either
# $XDG_DATA_DIR, if set, otherwise ~/.local/share/castero/downloaded
# default: (blank)
custom_download_dir = ~/podcasts

# The timeout for network requests, in seconds. The same value is used for
# connection and read timeouts.
# default: 3
request_timeout = 3

[colors]
# Available colors for all fields are:
# black, blue, cyan, green, magenta, red, white, yellow, transparent (background),
# integer from -1 to 255 if terminal supports 256 colors
# NOTE:  Background transparency only works on compatible terminals with compositing

# The foreground (text) color of the main interface.
# default: yellow
color_foreground = yellow

# The background color of the main interface.
# default: black
color_background = black

# The foreground (text) color of selected items.
# default: black
color_foreground_alt = black

# The background color of selected items.
# default: white
color_background_alt = white

# The foreground (text) color of marked items. Paired with color_background.
# default: green
color_foreground_dim = green

# The foreground (text) color of status lines. Paired with color_background.
# default: white
color_foreground_status = white

# The foreground (text) color of menu headings. Paired with color_background.
# default: yellow
color_foreground_heading = yellow

# The foreground (text) color of dividers. Paired with color_background.
# default: white
color_foreground_dividers = white

[playback]
# The distance to move forward when pressing seek keys, in seconds.
# default: 30
seek_distance_forward = 30

# The distance to move backward when pressing seek keys, in seconds.
# default: 10
seek_distance_backward = 10

# The default playback speed. See also the rate_increase/rate_decrease keys.
# default: 1.0
default_playback_speed = 1.0

[keys]
# Keybindings for controlling the client. Entries may not be blank, but may
# overlap -- however, only one operation will be performed for each key press.
# Please see this page for a list of available key names:
# https://docs.python.org/3/library/curses.html#constants

# Show the help menu.
# default: h
key_help = H

# Exit the client
# default: q
key_exit = Q

# Add a feed.
# default: a
key_add_feed = a

# Delete the selected feed.
# default: d
key_delete = d

# Reload/refresh feeds.
# default: r
key_reload = r

# Save episode for offline playback.
# default: s
key_save = s

# Navigate up.
# default: UP
key_up = k

# Navigate right.
# default: RIGHT
key_right = l

# Navigate down.
# default: DOWN
key_down = j

# Navigate left.
# default: LEFT
key_left = h

# Scroll menu up.
# default: PPAGE
key_scroll_up = PPAGE

# Scroll menu down.
# default: NPAGE
key_scroll_down = NPAGE

# Play selected feed/episode.
# default: ENTER
key_play_selected = ENTER

# Add selected feed/episode to queue.
# default: SPACE
key_add_selected = q

# Clear the queue.
# default: c
key_clear = c

# Go to the next episode in the queue.
# default: n
key_next = n

# Execute a command on the selected episode. See also execute_command.
key_execute = e

# Invert the order of the menu.
# default: i
key_invert = i

# Filter the contents of the menu. Press again to clear the filter.
# default: /
key_filter = /

# Mark the episode as played/unplayed.
# default: i
key_mark_played = m

# Pause/play the current episode.
# default: p
key_pause_play = space

# Alternate binding for key_pause_play -- make identical to disable.
# default: k
key_pause_play_alt = p

# Seek forward.
# default: f
key_seek_forward = period

# Alternate binding for key_seek_forward -- make identical to disable.
# default: l
key_seek_forward_alt = period

# Seek backward.
# default: b
key_seek_backward = comma

# Alternate binding for key_seek_backward -- make identical to disable.
# default: j
key_seek_backward_alt = comma

# Increase playback speed.
# default: ]
key_rate_increase = ]

# Decrease playback speed.
# default: [
key_rate_decrease = [

# Show episode URL.
# default: u
buck10 commented 4 years ago

Confirmed that castero crashes if using the config shown above, but I think that there are incorrect definitions in that file. Try using:

SPACE instead of space . instead of period , instead of comma

Making those changes made it work for me.

Knapptr commented 4 years ago

You're TOTALLY right! Thank you!