Added rate limit column to settings

This commit is contained in:
Kieran Eglin 2025-03-11 15:28:52 -07:00
parent 0fbf810cb6
commit e993c8e8bf
No known key found for this signature in database
GPG key ID: 193984967FCF432D
3 changed files with 13 additions and 1 deletions

View file

@ -15,7 +15,8 @@ defmodule Pinchflat.Settings.Setting do
:video_codec_preference,
:audio_codec_preference,
:youtube_api_key,
:extractor_sleep_interval_seconds
:extractor_sleep_interval_seconds,
:download_throughput_limit
]
@required_fields [
@ -35,6 +36,8 @@ defmodule Pinchflat.Settings.Setting do
field :youtube_api_key, :string
field :route_token, :string
field :extractor_sleep_interval_seconds, :integer, default: 0
# This is a string because it accepts values like "100K" or "4.2M"
field :download_throughput_limit, :string
field :video_codec_preference, :string
field :audio_codec_preference, :string

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 KiB

After

Width:  |  Height:  |  Size: 503 KiB

Before After
Before After

View file

@ -0,0 +1,9 @@
defmodule Pinchflat.Repo.Migrations.AddRateLimitSpeedToSettings do
use Ecto.Migration
def change do
alter table(:settings) do
add :download_throughput_limit, :string
end
end
end