* Made method to getting singular media details; Renamed other related method * Takes a fun and flirty digression to remove abstractions around yt-dlp since I'm 100% committed to using it exclusively * Removed commented test code * Lays the groundwork for fast indexing * Added module for working with youtube RSS feed * Added methods to kick off indexing workers from RSS response * Improve short detection (#59) * Made media attribute-related yt-dlp calls return a struct * Added shorts attribute to media items * Added ability to discern a short from yt-dlp response * Updated search to use new shorts attribute * Fast index UI (#63) * Added fast_index field and adds it to source form * Added fast indexing to source changeset operations * Added fast indexing worker and updated other modules to start using it * Handled fast index worker on source update * Add support modals (#65) * Added fast indexing upgrade modal * Improved modal on smaller screens * Updated links to work again * Added donation modal * Reverted source fast index to 15 minutes * Removed unneeded HTML attributes from old alpine approach
59 lines
1.3 KiB
Elixir
59 lines
1.3 KiB
Elixir
alias Pinchflat.Repo
|
|
|
|
alias Pinchflat.Tasks.Task
|
|
alias Pinchflat.Sources.Source
|
|
alias Pinchflat.Media.MediaItem
|
|
alias Pinchflat.Tasks.SourceTasks
|
|
alias Pinchflat.Media.MediaMetadata
|
|
alias Pinchflat.Profiles.MediaProfile
|
|
|
|
alias Pinchflat.Tasks
|
|
alias Pinchflat.Media
|
|
alias Pinchflat.Profiles
|
|
alias Pinchflat.Sources
|
|
alias Pinchflat.Settings
|
|
|
|
alias Pinchflat.MediaClient.MediaDownloader
|
|
alias Pinchflat.YtDlp.Backend.Media, as: YtDlpMedia
|
|
alias Pinchflat.YtDlp.Backend.MediaCollection, as: YtDlpCollection
|
|
|
|
alias Pinchflat.Api.YoutubeRss
|
|
alias Pinchflat.Metadata.MetadataFileHelpers
|
|
|
|
alias Pinchflat.Utils.FilesystemUtils.FileFollowerServer
|
|
|
|
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
|
|
|
|
YtDlpCollection.get_source_details(source)
|
|
end
|
|
|
|
def ids(type) do
|
|
source =
|
|
case type do
|
|
:playlist -> playlist_url()
|
|
:channel -> channel_url()
|
|
end
|
|
|
|
YtDlpCollection.get_media_attributes_for_collection(source)
|
|
end
|
|
end
|
|
|
|
import IexHelpers
|