Skip to content

Commit

Permalink
Only take host and path
Browse files Browse the repository at this point in the history
  • Loading branch information
davidvanleeuwen committed Jan 10, 2024
1 parent e1e3110 commit 6734ec0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/mave_metrics/stats.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ defmodule MaveMetrics.Stats do

# returns existing videos that aren't part of that video
def find_or_create_video(source_url, identifier, metadata) do
source_url = source_url |> URI.parse() |> Map.take([:host, :path])

case get_by_source_url_and_identifier_and_metadata(source_url, identifier, metadata) do
%Video{id: _id} = video ->
{:ok, video}
Expand Down

0 comments on commit 6734ec0

Please sign in to comment.