Skip to content

KeyError during export when API items miss required fields (related to #808) #809

@Mnyut23

Description

@Mnyut23

name: Bug report
about: Create a report to help us improve
title: 'KeyError during export when API items miss required fields (related to #808)'
labels: bug
assignees: ''

Addon used

  • Amazon VOD (plugin.video.amazon-test)

  • Browser Launcher (plugin.program.browser.launcher)

  • Addon version: 1.1.8+matrix.1

Account type

  • primevideo.com
  • amazon.de

System Setup (please provide the following information):

  • Hardware: NVIDIA Shield TV
  • OS version: Android TV
  • Kodi version number: 21.3 (Omega)

Upload Logs
kodi.log
Pateched files
export.py
android_api.py

Describe the bug
When exporting the watchlist or library, the addon can crash with KeyError exceptions if Amazon returns items with missing fields.

In android_api.py (getInfos()), some API responses do not contain a title (and sometimes contentType). The code assumes these fields always exist and fails with:
KeyError: 'title'

In export.py, certain episode-like items (trailers, featurettes, specials) are treated as episodes but do not provide an episode number. The export code assumes season and episode are always present and fails with:
KeyError: 'episode'

When this happens, the export process aborts and can result in incomplete library updates.

This is related to issue #808, which shows a similar KeyError caused by missing API fields, but occurs in a different code path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions