fix: reduce pending deletion window from 7 days to 2 hours
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1067,7 +1067,7 @@ def update_progress(
|
|||||||
user_id=current_user.id, video_id=video_id, status="complete"
|
user_id=current_user.id, video_id=video_id, status="complete"
|
||||||
).filter(Download.pending_delete_at.is_(None)).first()
|
).filter(Download.pending_delete_at.is_(None)).first()
|
||||||
if dl:
|
if dl:
|
||||||
dl.pending_delete_at = datetime.utcnow() + timedelta(days=7)
|
dl.pending_delete_at = datetime.utcnow() + timedelta(hours=2)
|
||||||
elif body.watched and prev_watched:
|
elif body.watched and prev_watched:
|
||||||
# Rewatch — strongest positive signal
|
# Rewatch — strongest positive signal
|
||||||
uv.rewatch_count = (uv.rewatch_count or 0) + 1
|
uv.rewatch_count = (uv.rewatch_count or 0) + 1
|
||||||
@@ -1092,7 +1092,7 @@ def update_progress(
|
|||||||
user_id=current_user.id, video_id=video_id, status="complete"
|
user_id=current_user.id, video_id=video_id, status="complete"
|
||||||
).filter(Download.pending_delete_at.is_(None)).first()
|
).filter(Download.pending_delete_at.is_(None)).first()
|
||||||
if dl:
|
if dl:
|
||||||
dl.pending_delete_at = datetime.utcnow() + timedelta(days=7)
|
dl.pending_delete_at = datetime.utcnow() + timedelta(hours=2)
|
||||||
|
|
||||||
db.commit()
|
db.commit()
|
||||||
return {"ok": True}
|
return {"ok": True}
|
||||||
|
|||||||
Reference in New Issue
Block a user