Ensure channel detail lookup doesn't download the video - oops
This commit is contained in:
parent
d25e65f822
commit
9e17b4aa6a
3 changed files with 3 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ defmodule Pinchflat.MediaClient.Backends.YtDlp.Channel do
|
|||
Returns {:ok, %ChannelDetails{}} | {:error, any, ...}.
|
||||
"""
|
||||
def get_channel_details(channel_url) do
|
||||
opts = [playlist_end: 1]
|
||||
opts = [:skip_download, playlist_end: 1]
|
||||
|
||||
with {:ok, output} <- backend_runner().run(channel_url, opts, "%(.{channel,channel_id})j"),
|
||||
{:ok, parsed_json} <- Phoenix.json_library().decode(output) do
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ defmodule Pinchflat.MediaClient.Backends.YtDlp.ChannelTest do
|
|||
|
||||
test "it passes the expected args to the backend runner" do
|
||||
expect(YtDlpRunnerMock, :run, fn @channel_url, opts, ot ->
|
||||
assert opts == [playlist_end: 1]
|
||||
assert opts == [:skip_download, playlist_end: 1]
|
||||
assert ot == "%(.{channel,channel_id})j"
|
||||
|
||||
{:ok, "{}"}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ defmodule Pinchflat.MediaClient.ChannelDetailsTest do
|
|||
describe "get_channel_details/2" do
|
||||
test "it passes the expected arguments to the backend" do
|
||||
expect(YtDlpRunnerMock, :run, fn @channel_url, opts, ot ->
|
||||
assert opts == [playlist_end: 1]
|
||||
assert opts == [:skip_download, playlist_end: 1]
|
||||
assert ot == "%(.{channel,channel_id})j"
|
||||
|
||||
{:ok, "{\"channel\": \"TheUselessTrials\", \"channel_id\": \"UCQH2\"}"}
|
||||
|
|
|
|||
Loading…
Reference in a new issue