Skip to content

Commit

Permalink
Reactivate NZBKing
Browse files Browse the repository at this point in the history
  • Loading branch information
nzblnk committed Dec 22, 2022
1 parent 3a8fbc4 commit 5387050
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 NZBLNK
Copyright (c) 2022 NZBLNK

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
13 changes: 11 additions & 2 deletions src/nzbmonkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,14 @@ def search_nzb(header, password, search_engines, best_nzb, max_missing_files, ma
'downloadUrl': 'http://www.binsearch.info/?action=nzb&{id}=1&server=2',
'skip_segment_debug': False
},
'nzbking':
{
'name': 'NZBKing',
'searchUrl': 'https://www.nzbking.com/search/?q={0}',
'regex': r'href="/nzb:(?P<id>.*?)/".*"',
'downloadUrl': 'https://www.nzbking.com/nzb:{id}/',
'skip_segment_debug': True
},
'nzbindex':
{
'name': 'NZBIndex',
Expand Down Expand Up @@ -1483,6 +1491,7 @@ def main():
{'binsearch': cfg['Searchengines'].as_int('binsearch'),
'binsearch_alternative':
cfg['Searchengines'].as_int('binsearch_alternative'),
'nzbking': cfg['Searchengines'].as_int('nzbking'),
'nzbindex': cfg['Searchengines'].as_int('nzbindex')},
cfg['NZBCheck'].as_bool('best_nzb'),
cfg['NZBCheck'].get('max_missing_files', 2),
Expand Down Expand Up @@ -1534,7 +1543,8 @@ def main():
try:
res = requests.get(req_url, verify=False, timeout=REQUESTS_TIMEOUT * 2)
if res.status_code == 403:
print_and_wait(Col.FAIL + ' - Please use the API KEY not the NZB KEY in your config!' + Col.OFF, WAITING_TIME_LONG)
print_and_wait(Col.FAIL + ' - Please use the API KEY not the NZB KEY in your config!' + Col.OFF,
WAITING_TIME_LONG)
raise EnvironmentError

res = json.loads(res.text)
Expand All @@ -1551,7 +1561,6 @@ def main():
except (EnvironmentError, ValueError):
cat_choice = []


if ExeTypes.NZBGET.name == exe_target:

scheme = 'https' if exe_target_cfg.as_bool('ssl') else 'http'
Expand Down
6 changes: 4 additions & 2 deletions src/nzbmonkeyspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ def getSpec():
# 0 = disabled; 1-9 = enabled; 1-9 are also the order in which the search engines are used
# More than 1 server with the same order number is allowed
# Enable Binsearch
binsearch = integer(default = 2)
binsearch = integer(default = 3)
# Enable Binsearch - Alternative Server
binsearch_alternative = integer(default = 2)
binsearch_alternative = integer(default = 3)
# Enable NZBIndex
nzbindex = integer(default = 1)
# Enable NZBKing
nzbking = integer(default = 2)
""".split('\n'))
5 changes: 4 additions & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
"""
History
v0.2.9
- NZBKing is dead, long live the King
v0.2.8
- Fix #40 SABnzbd API compatibility
- Remove NZBKing (Rip!)
Expand Down Expand Up @@ -91,5 +94,5 @@
"""

__version__ = '0.2.8'
__version__ = '0.2.9'
__requires__ = ['pyperclip', 'requests', 'configobj', 'colorama', 'cryptography']

0 comments on commit 5387050

Please sign in to comment.