Fast indexing (#58)
* 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
This commit is contained in:
@@ -12,14 +12,15 @@ defmodule Pinchflat.Media.MediaItem do
|
||||
alias Pinchflat.Media.MediaItemSearchIndex
|
||||
|
||||
@allowed_fields [
|
||||
# these fields are captured on indexing
|
||||
# these fields are captured on indexing (and again on download)
|
||||
:title,
|
||||
:media_id,
|
||||
:description,
|
||||
:original_url,
|
||||
:livestream,
|
||||
:source_id,
|
||||
# these fields are captured on download
|
||||
:short_form_content,
|
||||
# these fields are captured only on download
|
||||
:media_downloaded_at,
|
||||
:media_filepath,
|
||||
:media_size_bytes,
|
||||
@@ -27,7 +28,7 @@ defmodule Pinchflat.Media.MediaItem do
|
||||
:thumbnail_filepath,
|
||||
:metadata_filepath
|
||||
]
|
||||
@required_fields ~w(title original_url livestream media_id source_id)a
|
||||
@required_fields ~w(title original_url livestream media_id source_id short_form_content)a
|
||||
|
||||
schema "media_items" do
|
||||
field :title, :string
|
||||
@@ -35,6 +36,7 @@ defmodule Pinchflat.Media.MediaItem do
|
||||
field :description, :string
|
||||
field :original_url, :string
|
||||
field :livestream, :boolean, default: false
|
||||
field :short_form_content, :boolean, default: false
|
||||
field :media_downloaded_at, :utc_datetime
|
||||
|
||||
field :media_filepath, :string
|
||||
|
||||
Reference in New Issue
Block a user