Added youtube_api_key to settings
This commit is contained in:
parent
9dbbf34db9
commit
147fb71a02
5 changed files with 18 additions and 2 deletions
|
|
@ -16,7 +16,6 @@ defmodule Pinchflat.FastIndexing.YoutubeRss do
|
|||
|
||||
Returns true
|
||||
"""
|
||||
# TODO: test
|
||||
@impl YoutubeBehaviour
|
||||
def enabled?(), do: true
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ defmodule Pinchflat.Settings.Setting do
|
|||
:apprise_version,
|
||||
:apprise_server,
|
||||
:video_codec_preference,
|
||||
:audio_codec_preference
|
||||
:audio_codec_preference,
|
||||
:youtube_api_key
|
||||
]
|
||||
|
||||
@required_fields ~w(
|
||||
|
|
@ -29,6 +30,7 @@ defmodule Pinchflat.Settings.Setting do
|
|||
field :yt_dlp_version, :string
|
||||
field :apprise_version, :string
|
||||
field :apprise_server, :string
|
||||
field :youtube_api_key, :string
|
||||
|
||||
field :video_codec_preference, :string
|
||||
field :audio_codec_preference, :string
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 471 KiB After Width: | Height: | Size: 468 KiB |
|
|
@ -0,0 +1,9 @@
|
|||
defmodule Pinchflat.Repo.Migrations.AddYoutubeApiKeySetting do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:settings) do
|
||||
add :youtube_api_key, :string
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -11,6 +11,12 @@ defmodule Pinchflat.FastIndexing.YoutubeRssTest do
|
|||
{:ok, source: source}
|
||||
end
|
||||
|
||||
describe "enabled?/0" do
|
||||
test "returns true" do
|
||||
assert YoutubeRss.enabled?()
|
||||
end
|
||||
end
|
||||
|
||||
describe "get_recent_media_ids/1" do
|
||||
test "calls the expected URL for channel sources" do
|
||||
source = source_fixture(collection_type: :channel, collection_id: "channel_id")
|
||||
|
|
|
|||
Loading…
Reference in a new issue