Skip to content
This repository was archived by the owner on Jun 14, 2026. It is now read-only.

fix(trackers/is): successful upload detection - #1372

Merged
Audionut merged 1 commit into
masterfrom
fix/IS-successful-upload-detection
May 19, 2026
Merged

Audionut merged 1 commit into
masterfrom
fix/IS-successful-upload-detection

Conversation

@wastaken7

@wastaken7 wastaken7 commented May 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Improvements
    • Enhanced upload success detection to recognize multiple possible success indicators, improving reliability of upload verification.
    • Updated error messages to provide clearer feedback when upload validation fails.

Review Change Stack

@github-actions

Copy link
Copy Markdown

Thanks for taking the time to contribute to this project. Upload Assistant is currently in a complete rewrite, and no new development is being conducted on this python source at this time.

If you have come this far, please feel free to leave open, any pull requests regarding new sites being added to the source, as these can serve as the baseline for later conversion.

If your pull request relates to a critical bug, this will be addressed in this code base, and a new release published as needed.

If your pull request only addresses a quite minor bug, it is not likely to be addressed in this code base.

Details for the new code base will follow at a later date.

@coderabbitai

coderabbitai Bot commented May 17, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

CookieAuthUploader gains optional success_list parameter for matching multiple success strings during upload detection. Validation enforces exactly one success indicator, success detection checks success_list entries in response, and failure handling threads this parameter through with updated messaging. IS tracker applies this to accept two different success phrases.

Changes

Success list support

Layer / File(s) Summary
Add success_list parameter and validation
src/cookie_auth.py
handle_upload signature accepts optional success_list parameter; validation logic enforces mutual exclusivity across success_status_code, error_text, success_text, and success_list.
Implement success_list detection in response
src/cookie_auth.py
Success-check condition is expanded to treat upload as successful when any element from success_list appears in response body.
Thread success_list through failure handler
src/cookie_auth.py
handle_upload passes success_list to handle_failed_upload; handle_failed_upload signature accepts success_list and generates "could not find any of the success strings" message when applicable.
Use success_list in IS tracker
src/trackers/IS.py
IS.upload passes success_list containing two acceptable success phrases instead of single success_text string.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A list of success paths, not just one string,
Multiple ways to know the torrent takes wing,
From cookie auth's layers to IS tracker's call,
Success now has choices—we welcome them all! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically identifies the main change: fixing successful upload detection for the IS tracker by expanding it to use a success_list parameter.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/IS-successful-upload-detection

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@wastaken7 wastaken7 linked an issue May 17, 2026 that may be closed by this pull request

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/cookie_auth.py (1)

545-545: ⚡ Quick win

Add parentheses for operator precedence clarity.

The chained and/or expression is logically correct but difficult to parse. Explicit parentheses improve readability and prevent future misunderstandings.

♻️ Proposed fix
-                    if success_text and success_text in response.text or success_list and any(item in response.text for item in success_list):
+                    if (success_text and success_text in response.text) or (success_list and any(item in response.text for item in success_list)):
                         success = True
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cookie_auth.py` at line 545, The conditional mixing and/or is hard to
parse—wrap the two conjunctive parts in parentheses so precedence is explicit:
change the condition to (success_text and success_text in response.text) or
(success_list and any(item in response.text for item in success_list)); keep the
rest of the line (response variable and logic) unchanged and update the line
using the existing symbols success_text, success_list, and response.text.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/cookie_auth.py`:
- Line 545: The conditional mixing and/or is hard to parse—wrap the two
conjunctive parts in parentheses so precedence is explicit: change the condition
to (success_text and success_text in response.text) or (success_list and
any(item in response.text for item in success_list)); keep the rest of the line
(response variable and logic) unchanged and update the line using the existing
symbols success_text, success_list, and response.text.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: af038432-412e-4bb0-a817-253113ad9b42

📥 Commits

Reviewing files that changed from the base of the PR and between c8c573d and 720da28.

📒 Files selected for processing (2)
  • src/cookie_auth.py
  • src/trackers/IS.py

@Audionut
Audionut merged commit 0f827e3 into master May 19, 2026
6 checks passed
@Audionut
Audionut deleted the fix/IS-successful-upload-detection branch May 19, 2026 21:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IS: upload reported as potentially unsuccessful but is successful

2 participants