Skip to content

Refresh a stale dl link instead of retrying it forever - #5

Open
nickwolf wants to merge 1 commit into
CampingAvocado:mainfrom
nickwolf:fix/stale-dl-link
Open

Refresh a stale dl link instead of retrying it forever#5
nickwolf wants to merge 1 commit into
CampingAvocado:mainfrom
nickwolf:fix/stale-dl-link

Conversation

@nickwolf

Copy link
Copy Markdown

A dl hash goes stale after a while and the site then answers with something that isn't a torrent. The grab fails on parsing with "malformed bencode: A dictionary is not properly sorted", which doesn't hint at the real cause, and the selection stays put, so every downloader run asks for it again and never gets anywhere.

This refreshes the dl link once from the search API, which already returns dl, and retries with the fresh one. If the item is still bookmarked that just fixes it. If the link can't be refreshed, the selection gets dropped so we stop asking the site for it on every pass. It stays on the errors page with a clearer message, and restoring it from the selected page retries.

I ran into it on a torrent I'd unbookmarked after it had been selected. It had been retried on every run for two days.

When a dl hash goes stale the site answers with something that isn't a
torrent, so the grab fails on parsing and the error says "malformed bencode",
which doesn't point at the cause. The selection stays put, so every downloader
run asks for it again and never succeeds.

Refresh the dl link once from the search API, which already returns dl, and
retry with it. If it can't be refreshed, drop the selection so we stop asking
the site for it every pass. It stays on the errors page with a clearer message,
and restoring it from the selected page retries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant