fix(downloads): Retry and Re-download take a cookie added after the failure
The login-wall copy tells the user to add their cookies and press Retry, but Retry kept the job on the shared asset the worker never attaches a cookie to, so it failed on the same wall. Resume now moves a pending/errored job onto the asset enqueue would pick with the cookie (never off a file or a download in flight). Re-download salted its fresh asset with the job's previous asset id, which the cookie gate cannot recompute, so even a cookie download rebuilt without the cookie. The rebuild salt is now the new asset's own id (plus the user's cookie salt when one applies), and is_authed_asset recognises it.
This commit is contained in:
@@ -410,7 +410,7 @@ def _process_job(job_id: int) -> None:
|
||||
asset_error,
|
||||
url=url,
|
||||
cookie_attached=credentials.is_authed_asset(
|
||||
asset.format_sig, formats.normalize(job.profile_snapshot), job.user_id, url
|
||||
asset, formats.normalize(job.profile_snapshot), job.user_id, url
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user