mkb79 / audible-cli

A command line interface for audible package. With the cli you can download your Audible books, cover, chapter files.
GNU Affero General Public License v3.0
469 stars 47 forks source link

`decrypt` option `-t, --ignore-missing-chapters` should use chapters from chapter JSON file on mismatch with built-in chapters #174

Closed vwkd closed 10 months ago

vwkd commented 10 months ago

The decrypt subcommand has an option -r, --rebuild-chapters to rebuild chapters from the chapters JSON file. Currently, if these chapters mismatch the built-in chapters in the audio file, it throws. The option -t, --ignore-missing-chapters then allows to default to the built-in chapters in the audio file instead.

This seems to be the wrong way around. It seems, if chapters mismatch it's that the built-in chapters in the audio file are wrong and not in the chapters JSON file. Audible itself seems to always default to the chapters from the chapters JSON file instead of the built-in chapters in the audio file.

The -t, --ignore-missing-chapters should ignore the built-in chapters in the audio file and instead use the chapters from the chapters JSON file.

Tangentially, since the audio file often has spurious extra chapters instead of missing chapters, the option could be renamed to -t, --ignore-incorrect-chapters, or similar.