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

feat: enable bridges using env var #3428

Merged
merged 5 commits into from
Jun 11, 2023
Merged

feat: enable bridges using env var #3428

merged 5 commits into from
Jun 11, 2023

Conversation

dvikan
Copy link
Contributor

@dvikan dvikan commented Jun 8, 2023

Allow enabling of bridges using env var.

Example (php-fpm):

env[RSSBRIDGE_system_enabled_bridges] = GettrBridge,ThePirateBayBridge

Example (docker):

ENV RSSBRIDGE_SYSTEM_ENABLED_BRIDGES = GettrBridge,ThePirateBayBridge

Yes they are case-insensitive.

Also introduce a new config option: enabled_bridges.

Keeping the whitelist.txt logic to preserve existing installations.

#2058
@gileri @Bockiii

@dvikan dvikan changed the title feat: introduce new config option enabled_bridges feat: enable bridges using env var Jun 9, 2023
@Bockiii
Copy link
Contributor

Bockiii commented Jun 9, 2023

Hi,

The env setting is definitive, not additive right?

Base Install: the 9 default bridges are active
set env variable to "youtubebridge": only yt is active, not the default ones (even though they are still in the config)
set whitelist.txt to "facebookbridge": still only youtubebridge is active because whitelist.txt loses in the race condition, right? (because whitelist is checked first, sets the config setting, then env is checked and overwrites the config setting)

@dvikan
Copy link
Contributor Author

dvikan commented Jun 9, 2023

you are correctly describing the behavior in the pr. the various config options entirely replaces the previous value. it is not addition.

ordering of which config takes precedence

  1. default config
  2. config
  3. whitelist.txt
  4. env

the logic and code is getting kinda complex but dont think there's any bugs in the pr

@Bockiii
Copy link
Contributor

Bockiii commented Jun 9, 2023

Yeah, didnt mean it as a bug, more an idea of what the wanted scenario is.

Okay, thats fine for me. Maybe that precedence should be noted somehow in the docu, otherwise the pr lgtm!

Thanks!

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