Skip to content

Handle missing artists for regular users #4092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

deluan
Copy link
Member

@deluan deluan commented May 21, 2025

Summary

  • add missing field to artist model
  • support missing flag when fetching artist indexes
  • mark artists with only missing albums as missing in GC
  • expose missing filter to UI wrapperDataProvider
  • update Subsonic browsing to exclude missing artists by default

Testing

  • make test

…anagement

Signed-off-by: Deluan <deluan@navidrome.org>
@deluan deluan marked this pull request as ready for review May 21, 2025 01:06
@deluan deluan linked an issue May 21, 2025 that may be closed by this pull request
3 tasks
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to 7eae053 in 1 minute and 56 seconds. Click for details.
  • Reviewed 302 lines of code in 7 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. model/artist.go:35
  • Draft comment:
    Ensure you update migration and docs for the new ‘Missing’ field in Artist.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the author to ensure that migrations and documentation are updated for a new field. It is not a specific code suggestion or a request for a test, and it doesn't point out a specific issue with the code. It falls under the rule of not asking the author to ensure something is done.
2. persistence/artist_repository.go:113
  • Draft comment:
    Consider defining the table name 'artist' as a constant (per consts.go) instead of hardcoding.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. server/subsonic/browsing.go:43
  • Draft comment:
    Log errors with structured key–value pairs; consider passing the error with a key (e.g. 'error', err).
  • Reason this comment was not posted:
    Comment was on unchanged code.
4. ui/src/dataProvider/wrapperDataProvider.js:27
  • Draft comment:
    Ensure the 'missing' filter is consistently applied on resources (e.g. 'artist') for non-admin users.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None

Workflow ID: wflow_XQi6df9BgL8pTkbk

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a missing flag on the Artist model and uses it to:

  • Automatically mark artists with only missing albums during GC.
  • Exclude missing artists by default in both the Subsonic API and UI data layer for regular users.
  • Visually dim missing artists in the artist list UI.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ui/src/dataProvider/wrapperDataProvider.js Add missing=false filter for non-admin users on artist fetches
ui/src/artist/ArtistList.jsx Dim rows for missing artists with an opacity style
server/subsonic/browsing.go Pass includeMissing=false to GetIndex in Subsonic browsing
persistence/persistence.go Insert a GC step to run markMissing on artists
persistence/artist_repository.go Add missing filter in GetIndex and implement markMissing
persistence/artist_repository_test.go New tests for missing-artist visibility for regular vs. admin
model/artist.go Add Missing field and update GetIndex signature
Comments suppressed due to low confidence (2)

persistence/artist_repository.go:257

  • [nitpick] The variable c for the row count returned by executeSQL is ambiguous. Consider renaming it to rowsAffected for clearer intent.
c, err := r.executeSQL(q)

persistence/artist_repository.go:249

  • [nitpick] The SQL string passed to Expr is indented, preserving leading spaces in the query text. For readability and to avoid embedding unnecessary whitespace, consider left-aligning or trimming the SQL.
q := Expr(`

@deluan deluan merged commit 453630d into master May 21, 2025
35 checks passed
@deluan deluan deleted the 3prau4-codex/add-missing-filter-for-artists-in-artist-repository branch May 21, 2025 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Artists of missing files still present in Non Admin Users
1 participant