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
455 stars 46 forks source link

Unable to prepare download #179

Closed megawubs closed 8 months ago

megawubs commented 8 months ago

Hi,

I'm trying to download this book: (asin) B0BFTDKG4L. But both from the cli as from the website I get this error:

<Errors>
  <Error>
    <Code>AUDIBLE_KINDLE_DOWNLOAD_ERROR</Code>
    <Message>Preparation of audio file failed : unable to load XML file, Unable to load : /audiblewords/content/bk/grph/004759/aax/bk_grph_004759_aax_lc_44_128_2_y_s4b.fro.</Message>
    <Title>Download Error</Title>
  </Error>
</Errors>

Is this a known problem for some books? Or do I just need to wait until it's fixed by Audible?

mkb79 commented 8 months ago

Hi,

which command you are running in the cli?

megawubs commented 8 months ago

audible -P [account] download -y --chapter --pdf --cover --cover-size=1215 --quality best --aax-fallback --asin B0BFTDKG4L

Without aax-fallback it just downloads the cover and chapter files

mkb79 commented 8 months ago

Can you run:

audible -P [account] api library/B0BFTDKG4L -p "response_groups=contributors, customer_rights, media, price, product_attrs, product_desc, product_extended_attrs, product_plan_details, product_plans, rating, sample, sku, series, reviews, ws4v, origin, relationships, review_attrs, categories, badge_types, category_ladders, claim_code_url, in_wishlist, is_archived, is_downloaded, is_finished, is_playable, is_removable, is_returnable, is_visible, listening_status, order_details, origin_asin, pdf_url, percent_complete, periodicals, provided_review, product_details" -i 4

I need the response for available_codecs, relationships, customer_rights and content_delivery_type please.

megawubs commented 8 months ago
{
  "available_codecs": [
    {
      "enhanced_codec": "LC_64_22050_stereo",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "aax_22_64"
    },
    {
      "enhanced_codec": "LC_64_44100_stereo",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "aax_44_64"
    },
    {
      "enhanced_codec": "LC_128_44100_stereo",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "aax_44_128"
    },
    {
      "enhanced_codec": "LC_32_22050_stereo",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "aax_22_32"
    },
    {
      "enhanced_codec": "mp444128",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "mp4_44_128"
    },
    {
      "enhanced_codec": "mp42232",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "mp4_22_32"
    },
    {
      "enhanced_codec": "mp42264",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "mp4_22_64"
    },
    {
      "enhanced_codec": "mp44464",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "mp4_44_64"
    },
    {
      "enhanced_codec": "aax",
      "format": "Enhanced",
      "is_kindle_enhanced": false,
      "name": "aax"
    }
  ],
  "relationships": [
    {
      "asin": "B00E819HPG",
      "content_delivery_type": "BookSeries",
      "relationship_to_product": "parent",
      "relationship_type": "series",
      "sequence": "2",
      "sku": "SE_RIES_004221",
      "sku_lite": "SE_RIES_004221",
      "sort": "2",
      "title": "The Riyria Chronicles",
      "url": "/pd/The-Riyria-Chronicles-Audiobook/B00E819HPG"
    }
  ],
  "customer_rights": {
    "is_consumable": true,
    "is_consumable_indefinitely": true,
    "is_consumable_offline": true,
    "is_consumable_until": null
  },
  "content_delivery_type": "SinglePartBook"
}
megawubs commented 8 months ago

I just tested with audible -P [account] download -y --chapter --pdf --cover --cover-size=1215 --quality best --aaxc --asin B0BFTDKG4L

And now it downloads 🤷🏼

mkb79 commented 8 months ago

Thank you for this information. It seams the audiobook is not downloadable as aax file. The aax-fallback option does not include this error for a fallback. Maybe I can add this fallback in a future release.

Edit: But in my opinion, you should only use aaxc.

megawubs commented 8 months ago

I've updated my script to use aaxc, thanks for looking into this!