Added sponsorblock columns to media profile

This commit is contained in:
Kieran Eglin 2024-03-28 09:08:04 -07:00
parent 3837a0dedd
commit ebdb070988
No known key found for this signature in database
GPG key ID: 193984967FCF432D
2 changed files with 14 additions and 0 deletions

View file

@ -21,6 +21,8 @@ defmodule Pinchflat.Profiles.MediaProfile do
download_metadata
embed_metadata
download_nfo
sponsorblock_behaviour
sponsorblock_categories
shorts_behaviour
livestream_behaviour
preferred_resolution
@ -47,6 +49,8 @@ defmodule Pinchflat.Profiles.MediaProfile do
field :embed_metadata, :boolean, default: false
field :download_nfo, :boolean, default: false
field :sponsorblock_behaviour, Ecto.Enum, values: [:disabled, :remove], default: :disabled
field :sponsorblock_categories, {:array, :string}, default: []
# NOTE: these do NOT speed up indexing - the indexer still has to go
# through the entire collection to determine if a media is a short or
# a livestream.

View file

@ -0,0 +1,10 @@
defmodule Pinchflat.Repo.Migrations.AddSponsorblockToMediaProfiles do
use Ecto.Migration
def change do
alter table(:media_profiles) do
add :sponsorblock_behaviour, :string, default: "disabled"
add :sponsorblock_categories, {:array, :string}, default: []
end
end
end