mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
calibredb: Fix use of ranges when specifying ids for the remove command
This commit is contained in:
parent
43f484f3e7
commit
89c4f07720
@ -332,8 +332,8 @@ def do_remove(db, ids):
|
||||
for y in x:
|
||||
db.delete_book(y)
|
||||
|
||||
send_message()
|
||||
db.clean()
|
||||
send_message()
|
||||
|
||||
def remove_option_parser():
|
||||
return get_parser(_(
|
||||
@ -358,7 +358,7 @@ def command_remove(args, dbpath):
|
||||
for x in args[1].split(','):
|
||||
y = x.split('-')
|
||||
if len(y) > 1:
|
||||
ids.append(range(int(y[0], int(y[1]))))
|
||||
ids.extend(range(int(y[0]), int(y[1])))
|
||||
else:
|
||||
ids.append(int(y[0]))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user