-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Handle missing artists for regular users #4092
Conversation
…anagement Signed-off-by: Deluan <deluan@navidrome.org>
There was a problem hiding this 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 in7
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%
<= threshold50%
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%
<= threshold50%
None
Workflow ID: wflow_XQi6df9BgL8pTkbk
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
There was a problem hiding this 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 byexecuteSQL
is ambiguous. Consider renaming it torowsAffected
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(`
Summary
missing
field to artist modelTesting
make test