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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user