Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom player from env var #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eSoares
Copy link

@eSoares eSoares commented Nov 1, 2019

This adds support to easily define to the user a custom player without need to edit the scripts.
Not changing the scripts makes it easy to simple git pull to keep them updated.

@marmelo
Copy link
Owner

marmelo commented Dec 2, 2019

Hi @eSoares, sorry for the late response.

I understand the need to change the player.
But there are some arguments specific to mpv that may not work on other players.

That said, I suggest a simpler approach using Bash parameter expansion to set a player if an environment variable is not found. That requires the following simple change to the script:

PLAYER=${PLAYER:-mpv}

This way you can do:

PLAYER=mplayer ./radio.sh

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants