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:
@@ -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
|
||||
Reference in New Issue
Block a user