* Clarified documentation * more comments * [WIP] hooked up basic video downloading; starting work on metadata * Added metadata model and parsing Adding the metadata model made me realize that, in many cases, yt-dlp returns undesired input in stdout, breaking parsing. In order to get the metadata model working, I had to change the way in which the app interacts with yt-dlp. Now, output is written as a file to disk which is immediately re-read and returned. * Added tests for video download worker * Hooked up video downloading to the channel indexing pipeline * Adds tasks for media items * Updated video metadata parser to extract the title
15 lines
454 B
Elixir
15 lines
454 B
Elixir
defmodule Pinchflat.Repo.Migrations.CreateMediaMetadata do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create table(:media_metadata) do
|
|
add :client_response, :jsonb, null: false
|
|
add :media_item_id, references(:media_items, on_delete: :delete_all), null: false
|
|
|
|
timestamps(type: :utc_datetime)
|
|
end
|
|
|
|
create unique_index(:media_metadata, [:media_item_id])
|
|
create index(:media_metadata, [:client_response], using: :gin)
|
|
end
|
|
end
|