mirror of
				https://github.com/KevinMidboe/delugeClient.git
				synced 2025-10-29 12:00:13 +00:00 
			
		
		
		
	Renamed cli params for clearity and consistency
This commit is contained in:
		| @@ -3,20 +3,22 @@ | |||||||
|  |  | ||||||
| """Custom delugeRPC client | """Custom delugeRPC client | ||||||
| Usage: | Usage: | ||||||
|    deluge_cli add MAGNET [DIR] [--json | --debug | --warning | --error] |    deluge_cli add MAGNET [DIR] [--json | --debug | --info | --warning | --error] | ||||||
|    deluge_cli search NAME [--json] |    deluge_cli search QUERY [--json] | ||||||
|    deluge_cli get  TORRENT [--json | --debug | --warning | --error] |    deluge_cli get ID [--json | --debug | --warning | --error] | ||||||
|    deluge_cli ls [--downloading | --seeding | --paused | --json] |    deluge_cli ls [--downloading | --seeding | --paused | --json] | ||||||
|    deluge_cli toggle TORRENT |    deluge_cli toggle TORRENT | ||||||
|    deluge_cli progress [--json] |    deluge_cli progress [--json] | ||||||
|    deluge_cli rm NAME [--destroy] [--debug | --warning | --error] |    deluge_cli rm ID [--destroy] [--debug | --warning | --error] | ||||||
|    deluge_cli (-h | --help) |    deluge_cli (-h | --help) | ||||||
|    deluge_cli --version |    deluge_cli --version | ||||||
|  |  | ||||||
| Arguments: | Arguments: | ||||||
|    MAGNET        Magnet link to add |    MAGNET        Magnet link to add | ||||||
|    DIR           Directory to save to |    DIR           Directory to save to | ||||||
|    TORRENT       A selected torrent |    ID            A torrent hash | ||||||
|  |    QUERY         Query search string | ||||||
|  |  | ||||||
|  |  | ||||||
| Options: | Options: | ||||||
|    -h --help     Show this screen |    -h --help     Show this screen | ||||||
| @@ -75,10 +77,9 @@ def main(): | |||||||
|   # Get config settings |   # Get config settings | ||||||
|   deluge = Deluge() |   deluge = Deluge() | ||||||
|  |  | ||||||
|   _id = arguments['TORRENT'] |   _id = arguments['ID'] | ||||||
|   query = arguments['NAME'] |  | ||||||
|   magnet = arguments['MAGNET'] |   magnet = arguments['MAGNET'] | ||||||
|   name = arguments['NAME'] |   query = arguments['QUERY'] | ||||||
|   _filter = [ a[2:] for a in ['--downloading', '--seeding', '--paused'] if arguments[a] ] |   _filter = [ a[2:] for a in ['--downloading', '--seeding', '--paused'] if arguments[a] ] | ||||||
|  |  | ||||||
|   response = None |   response = None | ||||||
| @@ -118,11 +119,16 @@ def main(): | |||||||
|  |  | ||||||
|   elif arguments['rm']: |   elif arguments['rm']: | ||||||
|     destroy = arguments['--destroy'] |     destroy = arguments['--destroy'] | ||||||
|     logger.info('Remove by name: {}.'.format(name)) |     logger.debug('Remove by id: {}.'.format(_id)) | ||||||
|  |  | ||||||
|     if destroy: |     if destroy: | ||||||
|       logger.info('Destroy set, removing files') |       logger.info('Destroy set, removing files') | ||||||
|       deluge.remove(name, destroy) |  | ||||||
|  |     if not _id: | ||||||
|  |       logger.error("Unable to remove. No id supplied.") | ||||||
|  |       return | ||||||
|  |  | ||||||
|  |     deluge.remove(_id, destroy) | ||||||
|  |  | ||||||
|   try: |   try: | ||||||
|     if arguments['--json']: |     if arguments['--json']: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user