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 #28

Merged
merged 53 commits into from
Jan 12, 2023
Merged

Config file #28

merged 53 commits into from
Jan 12, 2023

Conversation

jenslys
Copy link
Owner

@jenslys jenslys commented Dec 25, 2022

Related issue: #23

This PR moves all the variables to a dedicated config file default.config
Each streamer you monitor will need its own config file: nameHere.config

instructions:

  1. Copy the default.config to a separate config file nameHere.config
  2. Edit the new config
  3. Start the script pm2 start --name nameHere

Code flow:

  1. Fetch the --name arg that is passed when starting the script pm2 start --name nameHere
    1. store the arg nameHere
  2. Try to load nameHere.config
    1. Fetch variables
  3. If you have API_CALLS enabled and use either STREAMER_GAME or STREAMER_TITLE:
    1. we store the original values as new variables
    2. replace the initial_value with the once fetched from the api
    3. Use them when uploading
    4. then reset them at the end.

+ fixed readme
@jenslys jenslys added type: documentation Improvements or additions to documentation type: enhancement New feature help wanted Extra attention is needed labels Dec 25, 2022
@jenslys jenslys changed the title Config file support Config file Dec 25, 2022
@jenslys
Copy link
Owner Author

jenslys commented Dec 26, 2022

i am not done with this PR, but is it easy to add this functionality to the dockerfile? @BrainyXS

@schneidermanuel
Copy link
Contributor

Yea, should be easy to copy the config file during image creation to the docker image

@jenslys
Copy link
Owner Author

jenslys commented Dec 26, 2022

Yea, should be easy to copy the config file during image creation to the docker image

Nice, do you mind updating the necessary changes once this PR is finished?

@jenslys jenslys self-assigned this Dec 26, 2022
@jenslys jenslys linked an issue Dec 26, 2022 that may be closed by this pull request
@jenslys jenslys changed the title Config file Config file + more Dec 30, 2022
@jenslys jenslys changed the title Config file + more Config file Dec 31, 2022
@jenslys
Copy link
Owner Author

jenslys commented Jan 3, 2023

I am finished from my side. 😅
@BrainyXS do you mind doing the necessary docker and readme changes and open a PR into this branch?

@jenslys jenslys marked this pull request as ready for review January 12, 2023 15:30
@jenslys
Copy link
Owner Author

jenslys commented Jan 12, 2023

Squashing this PR

@jenslys jenslys merged commit 79da88e into master Jan 12, 2023
@jenslys jenslys deleted the feat/config branch January 12, 2023 15:36
@jenslys jenslys mentioned this pull request Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type: documentation Improvements or additions to documentation type: enhancement New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] - Config file
2 participants