Skip to content

fix: Failed to play items with empty backdrop image list#969

Merged
PartyDonut merged 1 commit intoDonutWare:developfrom
dertasiu:develop
Apr 28, 2026
Merged

fix: Failed to play items with empty backdrop image list#969
PartyDonut merged 1 commit intoDonutWare:developfrom
dertasiu:develop

Conversation

@dertasiu
Copy link
Copy Markdown
Contributor

Pull Request Description

ImagesData.firstOrNull accessed backDrop[0] directly, throwing a RangeError when the list existed but was empty. Use List.firstOrNull instead to safely return null, fixing video playback with this specific circumstance.

Issue Being Fixed

I had an issue when playing a video in Linux and on iOS. The player would not load, it was stuck in "Loading" while the audio was playing in the background.

Tested On

  • Android
  • Android TV
  • iOS
  • Linux
  • Windows
  • macOS
  • Web

Checklist

  • Check that any changes are related to the issue at hand.

ImagesData.firstOrNull accessed backDrop[0] directly, throwing a
RangeError when the list existed but was empty. Use List.firstOrNull
instead to safely return null, fixing video playback on all platforms.

ImageData? get firstOrNull {
return primary ?? backDrop?[0];
return primary ?? backDrop?.firstOrNull;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel deep shame for making this mistake 😰.

Thanks for fixing it.

@PartyDonut PartyDonut added the bug Something isn't working label Apr 28, 2026
@PartyDonut PartyDonut merged commit 7aef3c3 into DonutWare:develop Apr 28, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this to Done in Fladder Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants