fix(downloads): treat recovered Patreon campaign-ID errors as non-fatal
When gallery-dl logs "[patreon][error] Failed to extract campaign ID" but then recovers via its /cw/<vanity> fallback and skips every file (all already archived), _categorize_error was flagging the [error] line as fatal and returning UNKNOWN_ERROR. Add "failed to extract campaign id" to the per-item error allowlist alongside "not allowed to view" and "unable to get post" so skip detection proceeds and the run is classified NO_NEW_CONTENT. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -434,12 +434,19 @@ class GalleryDLService:
|
||||
]
|
||||
has_actual_error = any(err in combined for err in actual_error_indicators)
|
||||
|
||||
# Per-item access warnings (e.g., "Not allowed to view post" on Patreon
|
||||
# /c/user/posts URLs) are normal in multi-post downloads where some posts
|
||||
# are paywalled. These shouldn't block skip detection when the overall
|
||||
# download proceeded successfully with skips.
|
||||
# Non-fatal error lines gallery-dl logs but recovers from. These shouldn't
|
||||
# block skip detection when the overall download proceeded successfully:
|
||||
# - "not allowed to view" / "unable to get post": per-item paywall warnings
|
||||
# on Patreon /c/user/posts URLs where some posts are paywalled.
|
||||
# - "failed to extract campaign id": logged when the vanity-URL HTML path
|
||||
# fails, but gallery-dl falls back to the /cw/<vanity> redirect and
|
||||
# recovers the campaign_id on its own.
|
||||
if has_actual_error and (skip_line_count > 0 or has_skip_text):
|
||||
per_item_patterns = ["not allowed to view", "unable to get post"]
|
||||
per_item_patterns = [
|
||||
"not allowed to view",
|
||||
"unable to get post",
|
||||
"failed to extract campaign id",
|
||||
]
|
||||
error_lines = [
|
||||
line for line in combined.split('\n')
|
||||
if any(ind in line for ind in actual_error_indicators)
|
||||
|
||||
Reference in New Issue
Block a user