alexanderepstein / Bash-Snippets

A collection of small bash scripts for heavy terminal users

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ytview default player selection

webmastak opened this issue · comments

Manjaro Linux 64 Bit

You can add a configuration to ytview so that you can use the default player that the user wants?

What not to do dirty hack:
My mpv player

getConfiguredPlayer()
{
  if [[ $(uname -s) == "Linux" ]]; then
    if command -v mpv &>/dev/null; then
      player="mpv"
    elif command -v vlc &>/dev/null; then
      player="vlc"
    elif command -v mplayer &>/dev/null; then
      player="mplayer"
    else

We can check for an environment variable to be set, if its not set we run down this list in the same order, if it is set we attempt to use that player.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

commented

This issue has been automatically closed because it has been inactive for 30 days.

This was just added to Version 1.23.0!