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