Allow subtitle downloading (#11)

* Added subtitle options to media profile model

* Updated media profile form

* Adds subtitle-based options in options builder

* Updates metadata parser to include subtitles

* Adds subtitle_filepaths to media_item

* renamed video_filepath to media_filepath

* Added more fields to media profile show page
This commit is contained in:
Kieran
2024-01-31 10:55:02 -08:00
committed by GitHub
parent a5e7c48f70
commit d25e65f822
19 changed files with 5139 additions and 872 deletions
@@ -0,0 +1,12 @@
defmodule Pinchflat.Repo.Migrations.AddSubtitleOptionsToMediaProfiles do
use Ecto.Migration
def change do
alter table(:media_profiles) do
add :download_subs, :boolean, default: true, null: false
add :download_auto_subs, :boolean, default: true, null: false
add :embed_subs, :boolean, default: true, null: false
add :sub_langs, :string, default: "en", null: false
end
end
end
@@ -0,0 +1,9 @@
defmodule Pinchflat.Repo.Migrations.AddSubtitleFilepathsToMediaItem do
use Ecto.Migration
def change do
alter table(:media_items) do
add :subtitle_filepaths, {:array, {:array, :string}}, default: []
end
end
end
@@ -0,0 +1,7 @@
defmodule Pinchflat.Repo.Migrations.RenameVideoFilepathOnMediaItems do
use Ecto.Migration
def change do
rename table(:media_items), :video_filepath, to: :media_filepath
end
end