Skip to content

Commit

Permalink
Added advenv.md wiki page
Browse files Browse the repository at this point in the history
  • Loading branch information
Inrixia committed May 27, 2022
1 parent 352e11b commit 4165380
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 18 deletions.
14 changes: 9 additions & 5 deletions README.md
Expand Up @@ -5,7 +5,7 @@
**Join our discord! [discord.gg/aNTyMME](https://discord.gg/aNTyMME)**
<br>

**Floatplane Downloader** Automagically downloads the latest videos from [Floatplane](https://floatplane.com) and optionally formats them to be viewed in [Plex](https://www.plex.tv/).
**Floatplane Downloader** Automagically downloads the latest videos from [Floatplane](https://floatplane.com) and optionally formats them to be viewed in [Plex](https://www.plex.tv/).

Both downloading videos as they release and archiving the entire backlog is supported!<br>
This requires a **[Floatplane](http://floatplane.com)** subscription.<br>
Expand All @@ -20,6 +20,7 @@ If you encounter any issues please **[create a issue](https://github.com/Inrixia
If you want to **contribute** please work on the `dev` branch and not `master` for pull requests

# Install Guide

Looking for **Docker**?<br>
Get the image on: **[hub.docker.com/r/inrix/floatplane-downloader](https://hub.docker.com/r/inrix/floatplane-downloader)** and see instructions at **[the wiki](https://github.com/Inrixia/Floatplane-Downloader/blob/master/wiki/docker.md)**!

Expand All @@ -30,14 +31,16 @@ Get the image on: **[hub.docker.com/r/inrix/floatplane-downloader](https://hub.d
3. **Profit?!**:<br>
At this point you should be completely set-up and ready to go!<br>
To start the downloader in the future all you need to do is run the binary.
<br>
<br>

For more info on setting up plex & available settings check out the Wikis:

# Wikis:
* [Setting up Plex](https://github.com/Inrixia/Floatplane-PlexDownloader/blob/master/wiki/plex.md)
* [Settings Info](https://github.com/Inrixia/Floatplane-Downloader/blob/master/wiki/settings.md)
* [Docker Info](https://github.com/Inrixia/Floatplane-Downloader/blob/master/wiki/docker.md)

- [Setting up Plex](https://github.com/Inrixia/Floatplane-PlexDownloader/blob/master/wiki/plex.md)
- [Settings Info](https://github.com/Inrixia/Floatplane-Downloader/blob/master/wiki/settings.md)
- [Docker Info](https://github.com/Inrixia/Floatplane-Downloader/blob/master/wiki/docker.md)
- [Advanced Env Info](https://github.com/Inrixia/Floatplane-Downloader/blob/master/wiki/advenv.md)

<br>

Expand All @@ -46,6 +49,7 @@ For more info on setting up plex & available settings check out the Wikis:
<br>

### Images:

![image](https://user-images.githubusercontent.com/6373693/115110440-8d252300-9fcf-11eb-92a0-a813fcfcc632.png)
![image](https://user-images.githubusercontent.com/6373693/115112389-69ff7100-9fd9-11eb-92e2-b83c3241627b.png)
![image](https://user-images.githubusercontent.com/6373693/115112394-6e2b8e80-9fd9-11eb-9c3d-ecaa3f87eb16.png)
68 changes: 68 additions & 0 deletions wiki/advenv.md
@@ -0,0 +1,68 @@
# Advanced Env Setup

The downloader allows you to change settings in a variety of ways, directly via the `settings.json`, via arguments and via eniroment variables (.env file supported).

There are two ways you can use enviroment variables to set settings:

## Single Variable

To do this you must take the key for the setting in the `settings.json` and write it with the dots **.** replaced with underscores **\_** you can see an example for the setting `floatplane.videoResolution` below:

$ docker run \
-v [path]:/fp/db \
-v [path]:/fp/videos \
-e headless="true" \
-e floatplane_videoResolution="1080" \
-e plex_token="ThisRemovesTheNeedForPassingUsername/Password" \
--restart unless-stopped \
inrix/floatplane-downloader

or in a .env file:

```env
headless=true
floatplane_videoResolution=1080
```

## JSON

If you want to have a more advanced configuration (ie spaces in variable names) then you can use **`__FPDSettings`** with JSON.
Here is an example of setting just the Floatplane Exclusive settings via `__FPDSettings` and `extras` via the single variable method:

```
extras_stripSubchannelPrefix=true
extras_downloadArtwork=true
extras_saveNfo=true
__FPDSettings="{
subscriptions: {
\"59f94c0bdd241b70349eb72b\": {
channels: {
\"Floatplane Exclusive\": {
title: \"Floatplane Exclusive\",
skip: false,
identifiers: [
{
check: \"FP Exclusive: \",
type: \"title\"
}
],
consoleColor: \"\u001b[38;5;200m\",
daysToKeepVideos: 123
},
},
},
},
}"
```

Note the need to use escape characters for strings but not for keys, this is done using [JSON5](https://github.com/SerafimArts/json5) to make it easier to create/read and avoid issues with quotes in env variables.

All settings overwrittern by env or args will be applied to and modify the `settings.json` file.
Settings are applied in the following order:

- Missing defaults are set.
- args are set.
- env variable `__FPDSettings` is set.
- individual env variables are set.

This means that if you set a setting in a prior step and again in a subsequent step, it will be overridden.
15 changes: 2 additions & 13 deletions wiki/docker.md
Expand Up @@ -62,16 +62,5 @@ Setting environment variables allows you to pass in your login details, removing
--restart unless-stopped \
inrix/floatplane-downloader

You can also use enviroment variables to overwrite/set config values, though the config is persisted under db/config.json.<br>
To do this you must take the key for the setting in the settings.json and write it with the dots **.** replaced with underscores **\_** you can see an example for the setting `floatplane.videoResolution` below:

**For settings:**

$ docker run \
-v [path]:/fp/db \
-v [path]:/fp/videos \
-e headless="true" \
-e floatplane_videoResolution="1080" \
-e plex_token="ThisRemovesTheNeedForPassingUsername/Password" \
--restart unless-stopped \
inrix/floatplane-downloader
You can also use enviroment variables to set any config values which will be persisted.<br>
For more info on advanced environment variables, please see **[Advanced Env Info](https://github.com/Inrixia/Floatplane-Downloader/blob/master/wiki/advenv.md)**

0 comments on commit 4165380

Please sign in to comment.