Created
February 26, 2026 19:39
-
-
Save clemone210/e562b56ed1607b2e79e875628e92d2ff to your computer and use it in GitHub Desktop.
sabnzbd pre-queue script for removing .onion* in password meta tag.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import sys | |
| import os | |
| def main(): | |
| raw_password = os.environ.get('SAB_PASSWORD', '') | |
| job_name = os.environ.get('SAB_FILENAME', 'Job') | |
| if ".onion" in raw_password: | |
| clean_password = raw_password.split(".onion")[0] | |
| else: | |
| clean_password = raw_password | |
| base_name = job_name.replace(".nzb", "").replace(".NZB", "") | |
| new_job_string = f"{base_name} / {clean_password}" | |
| print("1") | |
| print(new_job_string) | |
| print("") | |
| print("") | |
| print("") | |
| print("") | |
| print("") | |
| sys.exit(0) | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment