Skip to content

Commit

Permalink
Update settings & docker wiki's
Browse files Browse the repository at this point in the history
  • Loading branch information
Inrixia committed Apr 7, 2024
1 parent 176e283 commit a1bd59e
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 54 deletions.
2 changes: 1 addition & 1 deletion wiki/advenv.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To do this you must take the key for the setting in the `settings.json` and writ
-e floatplane_videoResolution="1080" \
-e plex_token="ThisRemovesTheNeedForPassingUsername/Password" \
--restart unless-stopped \
inrix/floatplane-downloader
inrix/floatplane-downloader:dev
```

or in a .env file:
Expand Down
26 changes: 15 additions & 11 deletions wiki/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

### Tags:

- `:latest`
- Latest release version of the downloader
- `:dev` - Image in sync with `dev` branch on github, bleeding edge changes that **will likely break everything**.
- `:dev` - Image in sync with `dev` branch on github, **stable with latest features & fixes**
- `:latest` - Latest release version of the downloader, usually stale
<br>

## Quickstart:

There is a interactive series of console prompts to help you setup the downloader and login. If you dont want to or cannot work with a interactive terminal please skip down to **Enviroment Variables**

Docker CLI:

```dockerfile
$ docker run -it \
-v [path]:/fp/db \
-v [path]:/fp/videos \
-e runQuickstartPrompts=true \
--restart unless-stopped \
inrix/floatplane-downloader
inrix/floatplane-downloader:dev
```

- **[path]** should be replaced with a directory on your machine to hold persistent data.
Expand All @@ -32,7 +32,7 @@ Docker CLI:
-v [path]:/fp/videos \
-e headless="true" \
--restart unless-stopped \
inrix/floatplane-downloader
inrix/floatplane-downloader:dev
```

<br>
Expand All @@ -41,9 +41,12 @@ Docker CLI:

Setting environment variables allows you to pass in your login details, removing the need to use the quickstart prompts to login/setup the downloader.

**Important!!** Once you have signed in once you do not need ot leave your credentials in your config! I reccomend removing them.

**For login:**

Docker CLI:

```dockerfile
$ docker run \
-v [path]:/fp/db \
Expand All @@ -53,15 +56,15 @@ Docker CLI:
-e password="YourPasswordHere" \
-e token="Your2FactorCodeHere" \
--restart unless-stopped \
inrix/floatplane-downloader
inrix/floatplane-downloader:dev
```

Docker-Compose:

```yaml
version: "3.8"
services:
floatplane-downloader:
image: inrix/floatplane-downloader
image: inrix/floatplane-downloader:dev
container_name: floatplane-downloader
environment:
- headless=true
Expand All @@ -77,6 +80,7 @@ services:
**For login + plex:**
Docker CLI:
```dockerfile
$ docker run \
-v [path]:/fp/db \
Expand All @@ -87,15 +91,15 @@ Docker CLI:
-e plexUsername="YourPlexUsernameHere" \
-e plexPassword="YourPlexPasswordHere2FactorCodeHereIfYouHaveOne" \
--restart unless-stopped \
inrix/floatplane-downloader
inrix/floatplane-downloader:dev
```

Docker-Compose:

```yaml
version: "3.8"
services:
floatplane-downloader:
image: inrix/floatplane-downloader
image: inrix/floatplane-downloader:dev
container_name: floatplane-downloader
environment:
- headless=true
Expand Down
77 changes: 35 additions & 42 deletions wiki/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ The following options are available to be used:
Suffix appended to artwork filename.
Added for Kodi support as Kodi looks for artwork in the format `VideoName-thumb.png`

Windows example:

```json
"artworkSuffix": "echo %videoTitle% > example.txt"
"artworkSuffix": ""
```

<br>
Expand All @@ -113,7 +111,7 @@ You can refer to the `Path Formatting Options` section in this wiki for what can
Strings surounded by % will be replaced with their respective values.

```json
"postProcessingCommand": ""
"postProcessingCommand": "echo %videoTitle% > example.txt"
```

<br>
Expand Down Expand Up @@ -158,17 +156,6 @@ Saves video metadata to nfo files alongside each video.

<br>

**extras.promptVideos**:
Prompts the user to confirm videos to download after fetching.

```json
"extras": {
"promptVideos": true
}
```

<br>

**extras.considerAllNonPartialDownloaded**:
When this is set to true the downloader will skip size checks for non `.mp4` files.
This may result in files without muxed metadata and should only be used for recovery if your `db` is lost.
Expand Down Expand Up @@ -220,53 +207,59 @@ Plex token generated from your login details for updating remote servers.
## Subscriptions:

All the Floatplane creators you are subscribed to.
![image](https://user-images.githubusercontent.com/6373693/115116013-86a4a480-9feb-11eb-828a-fe4fa8ba5cf9.png)
![image](https://github.com/Inrixia/Floatplane-Downloader/assets/6373693/9535456d-158a-4ead-b355-8d3155a8d979)
At the creator level you can see the `creatorId` and `plan`. You can also choose to `skip` a creator and not download videos from them.
You can add custom channels to a creator if you want.
<br>

You can add as many channels to a creator as you like, each **channel** has its own episode count and is considered its own "series".
First come first served, the first channel a video matches to is what it goes into, channels are checked top to bottom in the config. Videos cannot be sorted into multiple channels.
<br>

A **channel** is made up of a `title`, `skip`, an array of `identifiers` and `consoleColor`.
A **channel** is made up of a `title`, `skip`, `isChannel` and optionally `daysToKeepVideos`.
`title` is the nice name used for the channel.
`skip` can be set to true to skip downloading videos matched on the given channel.
`identifiers` specify the conditions for a video to be added to a channel.
`daysToKeepVideos` is the optional number of days to keep videos for this channe. 2 would mean only videos released within the last two days are downloaded and any older will be automatically deleted if previously downloaded.
`isChannel` function that returns true or false if the video should be sorted into this channel (more on this further down).
`daysToKeepVideos` is the optional number of days to keep videos for this channel. **2** would mean only videos released within the **last two days** are downloaded and any older will be **automatically deleted** if previously downloaded.

<br>

An Identifier contains two entries `check` and `type`.
The `check` is the string to look for.
The `type` is where in the video returned from the floatplane api to search for the check string.
This can be `description`, `title` etc any property that exists on the video. See [FloatplaneApiDocs/getBlogPost](https://jman012.github.io/FloatplaneAPIDocs/Redoc/redoc-static.html#operation/getBlogPost) for more info...
The identifiers `releasedAfter` and `releasedBefore` can also be used to match videos that were released before or after a specified date. You can also use `runtimeLessThan` and `runtimeGreaterThan` to only match videos whos runtime is greated or lower than the specified value in seconds. This can be used with a generic skip channel to skip videos with a runtime greater or less than the desired amount.
**isChannel** is a function that accepts a **[post](https://jman012.github.io/FloatplaneAPIDocs/Redoc/redoc-static.html#tag/ContentV3/operation/getBlogPost)** which is the post the video belongs to and **[video](https://jman012.github.io/FloatplaneAPIDocs/Redoc/redoc-static.html#tag/ContentV3/operation/getVideoContent)** which is one or more videos belonging to that post.

If it returns **true** the video is sorted into the channel, **false** and its not.
This gives the flexibility to create completely custom channels based on any properties of a post or video.
<br>

For example:

```json
"Floatplane Exclusive": {
"title": "Floatplane Exclusive",
"skip": false,
"identifiers": [
{
"check": "FP Exclusive: ",
"type": "title"
}
],
"daysToKeepVideos": 5
{
"title": "Creators with Technoligy in their Description",
"skip": false,
"isChannel": "(post, video) => post.creator?.description?.toLowercase()?.includes('technology')",
"daysToKeepVideos": 5
}
```

<br>

This is a channel named "Floatplane Exclusive".
Videos that have "FP Exclusive: " in their title will be sorted into this channel.
Videos released more than 5 days ago will be automatically deleted.
## Metrics:

**metrics.prometheusExporterPort**:
Default is `null` if set to a number prometheus metrics will be made availible at that port.

```json
"metrics": {
"prometheusExporterPort": 8080,
}
```

<br>

A few more notes regarding channels:
**metrics.contributeMetrics**:
If true metrics will be included in the aggregate dashboard.

- First come first served, the first channel a video matches to is what it goes into, channels are checked top to bottom in the config. Videos cannot be sorted into multiple channels.
- You can have multiple identifiers per channel to allow for more accurate matching.
- The `check` string is removed from the video's title if the `type`is equal to "title".
```json
"metrics": {
"contributeMetrics": true
}
```

0 comments on commit a1bd59e

Please sign in to comment.