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

Any way to select audio device through pyradio? #118

Closed
hmm3 opened this issue Dec 17, 2020 · 9 comments
Closed

Any way to select audio device through pyradio? #118

hmm3 opened this issue Dec 17, 2020 · 9 comments

Comments

@hmm3
Copy link

hmm3 commented Dec 17, 2020

I know I can try setting the audio device through e.g. mpv's config file, but because I sometimes use a usb dac, I would like to be able to simply be able to choose which audio device I want mpv to use when running pyradio.

E.g. pyradio -u "mpv --audio-device='alsa/front:CARD=Audio,DEV=0'"

Thanks.

@s-n-g
Copy link
Collaborator

s-n-g commented Dec 17, 2020

hi @hmm3

I suppose this could be done.

I'm thinking about redesigning the "player selection" config window, adding the possibolity to pass command line parameters and have them saved in PyRadio's config file. We could even have a list of "profiles" that could be enabled or disabled as desired.

In fact, the more I think about it, the more I like the idea!

The only problem is that the user would be able to render the player unusable (if incorrect command line parameters are used).

What do you think about it?

@hmm3
Copy link
Author

hmm3 commented Dec 18, 2020

I think the solution is perfect. I also assume anyone who is using pyradio is also sophisticated enough that they could fix any issues with misconfigurations, and for those who aren't, having a default config file that they can fall back on should be good enough.

@s-n-g
Copy link
Collaborator

s-n-g commented Dec 18, 2020

Glad we agree!

ok, I'm putting this one on my TODO list...

@s-n-g
Copy link
Collaborator

s-n-g commented Dec 26, 2020

I started working on this one and I would like you to test it, if you don't mind

So, I decided to have a command line parameter to pass "extra player parameters" (implemented) and have the player selection as well (not implemented yet).

So here's what you do

git clone https://github.com/coderholic/pyradio.git
git fetch hmm3
git checkout hmm3
devel/build_install_pyradio

Then execute pyradio as so:

pyradio -epp "mpv:--audio-device='alsa/front:CARD=Audio,DEV=0'"

This should use your usb dac.

If it does not, or if anything goes wrong, please do execute:

pyradio -d -epp "mpv:--audio-device='alsa/front:CARD=Audio,DEV=0'"

and post ~/pyradio.log

If you want to see what command pyradio uses, search for pyradio.player - INFO - Executing command: in ~/pyradio.log

@hmm3
Copy link
Author

hmm3 commented Dec 29, 2020

Hi. Sorry didn't notice the update.

I tried to git clone, etc. but the git fetch hmm3 returns the error "fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)." I don't know much how git works, so perhaps I don't have something set up correctly.

Anyways. I just checked which files you modified and then modified the edits directly into my installed .local version. It looks like pyradio -epp "mpv:--audio-device='alsa/front:CARD=Audio,DEV=0'" is working with no problems!

Thanks.

@hmm3
Copy link
Author

hmm3 commented Dec 29, 2020

Actually it looks like I spoke too soon. I forgot that I had edited the files to use a profile under the mpv config file, earlier, and was simply switching between mpv and vlc as a player to switch devices. After I did a reinstall of pyradio, and edited the files, it didn't work. Music still plays through my laptop speakers rather than through my usb dac. I used htop, and it looks like the extra parameters aren't being used by mpv.

Here's the debug file

2020-12-29 02:40:31,133 - pyradio.radio - ERROR - DE ==========
2020-12-29 02:40:31,133 - pyradio.radio - ERROR - DE ===> begining...
2020-12-29 02:40:31,133 - pyradio.radio - ERROR - DE NORMAL_MODE: 0, 0, -1
2020-12-29 02:40:31,133 - pyradio.radio - ERROR - DE PLAYLIST_MODE: 0, 0, 0
2020-12-29 02:40:31,133 - pyradio.radio - ERROR - DE REGISTER_MODE: 0, 0, -1
2020-12-29 02:40:31,133 - pyradio.radio - ERROR - DE
2020-12-29 02:40:31,133 - pyradio.radio - ERROR - DE p NORMAL_MODE: 0, 0, -1
2020-12-29 02:40:31,133 - pyradio.radio - ERROR - DE p PLAYLIST_MODE: 0, 0, -1
2020-12-29 02:40:31,134 - pyradio.radio - ERROR - DE p REGISTER_MODE: 0, 0, -1
2020-12-29 02:40:31,134 - pyradio.radio - INFO - <<<===--- Program start ---===>>>
2020-12-29 02:40:31,135 - pyradio.radio - INFO - TUI initialization on python v. 3.9.1 (default, Dec 13 2020, 11:55:53) [GCC 10.2.0] on Linux
2020-12-29 02:40:31,135 - pyradio.radio - INFO - Terminal supports 256 colors
2020-12-29 02:40:31,135 - pyradio.themes - DEBUG - _do_init_pairs: {'Stations': [7, 0], 'Status Bar': [0, 2], 'Normal Cursor': [0, 5], 'Active Cursor': [0, 2], 'Active Station': [2, 0], 'PyRadio URL': [4, 0], 'Messages Border': [3, 0], 'Edit Cursor': [7, 5], 'Colors': 8, 'Name': 'dark', 'Path': ''}
2020-12-29 02:40:31,135 - pyradio.player - INFO - Probing available multimedia players...
2020-12-29 02:40:31,135 - pyradio.player - INFO - Implemented players: mpv, mplayer, cvlc
2020-12-29 02:40:31,138 - pyradio.player - INFO - <class 'pyradio.player.MpvPlayer'> supported.
2020-12-29 02:40:31,139 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 02:40:31,140 - pyradio.log - DEBUG - Suffix: None
2020-12-29 02:40:31,140 - pyradio.log - DEBUG - Counter: None
2020-12-29 02:40:31,140 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 02:40:31,141 - pyradio.radio - ERROR - DE ===== _put:startPos -> 0, force = False
2020-12-29 02:40:31,143 - pyradio.radio - DEBUG - SetConsoleCtrlHandler: Handler for signal SIGHUP registered
2020-12-29 02:40:31,143 - pyradio.radio - DEBUG - SetConsoleCtrlHandler: Handler for signal SIGTERM registered
2020-12-29 02:40:31,143 - pyradio.radio - DEBUG - SetConsoleCtrlHandler: Failed to register handler for signal SIGKIL
2020-12-29 02:40:31,143 - pyradio.radio - INFO - detectUpdateThread: Starting...
2020-12-29 02:40:31,144 - pyradio.radio - INFO - detectUpdateThread: Will check in 26 seconds
2020-12-29 02:40:31,144 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 02:40:31,144 - pyradio.log - DEBUG - Suffix: None
2020-12-29 02:40:31,144 - pyradio.log - DEBUG - Counter: None
2020-12-29 02:40:31,144 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 02:40:32,084 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 02:40:32,084 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:32,084 - pyradio.log - DEBUG - Counter: None
2020-12-29 02:40:32,084 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 02:40:32,084 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 02:40:32,085 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:32,085 - pyradio.log - DEBUG - Counter: None
2020-12-29 02:40:32,085 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 02:40:32,085 - pyradio.log - DEBUG - Status: "Initialization: "SceneSat (Sweden)""
2020-12-29 02:40:32,085 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:32,085 - pyradio.log - DEBUG - Counter: None
2020-12-29 02:40:32,086 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:32,099 - pyradio.log - DEBUG - Status: "Station: "SceneSat (Sweden)" - Opening connection..."
2020-12-29 02:40:32,099 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:32,099 - pyradio.log - DEBUG - Counter:
2020-12-29 02:40:32,100 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:32,100 - pyradio.player - INFO - Selected Station: "SceneSat (Sweden)"
2020-12-29 02:40:32,240 - pyradio.player - DEBUG - --input-ipc-server is supported.
2020-12-29 02:40:32,241 - pyradio.player - DEBUG - using profile [pyradio]
2020-12-29 02:40:32,243 - pyradio.player - INFO - MPV updateStatus thread started.
2020-12-29 02:40:32,244 - pyradio.player - ERROR - playback detection thread started
2020-12-29 02:40:32,244 - pyradio.player - INFO - Player started
2020-12-29 02:40:33,217 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:33,217 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:33,217 - pyradio.log - DEBUG - Counter:
2020-12-29 02:40:33,218 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:36,105 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:36,106 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:36,106 - pyradio.log - DEBUG - Counter:
2020-12-29 02:40:36,106 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:36,107 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:36,107 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:36,107 - pyradio.log - DEBUG - Counter: 7
2020-12-29 02:40:36,108 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:37,070 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:37,070 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:37,070 - pyradio.log - DEBUG - Counter: 7
2020-12-29 02:40:37,071 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:37,071 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:37,071 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:37,071 - pyradio.log - DEBUG - Counter: 6
2020-12-29 02:40:37,071 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:38,034 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:38,034 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:38,034 - pyradio.log - DEBUG - Counter: 6
2020-12-29 02:40:38,034 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:38,034 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:38,034 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:38,035 - pyradio.log - DEBUG - Counter: 5
2020-12-29 02:40:38,035 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:38,997 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:38,997 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:38,998 - pyradio.log - DEBUG - Counter: 5
2020-12-29 02:40:38,998 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:38,998 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:38,998 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:38,999 - pyradio.log - DEBUG - Counter: 4
2020-12-29 02:40:38,999 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:39,962 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:39,962 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:39,963 - pyradio.log - DEBUG - Counter: 4
2020-12-29 02:40:39,963 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:39,963 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:39,964 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:39,964 - pyradio.log - DEBUG - Counter: 3
2020-12-29 02:40:39,964 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:40,927 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:40,928 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:40,928 - pyradio.log - DEBUG - Counter: 3
2020-12-29 02:40:40,928 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:40,928 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:40,929 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:40,929 - pyradio.log - DEBUG - Counter: 2
2020-12-29 02:40:40,929 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:41,892 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:41,892 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:41,893 - pyradio.log - DEBUG - Counter: 2
2020-12-29 02:40:41,893 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:41,893 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:41,894 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:41,894 - pyradio.log - DEBUG - Counter: 1
2020-12-29 02:40:41,894 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:42,857 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:42,857 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:42,857 - pyradio.log - DEBUG - Counter: 1
2020-12-29 02:40:42,857 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:42,857 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 02:40:42,857 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:42,857 - pyradio.log - DEBUG - Counter: None
2020-12-29 02:40:42,857 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:42,866 - pyradio.radio - INFO - *** Start of playback NOT detected!!! ***
2020-12-29 02:40:42,866 - pyradio.log - DEBUG - Status: "Failed to connect to: "SceneSat (Sweden)""
2020-12-29 02:40:42,867 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:40:42,867 - pyradio.log - DEBUG - Counter: None
2020-12-29 02:40:42,867 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:40:43,026 - pyradio.player - INFO - MPV updateStatus thread stopped (no connection to socket).
2020-12-29 02:40:57,191 - pyradio.radio - INFO - detectUpdateThread: Will check again in 10 days...
2020-12-29 02:41:18,937 - pyradio.log - DEBUG - Status: "Failed to connect to: "SceneSat (Sweden)""
2020-12-29 02:41:18,937 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:41:18,938 - pyradio.log - DEBUG - Counter: None
2020-12-29 02:41:18,938 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:41:18,938 - pyradio.log - DEBUG - Status: "Failed to connect to: "SceneSat (Sweden)""
2020-12-29 02:41:18,938 - pyradio.log - DEBUG - Suffix:
2020-12-29 02:41:18,938 - pyradio.log - DEBUG - Counter: None
2020-12-29 02:41:18,939 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 02:41:18,952 - pyradio.config - INFO - Config not saved (not modified)
2020-12-29 02:41:18,952 - pyradio.config - INFO - Lock file removed...
2020-12-29 03:01:42,059 - pyradio.radio - ERROR - DE ==========
2020-12-29 03:01:42,059 - pyradio.radio - ERROR - DE ===> begining...
2020-12-29 03:01:42,059 - pyradio.radio - ERROR - DE NORMAL_MODE: 0, 0, -1
2020-12-29 03:01:42,060 - pyradio.radio - ERROR - DE PLAYLIST_MODE: 0, 0, 0
2020-12-29 03:01:42,060 - pyradio.radio - ERROR - DE REGISTER_MODE: 0, 0, -1
2020-12-29 03:01:42,060 - pyradio.radio - ERROR - DE
2020-12-29 03:01:42,060 - pyradio.radio - ERROR - DE p NORMAL_MODE: 0, 0, -1
2020-12-29 03:01:42,060 - pyradio.radio - ERROR - DE p PLAYLIST_MODE: 0, 0, -1
2020-12-29 03:01:42,060 - pyradio.radio - ERROR - DE p REGISTER_MODE: 0, 0, -1
2020-12-29 03:01:42,062 - pyradio.radio - INFO - <<<===--- Program start ---===>>>
2020-12-29 03:01:42,062 - pyradio.radio - INFO - TUI initialization on python v. 3.9.1 (default, Dec 13 2020, 11:55:53) [GCC 10.2.0] on Linux
2020-12-29 03:01:42,062 - pyradio.radio - INFO - Terminal supports 256 colors
2020-12-29 03:01:42,062 - pyradio.themes - DEBUG - _do_init_pairs: {'Stations': [7, 0], 'Status Bar': [0, 2], 'Normal Cursor': [0, 5], 'Active Cursor': [0, 2], 'Active Station': [2, 0], 'PyRadio URL': [4, 0], 'Messages Border': [3, 0], 'Edit Cursor': [7, 5], 'Colors': 8, 'Name': 'dark', 'Path': ''}
2020-12-29 03:01:42,062 - pyradio.player - INFO - Probing available multimedia players...
2020-12-29 03:01:42,063 - pyradio.player - INFO - Implemented players: mpv, mplayer, cvlc
2020-12-29 03:01:42,065 - pyradio.player - INFO - <class 'pyradio.player.MpvPlayer'> supported.
2020-12-29 03:01:42,067 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 03:01:42,067 - pyradio.log - DEBUG - Suffix: None
2020-12-29 03:01:42,067 - pyradio.log - DEBUG - Counter: None
2020-12-29 03:01:42,068 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 03:01:42,068 - pyradio.radio - ERROR - DE ===== _put:startPos -> 0, force = False
2020-12-29 03:01:42,074 - pyradio.radio - DEBUG - SetConsoleCtrlHandler: Handler for signal SIGHUP registered
2020-12-29 03:01:42,075 - pyradio.radio - DEBUG - SetConsoleCtrlHandler: Handler for signal SIGTERM registered
2020-12-29 03:01:42,075 - pyradio.radio - DEBUG - SetConsoleCtrlHandler: Failed to register handler for signal SIGKIL
2020-12-29 03:01:42,076 - pyradio.radio - INFO - detectUpdateThread: Starting...
2020-12-29 03:01:42,076 - pyradio.radio - INFO - detectUpdateThread: Will check in 29 seconds
2020-12-29 03:01:42,076 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 03:01:42,076 - pyradio.log - DEBUG - Suffix: None
2020-12-29 03:01:42,076 - pyradio.log - DEBUG - Counter: None
2020-12-29 03:01:42,076 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 03:01:43,266 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 03:01:43,267 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:01:43,267 - pyradio.log - DEBUG - Counter: None
2020-12-29 03:01:43,267 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 03:01:43,267 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 03:01:43,267 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:01:43,268 - pyradio.log - DEBUG - Counter: None
2020-12-29 03:01:43,268 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 03:01:43,268 - pyradio.log - DEBUG - Status: "Initialization: "SceneSat (Sweden)""
2020-12-29 03:01:43,268 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:01:43,268 - pyradio.log - DEBUG - Counter: None
2020-12-29 03:01:43,268 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:01:43,282 - pyradio.log - DEBUG - Status: "Station: "SceneSat (Sweden)" - Opening connection..."
2020-12-29 03:01:43,282 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:01:43,282 - pyradio.log - DEBUG - Counter:
2020-12-29 03:01:43,282 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:01:43,283 - pyradio.player - INFO - Selected Station: "SceneSat (Sweden)"
2020-12-29 03:01:43,444 - pyradio.player - DEBUG - --input-ipc-server is supported.
2020-12-29 03:01:43,449 - pyradio.player - INFO - MPV updateStatus thread started.
2020-12-29 03:01:43,457 - pyradio.player - ERROR - playback detection thread started
2020-12-29 03:01:43,457 - pyradio.player - INFO - Player started
2020-12-29 03:01:44,419 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 03:01:44,419 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:01:44,420 - pyradio.log - DEBUG - Counter:
2020-12-29 03:01:44,420 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:01:45,142 - pyradio.player - INFO - *** _set_mpv_playback_is_on(): Start of playback detected ***
2020-12-29 03:01:45,142 - pyradio.log - DEBUG - Status: "Playing: "SceneSat (Sweden)""
2020-12-29 03:01:45,142 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:01:45,142 - pyradio.log - DEBUG - Counter:
2020-12-29 03:01:45,143 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:01:45,143 - pyradio.log - DEBUG - Status: "Title: AcidBlock - Training (Kicks with a punch Remix)"
2020-12-29 03:01:45,143 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:01:45,143 - pyradio.log - DEBUG - Counter:
2020-12-29 03:01:45,143 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:01:45,143 - pyradio.log - DEBUG - Status: "Title: AcidBlock - Training (Kicks with a punch Remix)"
2020-12-29 03:01:45,144 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:01:45,144 - pyradio.log - DEBUG - Counter:
2020-12-29 03:01:45,144 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:01:45,144 - pyradio.log - DEBUG - Status: "Title: AcidBlock - Training (Kicks with a punch Remix)"
2020-12-29 03:01:45,144 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:01:45,144 - pyradio.log - DEBUG - Counter:
2020-12-29 03:01:45,144 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:11,113 - pyradio.radio - INFO - detectUpdateThread: Will check again in 10 days...
2020-12-29 03:02:34,778 - pyradio.log - DEBUG - Status: "Title: AcidBlock - Training (Kicks with a punch Remix)"
2020-12-29 03:02:34,778 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:34,778 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:34,778 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:34,779 - pyradio.log - DEBUG - Status: "Title: AcidBlock - Training (Kicks with a punch Remix)"
2020-12-29 03:02:34,779 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:34,779 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:34,779 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:34,782 - pyradio.player - INFO - MPV updateStatus thread stopped.
2020-12-29 03:02:34,831 - pyradio.config - INFO - Config not saved (not modified)
2020-12-29 03:02:34,832 - pyradio.config - INFO - Lock file removed...
2020-12-29 03:02:43,408 - pyradio.radio - ERROR - DE ==========
2020-12-29 03:02:43,408 - pyradio.radio - ERROR - DE ===> begining...
2020-12-29 03:02:43,408 - pyradio.radio - ERROR - DE NORMAL_MODE: 0, 0, -1
2020-12-29 03:02:43,409 - pyradio.radio - ERROR - DE PLAYLIST_MODE: 0, 0, 0
2020-12-29 03:02:43,409 - pyradio.radio - ERROR - DE REGISTER_MODE: 0, 0, -1
2020-12-29 03:02:43,409 - pyradio.radio - ERROR - DE
2020-12-29 03:02:43,409 - pyradio.radio - ERROR - DE p NORMAL_MODE: 0, 0, -1
2020-12-29 03:02:43,409 - pyradio.radio - ERROR - DE p PLAYLIST_MODE: 0, 0, -1
2020-12-29 03:02:43,409 - pyradio.radio - ERROR - DE p REGISTER_MODE: 0, 0, -1
2020-12-29 03:02:43,411 - pyradio.radio - INFO - <<<===--- Program start ---===>>>
2020-12-29 03:02:43,411 - pyradio.radio - INFO - TUI initialization on python v. 3.9.1 (default, Dec 13 2020, 11:55:53) [GCC 10.2.0] on Linux
2020-12-29 03:02:43,411 - pyradio.radio - INFO - Terminal supports 256 colors
2020-12-29 03:02:43,411 - pyradio.themes - DEBUG - _do_init_pairs: {'Stations': [7, 0], 'Status Bar': [0, 2], 'Normal Cursor': [0, 5], 'Active Cursor': [0, 2], 'Active Station': [2, 0], 'PyRadio URL': [4, 0], 'Messages Border': [3, 0], 'Edit Cursor': [7, 5], 'Colors': 8, 'Name': 'dark', 'Path': ''}
2020-12-29 03:02:43,411 - pyradio.player - INFO - Probing available multimedia players...
2020-12-29 03:02:43,412 - pyradio.player - INFO - Implemented players: mpv, mplayer, cvlc
2020-12-29 03:02:43,414 - pyradio.player - INFO - <class 'pyradio.player.MpvPlayer'> supported.
2020-12-29 03:02:43,416 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 03:02:43,416 - pyradio.log - DEBUG - Suffix: None
2020-12-29 03:02:43,416 - pyradio.log - DEBUG - Counter: None
2020-12-29 03:02:43,417 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 03:02:43,417 - pyradio.radio - ERROR - DE ===== _put:startPos -> 0, force = False
2020-12-29 03:02:43,423 - pyradio.radio - DEBUG - SetConsoleCtrlHandler: Handler for signal SIGHUP registered
2020-12-29 03:02:43,423 - pyradio.radio - DEBUG - SetConsoleCtrlHandler: Handler for signal SIGTERM registered
2020-12-29 03:02:43,423 - pyradio.radio - DEBUG - SetConsoleCtrlHandler: Failed to register handler for signal SIGKIL
2020-12-29 03:02:43,424 - pyradio.radio - INFO - detectUpdateThread: Starting...
2020-12-29 03:02:43,424 - pyradio.radio - INFO - detectUpdateThread: Will check in 35 seconds
2020-12-29 03:02:43,424 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 03:02:43,424 - pyradio.log - DEBUG - Suffix: None
2020-12-29 03:02:43,424 - pyradio.log - DEBUG - Counter: None
2020-12-29 03:02:43,424 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 03:02:44,439 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 03:02:44,439 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:44,439 - pyradio.log - DEBUG - Counter: None
2020-12-29 03:02:44,439 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 03:02:44,439 - pyradio.log - DEBUG - Status: "Selected player: mpv"
2020-12-29 03:02:44,440 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:44,440 - pyradio.log - DEBUG - Counter: None
2020-12-29 03:02:44,440 - pyradio.log - DEBUG - Press ? for help: yes
2020-12-29 03:02:44,440 - pyradio.log - DEBUG - Status: "Initialization: "SceneSat (Sweden)""
2020-12-29 03:02:44,440 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:44,441 - pyradio.log - DEBUG - Counter: None
2020-12-29 03:02:44,441 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:44,454 - pyradio.log - DEBUG - Status: "Station: "SceneSat (Sweden)" - Opening connection..."
2020-12-29 03:02:44,454 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:44,454 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:44,454 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:44,454 - pyradio.player - INFO - Selected Station: "SceneSat (Sweden)"
2020-12-29 03:02:44,604 - pyradio.player - DEBUG - --input-ipc-server is supported.
2020-12-29 03:02:44,607 - pyradio.player - INFO - MPV updateStatus thread started.
2020-12-29 03:02:44,608 - pyradio.player - ERROR - playback detection thread started
2020-12-29 03:02:44,608 - pyradio.player - INFO - Player started
2020-12-29 03:02:45,579 - pyradio.log - DEBUG - Status: "Connecting to: "SceneSat (Sweden)""
2020-12-29 03:02:45,579 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:45,579 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:45,579 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:46,301 - pyradio.player - INFO - *** _set_mpv_playback_is_on(): Start of playback detected ***
2020-12-29 03:02:46,301 - pyradio.log - DEBUG - Status: "Playing: "SceneSat (Sweden)""
2020-12-29 03:02:46,302 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:46,302 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:46,302 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:46,302 - pyradio.log - DEBUG - Status: "Title: AcidBlock - Training (Kicks with a punch Remix)"
2020-12-29 03:02:46,302 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:46,302 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:46,302 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:46,302 - pyradio.log - DEBUG - Status: "Title: AcidBlock - Training (Kicks with a punch Remix)"
2020-12-29 03:02:46,303 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:46,303 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:46,303 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:46,303 - pyradio.log - DEBUG - Status: "Title: AcidBlock - Training (Kicks with a punch Remix)"
2020-12-29 03:02:46,303 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:46,304 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:46,304 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:59,358 - pyradio.log - DEBUG - Status: "Playing: "SceneSat (Sweden)""
2020-12-29 03:02:59,358 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:59,359 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:59,359 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:59,359 - pyradio.log - DEBUG - Status: "Title: Ollas & Ziphoid - Combat Crazy"
2020-12-29 03:02:59,359 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:59,360 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:59,360 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:02:59,360 - pyradio.log - DEBUG - Status: "Title: Ollas & Ziphoid - Combat Crazy"
2020-12-29 03:02:59,360 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:02:59,360 - pyradio.log - DEBUG - Counter:
2020-12-29 03:02:59,360 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:03:18,473 - pyradio.radio - INFO - detectUpdateThread: Will check again in 10 days...
2020-12-29 03:03:19,674 - pyradio.log - DEBUG - Status: "Title: Ollas & Ziphoid - Combat Crazy"
2020-12-29 03:03:19,674 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:03:19,674 - pyradio.log - DEBUG - Counter:
2020-12-29 03:03:19,674 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:03:19,675 - pyradio.log - DEBUG - Status: "Title: Ollas & Ziphoid - Combat Crazy"
2020-12-29 03:03:19,675 - pyradio.log - DEBUG - Suffix:
2020-12-29 03:03:19,675 - pyradio.log - DEBUG - Counter:
2020-12-29 03:03:19,675 - pyradio.log - DEBUG - Press ? for help: no
2020-12-29 03:03:19,687 - pyradio.player - INFO - MPV updateStatus thread stopped.
2020-12-29 03:03:19,747 - pyradio.config - INFO - Config not saved (not modified)
2020-12-29 03:03:19,748 - pyradio.config - INFO - Lock file removed...

@s-n-g
Copy link
Collaborator

s-n-g commented Dec 29, 2020

ok, we are probably not in the right branch (my bad; the commands were not correct - sorry about that)

So here's what you do

cd pyradio
git fetch origin hmm3
git checkout hmm3
git branch -lvv | cat -

This should give you this output:

* hmm3   9dfe14c [origin/hmm3] - Fixing profile assignment - Enabling mplayer profiles on Windows
  master 130ccad [origin/master] - Version 0.8.8.2 - Gracefully exit when the terminal is closed

If it does not, we are not testing the code we want to test...

If it does, just go on and repeat the test

@hmm3
Copy link
Author

hmm3 commented Dec 29, 2020

Ahh. I guess I don't know what I'm doing with git. I got all the above messages, etc., and devel/build_install_pyradio, but I couldn't find the executable.

Anyways, I ended up doing pip3 install https://github.com/coderholic/pyradio/archive/hmm3.zip --user --upgrade and it ended up pulling the right files.

It's somewhat working.

If I use the command: pyradio -epp "mpv:--audio-device=alsa/front:CARD=Audio,DEV=0", it works. ps aux shows mpv --no-video --quiet --playlist=https://scenesat.com/listen/normal/max.m3u --input-ipc-server=/tmp/mpvsocket.42504 --audio-device=alsa/front:CARD=Audio,DEV=0

If I use the command: pyradio -epp "mpv:--audio-device='alsa/front:CARD=Audio,DEV=0'", it doesn't work. ps aux shows "mpv" with no commands running in the background.

It's not a big deal, but using ' should also work, as I can run the command from the debug log: mpv --no-video --quiet --playlist=https://scenesat.com/listen/normal/max.m3u --input-ipc-server=/tmp/mpvsocket.41851 --audio-device='alsa/front:CARD=Audio,DEV=0' and it works with no problem.

Thanks.

@s-n-g
Copy link
Collaborator

s-n-g commented Dec 29, 2020

Anyways, I ended up doing pip3 install https://github.com/coderholic/pyradio/archive/hmm3.zip --user --upgrade and it ended up pulling the right files.

This one blew me away!
I did not know you could do that!
Great job!

oh, ok, the single quote somehow breaks it.
I suppose I could just remove any single and double quote from command.

The good thing is that you got it to work!

So I will continue with redesigning the players config window.
Thanks!

@s-n-g s-n-g closed this as completed Dec 29, 2020
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

No branches or pull requests

2 participants