jeff-hughes/shellcaster

It says a podcast is downloaded but I can't find it on disk? Also not playing anything for me…

Closed this issue · 2 comments

I'm trying Planet Money podcast from NPR & this is the feed URL https://feeds.npr.org/510289/podcast.xml

You can see that I have two downloaded episodes

Screenshot 2020-10-07 at 11 36 41

When I try to play it says "Error: Could not play file. Check configuration." & here is my configuration. But I'm also trying to locate the episode on disk to test the mpv %s command which should work but if I do ls $XDG_DATA_HOME/ there is no shellcaster folder there… I found it under ~/Library/Application Support/shellcaster, which makes me wonder why it's not respecting my config?

# Shellcaster settings
# --------------------

# Specifies where podcast episodes that are downloaded will be stored.
# Defaults:
# $XDG_DATA_HOME/shellcaster/ or $HOME/.local/share/shellcaster/ on Linux
# $HOME/Library/Application Support/shellcaster/ on Mac
# C:\Users\<User>\AppData\Local\shellcaster\ on Windows

download_path = "/Users/ahmed/.local/share/shellcaster/"


# Command to use to play episodes. Use "%s" to indicate where file/URL
# will be entered to the command.
# Default: vlc %s

play_command = "mpv %s"


# Maximum number of files to download simultaneously. Setting this too
# high could result in network requests being denied. A good general
# guide would be to set this to the number of processor cores on your
# computer.
# Default: 3

#simultaneous_downloads = 3


# Maximum number of times to retry connecting to a URL to sync a
# podcast or download an episode.
# Default: 3

#max_retries = 3


[keybindings]

# Keybindings must be an array of one or more strings.
# If you want to distinguish between a regular alphanumeric key
# and Shift+key, you can use the capital letter that you would normally
# type when pressing Shift+key (e.g., Shift+"r" will give you "R").

# Other special characters and their config string:
# Arrow keys: "Left", "Right", "Up", "Down"
# Ctrl+key: "C-key" (e.g., "C-r" means Ctrl+"r")
# Shift+key: "S-key" (e.g., "S-Del" means Shift+Delete)
# Insert ("Ins"), Delete ("Del"), Home ("Home"), End ("End"),
# Page up ("PgUp"), Page down ("PgDn"), Tab ("Tab")
# Enter ("Enter"), Escape ("Esc") -- be aware that on some terminals the
# Escape key waits for further input before passing it along to
# shellcaster, so you might notice a delay with this key

# Don't try to use backslash, or you're gonna have a bad time

left = [ "Left", "h" ]
right = [ "Right", "l" ]
up = [ "Up", "k" ]
down = [ "Down", "j" ]

add_feed = [ "a" ]
sync = [ "s" ]
sync_all = [ "S" ]

play = [ "Enter", "p" ]
mark_played = [ "m" ]
mark_all_played = [ "M" ]

download = [ "d" ]
download_all = [ "D" ]
delete = [ "x" ]
delete_all = [ "X" ]
remove = [ "r" ]
remove_all = [ "R" ]

quit = [ "q" ]

Hmm, so if I'm understanding correctly, the download path in your config is set to /Users/ahmed/.local/share/shellcaster/, but when you download a file it gets put in ~/Library/Application Support/shellcaster. But then when you go to play the file, it can't play it. Is that correct? And just guessing from the paths, it sounds like you're on a Mac?

Honestly, based on what you're describing it sounds like it's not finding the config at all and just falling back on the default options. Where did you put your config file? Please note that on a Mac, the default location it's looking for it is in ~/Library/Preferences/shellcaster/config.toml (although to be frank, I don't have a Mac, so this has not been extensively tested). If you want to put your config file elsewhere, this needs to be communicated to the program when you start it up, via shellcaster -c /path/to/config.toml. If that's what you have done, then there would seem to be a bug, because it should be giving you a hard failure if you've passed a path to it and it can't read from that file for whatever reason.

Honestly, based on what you're describing it sounds like it's not finding the config at all and just falling back on the default options. Where did you put your config file? Please note that on a Mac, the default location it's looking for it is in ~/Library/Preferences/shellcaster/config.toml

That was the problem, I was expecting it to look inside $XDG_CONFIG_HOME/shellcaster/config.toml then fallback to ~/.config/shellcaster/config.toml but having ~/Library/Preferences/shellcaster/config.toml as a default is a surprise for me to be honest. I understand that these folders are supposed to the equivalent of $XDG_CONFIG_HOME & stuff on Mac, but I have barely used a CLI tool that actually puts config there & I guess that's why I confused & assumed something else.