Added a new column for restricting filenames

This commit is contained in:
Kieran Eglin 2025-03-17 14:38:48 -07:00
parent 4554648ba7
commit 6eb5b97b76
No known key found for this signature in database
GPG key ID: 193984967FCF432D
3 changed files with 12 additions and 1 deletions

View file

@ -16,7 +16,8 @@ defmodule Pinchflat.Settings.Setting do
:audio_codec_preference,
:youtube_api_key,
:extractor_sleep_interval_seconds,
:download_throughput_limit
:download_throughput_limit,
:restrict_filenames
]
@required_fields [
@ -38,6 +39,7 @@ defmodule Pinchflat.Settings.Setting do
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 :restrict_filenames, :boolean, default: false
field :video_codec_preference, :string
field :audio_codec_preference, :string

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 KiB

After

Width:  |  Height:  |  Size: 506 KiB

Before After
Before After

View file

@ -0,0 +1,9 @@
defmodule Pinchflat.Repo.Migrations.AddRestrictFilenamesToSettings do
use Ecto.Migration
def change do
alter table(:settings) do
add :restrict_filenames, :boolean, default: false
end
end
end