Skip to content

Commit d63135a

Browse files
committed
Renamed what looks like the last of the outstanding data
1 parent 6a31d33 commit d63135a

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

lib/pinchflat/media_source.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule Pinchflat.MediaSource do
2222
@doc """
2323
Gets a single source.
2424
25-
Returns %Source{}. Raises `Ecto.NoResultsError` if the Channel does not exist.
25+
Returns %Source{}. Raises `Ecto.NoResultsError` if the Source does not exist.
2626
"""
2727
def get_source!(id), do: Repo.get!(Source, id)
2828

lib/pinchflat/media_source/source.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
defmodule Pinchflat.MediaSource.Source do
22
@moduledoc """
3-
The Channel schema.
3+
The Source schema.
44
"""
55

66
use Ecto.Schema
@@ -18,7 +18,7 @@ defmodule Pinchflat.MediaSource.Source do
1818
field :collection_type, Ecto.Enum, values: [:channel, :playlist]
1919
field :index_frequency_minutes, :integer
2020
# This should only be used for user reference going forward
21-
# as the channel_id should be used for all API calls
21+
# as the collection_id should be used for all API calls
2222
field :original_url, :string
2323

2424
belongs_to :media_profile, MediaProfile

lib/pinchflat/tasks/source_tasks.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
defmodule Pinchflat.Tasks.SourceTasks do
22
@moduledoc """
3-
This module contains methods for managing tasks (workers) related to channels.
3+
This module contains methods for managing tasks (workers) related to sources.
44
"""
55

66
alias Pinchflat.Tasks

lib/pinchflat/workers/media_indexing_worker.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ defmodule Pinchflat.Workers.MediaIndexingWorker do
1414

1515
@impl Oban.Worker
1616
@doc """
17-
The ID is that of a channel _record_, not a YouTube channel ID. Indexes
18-
the provided channel, kicks off downloads for each new MediaItem, and
17+
The ID is that of a source _record_, not a YouTube channel/playlist ID. Indexes
18+
the provided source, kicks off downloads for each new MediaItem, and
1919
reschedules the job to run again in the future (as determined by the
20-
channel's `index_frequency_minutes` field).
20+
souce's `index_frequency_minutes` field).
2121
2222
README: Re-scheduling here works a little different than you may expect.
2323
The reschedule time is relative to the time the job has actually _completed_.

test/support/fixtures/media_source_fixtures.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ defmodule Pinchflat.MediaSourceFixtures do
1212
Generate a source.
1313
"""
1414
def source_fixture(attrs \\ %{}) do
15-
{:ok, channel} =
15+
{:ok, source} =
1616
%Source{}
1717
|> Source.changeset(
1818
Enum.into(attrs, %{
19-
name: "Channel ##{:rand.uniform(1_000_000)}",
19+
name: "Source ##{:rand.uniform(1_000_000)}",
2020
collection_id: Base.encode16(:crypto.hash(:md5, "#{:rand.uniform(1_000_000)}")),
2121
collection_type: "channel",
2222
original_url: "https://www.youtube.com/channel/#{Faker.String.base64(12)}",
@@ -26,6 +26,6 @@ defmodule Pinchflat.MediaSourceFixtures do
2626
)
2727
|> Repo.insert()
2828

29-
channel
29+
source
3030
end
3131
end

0 commit comments

Comments
 (0)