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 18:55:02 -08:00
committed by GitHub
parent 4dd9d837a3
commit 977b69b7c3
19 changed files with 5139 additions and 872 deletions
+6 -2
View File
@@ -11,12 +11,16 @@ defmodule Pinchflat.Media.MediaItem do
alias Pinchflat.Media.MediaMetadata
@required_fields ~w(media_id channel_id)a
@allowed_fields ~w(title media_id video_filepath channel_id)a
@allowed_fields ~w(title media_id media_filepath channel_id subtitle_filepaths)a
schema "media_items" do
field :title, :string
field :media_id, :string
field :video_filepath, :string
field :media_filepath, :string
# This is an array of [iso-2 language, filepath] pairs. Probably could
# be an associated record, but I don't see the benefit right now.
# Will very likely revisit because I can't leave well-enough alone.
field :subtitle_filepaths, {:array, {:array, :string}}, default: []
belongs_to :channel, Channel