New English meme and flyer set, retire Dutch-text gallery images
This commit is contained in:
@@ -37,6 +37,15 @@ def upsert_media(filename, kind, caption, position, width, height, phash, thumb_
|
||||
return fields["uid"]
|
||||
|
||||
|
||||
def retire_media(filename):
|
||||
existing = get_media_by_file(filename)
|
||||
if not existing or existing.get("deleted_at"):
|
||||
return False
|
||||
stamp = now_iso()
|
||||
db["media_items"].update({"id": existing["id"], "deleted_at": stamp, "deleted_by": "system", "updated_at": stamp}, ["id"])
|
||||
return True
|
||||
|
||||
|
||||
def count_media(kind=None):
|
||||
if "media_items" not in db.tables:
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user