Skip to content

fix: use uuid.Nil consistently - #336

Open
jgonet wants to merge 1 commit into
gabehf:mainfrom
jgonet:jgonet/nil-uuid
Open

fix: use uuid.Nil consistently#336
jgonet wants to merge 1 commit into
gabehf:mainfrom
jgonet:jgonet/nil-uuid

Conversation

@jgonet

@jgonet jgonet commented Aug 2, 2026

Copy link
Copy Markdown

Description

MBID is optional but had two representation (nil, uuid.Nil). Subsonic and Last.fm providers checked only for nil, which requested empty UUID sometimes. We did two searches in that case. Part of my changes to improve importer speed.

See #335 for more information.

On ~500 listen import this improved time from 110s to 75s.

Note: I think this is only a bandaid fix – refactoring the uuid representation to be always UUID or NullUUID and mapping it on the edges (JSON API, sqlite) would be much better. I didn't go for it (first time contributor, not familiar enough with Go).

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Unit Tests
  • Manual Testing (please describe steps)

Checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have ensured my changes generate no new warnings

AI/LLM Usage

  • I disclose that 90% of the code in this PR is written by an LLM.
  • I fully understand all changes made by LLM-generated code.
  • I have not and will not use an LLM to write any part of this PR description or PR comments.

Note: I guided LLM heavily through implementation.

MBID is optional but had two representation (nil, uuid.Nil).
Subsonic and Last.fm providers checked only for nil, which
requested empty UUID sometimes. We did two searches in that case.

On ~500 listen import this improved time from 110s to 75s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant