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:
1 parent
d25e65f822
commit
bdef6c75bb
46 files changed
+805
-762
No files matched your search
@@ -25,8 +25,8 @@ defmodule Pinchflat.MediaClient.VideoDownloader do
|
||||
Returns {:ok, %MediaItem{}} | {:error, any, ...any}
|
||||
"""
|
||||
def download_for_media_item(%MediaItem{} = media_item, backend \\ :yt_dlp) do
|
||||
item_with_preloads = Repo.preload(media_item, [:metadata, channel: :media_profile])
|
||||
media_profile = item_with_preloads.channel.media_profile
|
||||
item_with_preloads = Repo.preload(media_item, [:metadata, source: :media_profile])
|
||||
media_profile = item_with_preloads.source.media_profile
|
||||
|
||||
case download_for_media_profile(media_item.media_id, media_profile, backend) do
|
||||
{:ok, parsed_json} ->
|
||||
|
||||
Reference in new issue
Block a user