Change Channel to Source (#12)
* Ensure channel detail lookup doesn't download the video - oops * Ran the needful migrations for replacing channels with sources * got media source test back working * channel tasks test * Media indexing worker test * media tests * Got all tests working except controller tests * got all tests working * Renamed Channel struct to Source * renamed ChannelTasks * More renaming; renamed channel details module * Removed Channel yt-dlp module, instead throwing things in the VideoCollection module * Renamed what looks like the last of the outstanding data
This commit is contained in:
@@ -7,11 +7,11 @@ defmodule Pinchflat.Tasks.Task do
|
||||
import Ecto.Changeset
|
||||
|
||||
alias Pinchflat.Media.MediaItem
|
||||
alias Pinchflat.MediaSource.Channel
|
||||
alias Pinchflat.MediaSource.Source
|
||||
|
||||
schema "tasks" do
|
||||
belongs_to :job, Oban.Job
|
||||
belongs_to :channel, Channel
|
||||
belongs_to :source, Source
|
||||
belongs_to :media_item, MediaItem
|
||||
|
||||
timestamps(type: :utc_datetime)
|
||||
@@ -20,7 +20,7 @@ defmodule Pinchflat.Tasks.Task do
|
||||
@doc false
|
||||
def changeset(task, attrs) do
|
||||
task
|
||||
|> cast(attrs, [:job_id, :channel_id, :media_item_id])
|
||||
|> cast(attrs, [:job_id, :source_id, :media_item_id])
|
||||
|> validate_required([:job_id])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user