The changes aim to enhance the syntax and readability of the error messages in cmd_decrypt.py. The `raise` method syntax was corrected for better readability and adjustments were made to option usage error messages to improve clarity for the user.
The current change replaces generic `click.Abort()` statements with `click.BadOptionUsage()` to provide clearer error messages. These updates occur when there are conflicts in options chosen (e.g. choosing both `--all` and `--asin` or `--title`), no download option is chosen, or if both *ignore-podcasts* and *resolve-podcasts* options are selected together. It is now highlighted when the start date is after the end date in the parameters as well.
In the audible_cli decorators file, the click.Abort() function previously was not raising an exception in case an error occurred. This has been modified to correctly raise the exception using the "raise" keyword, thereby handling exceptions accurately.
* fix typo from 'podcats' to 'podcasts'
* missed on first check
* Deprecate resolve_podcats method
The resolve_podcats method is marked as deprecated, and a warning message is added to inform users. It is recommended to use the resolve_podcasts method. This commit helps to phase out the resolve_podcats method, aiming to eliminate any spelling errors in method naming.
* Fix typo in variable name
A typo in the variable name 'resolve_podcats' was corrected to 'resolve_podcasts'. This ensures that the conditional check operates as designed, without causing errors due to referencing a non-existent variable.
* Fix typos and improve readability in CHANGELOG.md
The commit fixes several typos including changing `resolve_podcats` to `resolve_podcasts` and fixing spelling of 'titles'. In addition, it formalizes the formatting of terms and phrases by using backticks around them for more readability. Furthermore, a missing comma has also been added to enhance sentence clarity.
---------
Co-authored-by: mkb79 <mkb79@hackitall.de>
* Update httpx requirement from <0.26.0,>=0.23.3 to >=0.23.3,<0.28.0
Updates the requirements on [httpx](https://github.com/encode/httpx) to permit the latest version.
- [Release notes](https://github.com/encode/httpx/releases)
- [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/httpx/compare/0.23.3...0.27.0)
---
updated-dependencies:
- dependency-name: httpx
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
* Update httpx version range in CHANGELOG
The CHANGELOG.md has been updated to reflect the changes in the httpx version range. This update includes a specification that the version should be >=0.23.3 and <0.28.0.
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mkb79 <mkb79@hackitall.de>
* Capitalize chapter type in get_content_metadata function
The get_content_metadata function in audible_cli's models.py file has been updated to capitalize the chapter type parameter. This ensures any case variations in the parameter will pass the assert condition, improving the handling of chapter types and method consistency.
* Update chapter type handling in cmd_download.py
Updated the cmd_download.py file to add a "config" choice to the chapter type and move the declaration of chapter_type to a more appropriate location. Also, the logging message has been updated to include the selected chapter type. This enhances traceability and ensures chapter type is handled consistently.
Flat chapters can be enabled by default in the config file. In the APP or profile section must be a setting `chapter_type = "flat"`.
* Update README with new `chapter_type` option
Updated README.md to include a new `chapter_type` field in both the APP and profile sections. This new field allows users to specify a chapter type for the `download` command with the `--chapter-type` option. If not provided, it defaults to "tree". This change aims to increase customizability for users.
* Update CHANGELOG to include new config file option
The CHANGELOG has been updated to reflect the addition of the ability to set a default chapter type in the config file. This allows the user to specify whether chapters should be downloaded as `flat` or `tree` type without having to state it each time a download command is given.
* Update audible-cli version
Version number has been updated from "0.3.2b2" to "0.3.2b3" in the _version.py file. This indicates a new build of the code that may include minor enhancements or bug fixes.
The version of the audible-cli package has been updated from "0.3.2b1" to "0.3.2b2". This version upgrade reflects changes made to the functionality or features of the package.
* Adjust get_content_metadata method in audible_cli model
Updated the get_content_metadata method to accept a new parameter 'chapter_type'. This adjustment also enables passing additional request parameters via **request_kwargs, allowing for more flexible HTTP requests.
* Add chapter type parameter to download chapters function
The download_chapters function has been updated to include 'chapter_type' as a parameter to support different types of chapters. It also modifies the get_content_metadata method to handle the new argument. This makes API interaction more adaptive by facilitating more varied request parameters.
* Update CHANGELOG.md
The version of audible-cli has been updated from 0.3.1 to 0.3.2b1. This update may involve bugs fixes, improvements, or new features in the audible-cli package.
* Replace HEAD request with faster GET request in downloader
Switched from a HEAD to a GET request without loading the body in the get_head_response method. This change improves the program's speed, as the HEAD request was taking considerably longer than a GET request to the same URI.
* Update CHANGELOG.md
* Improve podcast ignore feature in downloader
Added conditional code in the cmd_download.py file to ignore any items that are parent podcasts if the ignore_podcasts flag is set. This allows users to choose whether or not they want to download podcasts.
* Prevent mixing resolve and ignore podcasts options
Added a check in cmd_download.py to prevent combining both "resolve_podcasts" and "ignore_podcasts" options. A flag was added that aborts the process if both options are activated at once. Additionally, enhanced the feature to ignore parent podcasts during download, if "ignore_podcasts" flag is set.
* Update CHANGELOG.md
* refactor: rework plugin module
- using importlib.metadata over setuptools (pkg_resources) to get entrypoints
- help text now starts with ´(P)` for plugin commands
- plugin command help page now contains additional information about the source of the plugin
* catch asyncio.CancelledError
* add download parts feature
* fix downloading book in parts
* fix aax_fallback
* Update default timeout value to 30
* Refactor check_status_for_message function
* rework is_published method to take care about AudioPartd
* update cmd_download.py
* Update CHANGELOG.md
Fixing an issue with unawaited coroutines when the download command exited abnormal.
* Refactor consume function and queue_job function
* doc: Update CHANGELOG.md
- check a download link before reuse them
- `--ignore-errors` flag of the download command will now continue if on item failed to download
- add the `--start-date` and `--end-date` option to the `library list` and `library export` command
- make sure an item is published before downloading the aax, aaxc or pdf file