* 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
12 lines
367 B
Elixir
12 lines
367 B
Elixir
defmodule Pinchflat.Repo.Migrations.AddMediaItemToTasks do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
alter table(:tasks) do
|
|
# `restrict` because we need to be sure to delete pending tasks when a channel is deleted
|
|
add :media_item_id, references(:media_items, on_delete: :restrict), null: true
|
|
end
|
|
|
|
create index(:tasks, [:media_item_id])
|
|
end
|
|
end
|