Skip to content

Commit

Permalink
Enable external access to sabnzbd and fix major issues
Browse files Browse the repository at this point in the history
Signed-off-by: anasty17 <[email protected]>
  • Loading branch information
anasty17 committed May 15, 2024
1 parent e60f0b6 commit 7bda40c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,12 @@ quotes, even if it's `Int`, `Bool` or `List`.

- `USENET_SERVERS`: list of dictionaries, you can add as much as you want and there is a button for servers in sabnzbd settings to edit current servers and add new servers.

***[{'name': 'main', 'host': '', 'port': 5126, 'timeout': 60, 'username': '', 'password': '', 'connections': 8, 'ssl': 1, 'ssl_verify': 2, 'ssl_ciphers': '', 'enable': 1, 'required': 0, 'optional': 0, 'retention': 0, 'send_group': 0, 'priority': 0}]***
***[{'name': 'main', 'host': '', 'port': 563, 'timeout': 60, 'username': '', 'password': '', 'connections': 8, 'ssl': 1, 'ssl_verify': 2, 'ssl_ciphers': '', 'enable': 1, 'required': 0, 'optional': 0, 'retention': 0, 'send_group': 0, 'priority': 0}]***

- [READ THIS FOR MORE INFORMATION](https://sabnzbd.org/wiki/configuration/4.2/servers)

- **NOTE**: Enable port 8070 in your vps to access sabnzbd full web interface

**10. RSS**

- `RSS_DELAY`: Time in seconds for rss refresh interval. Recommended `600` second at least. Default is `600` in
Expand Down Expand Up @@ -833,4 +836,4 @@ ETH Address:
0xf798a8a1c72d593e16d8f3bb619ebd1a093c7309
```

-----
-----
2 changes: 1 addition & 1 deletion aria-nox-nzb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ aria2c --allow-overwrite=true --auto-file-renaming=true --bt-enable-lpd=true --b
--content-disposition-default-utf8=true --user-agent=Wget/1.12 --peer-agent=qBittorrent/4.5.2 --quiet=true \
--summary-interval=0 --max-upload-limit=1K
qbittorrent-nox -d --profile="$(pwd)"
sabnzbdplus -f sabnzbd/SABnzbd.ini -s 127.0.0.1:8070 -b 0 -d -c -l 0 --console
sabnzbdplus -f sabnzbd/SABnzbd.ini -s :::8070 -b 0 -d -c -l 0 --console
2 changes: 1 addition & 1 deletion bot/helper/mirror_leech_utils/status_utils/nzb_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async def get_download(client, nzo_id, old_info=None):
if res["queue"]["slots"]:
slot = res["queue"]["slots"][0]
if msg := slot["labels"]:
LOGGER.warning(msg.join(" | "))
LOGGER.warning(" | ".join(msg))
return slot
return old_info
except Exception as e:
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ services:
ports:
- "80:80"
- "8080:8080"
- "8070:8070"
4 changes: 2 additions & 2 deletions sabnzbd/SABnzbd.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ check_new_rel = 1
auto_browser = 1
language = en
enable_https_verification = 1
host = 127.0.0.1
host = ::
port = 8070
https_port = ""
username = ""
Expand All @@ -30,7 +30,7 @@ https_cert = server.cert
https_key = server.key
https_chain = ""
enable_https = 0
inet_exposure = 0
inet_exposure = 4
api_key = mltb
nzb_key = ""
socks5_proxy_url = ""
Expand Down
4 changes: 4 additions & 0 deletions sabnzbdapi/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ async def call(
params |= kwargs
requests_kwargs = {**self._HTTPX_REQUETS_ARGS, **requests_args}
retries = 5
response = None
for retry_count in range(retries):
try:
res = await session.request(
Expand All @@ -81,11 +82,14 @@ async def call(
**requests_kwargs,
)
response = res.json()
break
except DecodingError as e:
raise DecodingError(f"Failed to decode response!: {res.text}") from e
except APIConnectionError as err:
if retry_count >= (retries - 1):
raise err
if response is None:
raise APIConnectionError("Failed to connect to API!")
return response

async def check_login(self):
Expand Down

0 comments on commit 7bda40c

Please sign in to comment.