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