close #613
- add the ability to customize pagination size via env variables
This commit is contained in:
parent
076f2fe78b
commit
aaa5e7550a
3 changed files with 12 additions and 9 deletions
|
|
@ -178,6 +178,9 @@ If you change this setting and it works well for you, please leave a comment on
|
||||||
| `BASE_ROUTE_PATH` | No | `/` | The base path for route generation. Useful when running behind certain reverse proxies - prefixes must be stripped. |
|
| `BASE_ROUTE_PATH` | No | `/` | The base path for route generation. Useful when running behind certain reverse proxies - prefixes must be stripped. |
|
||||||
| `YT_DLP_WORKER_CONCURRENCY` | No | `2` | The number of concurrent workers that use `yt-dlp` _per queue_. Set to 1 if you're getting IP limited, otherwise don't touch it |
|
| `YT_DLP_WORKER_CONCURRENCY` | No | `2` | The number of concurrent workers that use `yt-dlp` _per queue_. Set to 1 if you're getting IP limited, otherwise don't touch it |
|
||||||
| `ENABLE_PROMETHEUS` | No | `false` | Setting to _any_ non-blank value will enable Prometheus. See [docs](https://github.com/kieraneglin/pinchflat/wiki/Prometheus-and-Grafana) |
|
| `ENABLE_PROMETHEUS` | No | `false` | Setting to _any_ non-blank value will enable Prometheus. See [docs](https://github.com/kieraneglin/pinchflat/wiki/Prometheus-and-Grafana) |
|
||||||
|
| `PAGINATION_LIMIT` | No | `10` | How many items are displayed on a media item source |
|
||||||
|
| `PAGINATION_HISTORY_LIMIT` | No | `PAGINATION_LIMIT` or `5` | How many items are displayed on home's media history |
|
||||||
|
|
||||||
|
|
||||||
### Reverse Proxies
|
### Reverse Proxies
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ defmodule Pinchflat.Pages.HistoryTableLive do
|
||||||
alias Pinchflat.Utils.NumberUtils
|
alias Pinchflat.Utils.NumberUtils
|
||||||
alias PinchflatWeb.CustomComponents.TextComponents
|
alias PinchflatWeb.CustomComponents.TextComponents
|
||||||
|
|
||||||
@limit 5
|
@limit System.get_env("PAGINATION_HISTORY_LIMIT", System.get_env("PAGINATION_LIMIT", "5")) |> String.to_integer()
|
||||||
|
|
||||||
def render(%{records: []} = assigns) do
|
def render(%{records: []} = assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ defmodule PinchflatWeb.Sources.MediaItemTableLive do
|
||||||
alias Pinchflat.Sources
|
alias Pinchflat.Sources
|
||||||
alias Pinchflat.Utils.NumberUtils
|
alias Pinchflat.Utils.NumberUtils
|
||||||
|
|
||||||
@limit 10
|
@limit System.get_env("PAGINATION_LIMIT", "10") |> String.to_integer()
|
||||||
|
|
||||||
def render(%{total_record_count: 0} = assigns) do
|
def render(%{total_record_count: 0} = assigns) do
|
||||||
~H"""
|
~H"""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue