sane-bt-search: increase default result count 5 -> 12
This commit is contained in:
parent
296a48caf1
commit
f11f91b9fc
|
@ -6,15 +6,6 @@ usage: sane-bt-search [options] <query_string>
|
|||
|
||||
searches Jackett for torrent files matching the title.
|
||||
returns select results and magnet links.
|
||||
|
||||
options:
|
||||
--full display all results
|
||||
--help show this help message and exit
|
||||
--manga show only manga results
|
||||
--h265 show only H.265 video (HEVC)
|
||||
--json output one json document instead of a human-readable table
|
||||
--top=<n> show the <n> top rated torrents (default: 5)
|
||||
--verbose show more information, useful for debugging/development
|
||||
"""
|
||||
|
||||
# about Jackett
|
||||
|
@ -43,6 +34,8 @@ ENDPOINTS = dict(
|
|||
# results_torznab="api/v2.0/indexers/all/results/torznab"
|
||||
)
|
||||
|
||||
DEFAULT_RESULT_COUNT = 12
|
||||
|
||||
epoch = datetime(1970, 1, 1)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -275,7 +268,7 @@ def main(args: list[str]):
|
|||
|
||||
parser = argparse.ArgumentParser(description='search torrent trackers')
|
||||
parser.add_argument('--full', action='store_true', help='show all results')
|
||||
parser.add_argument('--top', help='how many results to show (default: 5)')
|
||||
parser.add_argument('--top', help=f'how many results to show (default: {DEFAULT_RESULT_COUNT})')
|
||||
parser.add_argument('--sort-by', default='seeders', help='how to rank matches (seeders, tracker)')
|
||||
parser.add_argument('--json', action='store_true', help='output results in json')
|
||||
parser.add_argument('--verbose', action='store_true')
|
||||
|
@ -298,7 +291,7 @@ def main(args: list[str]):
|
|||
ordered_results = sort_results(filtered_results, args.sort_by)
|
||||
|
||||
if not args.full:
|
||||
ordered_results = ordered_results[:int(args.top or "5")]
|
||||
ordered_results = ordered_results[:int(args.top or str(DEFAULT_RESULT_COUNT))]
|
||||
|
||||
format_results(all_results, ordered_results, args.json)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user