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

Config file, player definition with environment variable/value stored in the external file. #383

Open
ZaxonXP opened this issue Jun 23, 2021 · 1 comment

Comments

@ZaxonXP
Copy link

ZaxonXP commented Jun 23, 2021

Hi,

Sometime ago I wanted to have gapless playback, so I found a way that I can play one audio in one instance of mpv, then run in pause mode the other mpv with the next audio. When the first one ended, the next one would play immediately. For that I had to use two separated sockets (/tmp/soc1, /tmp/soc2) to be able to send pause command. The info about currently used socket I stored in a third file (/tmp/soc_used). This also allows me to globally control the playback (play/pause, next, etc.). I know, nothing to do with the youtube-viewer so far, but it should allow you to understand the rest. :)

So now, I would like to use this idea with youtube-viewer, but I do not know how to get the content of the /tmp/soc_used and place it in the youtube-viewer.config file?

The content of the /tmp/soc_used would be either /tmp/soc1 or /tmp/soc2.

Alternatively I could read the content of /tmp/soc_used and store it in the shell variable. But then, how can I define it in the youtube-viewer.config file? Can I use the $ENV{VAR_NAME} in the config? Will it be expanded to the proper value? Can the shell exported variables be used inside the config file?

Kind regards,
Piotr

@ZaxonXP
Copy link
Author

ZaxonXP commented Jun 23, 2021

Or maybe I need to create shell script where I will read what I need and use this script inside the config file?
Why did I not think of it sooner? ;)

Either way I would like to know if I can use a shell variables in the config file.

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

1 participant