Start integrating playlist support (#13)

* [WIP] updated the output of VideoCollection to include playlists

* Updated source's name to collection_name; supported playlist ID/name fetching

* Hooked up collection_type to form; refactored enqueue_pending_media_downloads

* Added friendly_name to form

* Added media profile link to source view

* Updates comment
This commit is contained in:
Kieran
2024-02-05 11:38:19 -08:00
committed by GitHub
parent bdef6c75bb
commit ca01f17b58
19 changed files with 291 additions and 100 deletions
+37
View File
@@ -2,6 +2,7 @@ alias Pinchflat.Repo
alias Pinchflat.Tasks.Task
alias Pinchflat.Media.MediaItem
alias Pinchflat.Tasks.SourceTasks
alias Pinchflat.Media.MediaMetadata
alias Pinchflat.MediaSource.Source
alias Pinchflat.Profiles.MediaProfile
@@ -12,3 +13,39 @@ alias Pinchflat.Profiles
alias Pinchflat.MediaSource
alias Pinchflat.MediaClient.{SourceDetails, VideoDownloader}
defmodule IexHelpers do
def playlist_url do
"https://www.youtube.com/playlist?list=PLmqC3wPkeL8kSlTCcSMDD63gmSi7evcXS"
end
def channel_url do
"https://www.youtube.com/c/TheUselessTrials"
end
def video_url do
"https://www.youtube.com/watch?v=bR52O78ZIUw"
end
def details(type) do
source =
case type do
:playlist -> playlist_url()
:channel -> channel_url()
end
SourceDetails.get_source_details(source)
end
def ids(type) do
source =
case type do
:playlist -> playlist_url()
:channel -> channel_url()
end
SourceDetails.get_video_ids(source)
end
end
import IexHelpers