Download cutoff date for sources (#69)

* Added new uploaded_at column to media items

* Updated indexer to pull upload date

* Updates media item creation to update on conflict

* Added download cutoff date to sources

* Applies cutoff date logic to pending media logic

* Updated docs
This commit is contained in:
Kieran
2024-03-10 21:24:01 -07:00
committed by GitHub
parent 67d7f397d1
commit ccdcf8eec5
19 changed files with 304 additions and 68 deletions
@@ -0,0 +1,12 @@
defmodule Pinchflat.Repo.Migrations.AddUploadedAtToMediaItems do
use Ecto.Migration
def change do
alter table(:media_items) do
# Setting default to unix epoch so I can enforce not null BUT also easily
# identify records that were created before this column was added.
# Not a DateTime because yt-dlp only returns the date
add :upload_date, :date, default: "1970-01-01", null: false
end
end
end
@@ -0,0 +1,9 @@
defmodule Pinchflat.Repo.Migrations.AddDownloadCutoffDateToSources do
use Ecto.Migration
def change do
alter table(:sources) do
add :download_cutoff_date, :date
end
end
end