Skip to content
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

Fix image stuttering. #3035

Merged
merged 6 commits into from
May 25, 2024
Merged

Fix image stuttering. #3035

merged 6 commits into from
May 25, 2024

Conversation

caiocotts
Copy link
Contributor

Fix AlbumGrid shaking when a non-square album cover is rendered.

@@ -64,8 +64,9 @@ func (api *Router) GetCoverArt(w http.ResponseWriter, r *http.Request) (*respons
p := req.Params(r)
id, _ := p.String("id")
size := p.IntOr("size", 0)
square := p.BoolOr("square", false)
Copy link
Contributor

Choose a reason for hiding this comment

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

"square" is not a parameter for Subsonic or OpenSubsonic getCoverArt. Probably can just pass false directly

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh... looks like the web UI uses the subsonic api to fetch images?

Copy link
Member

@deluan deluan May 19, 2024

Choose a reason for hiding this comment

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

Yeah, I proposed this. This is a quick "hack" to fix an issue in the (current) WebUI.
I don't mean to document and/or propose this to OpenSubsonic, it is just an internal thing.

For the new UI we will introduce a proper native artwork endpoint, and this parameter will be removed from the getCoverArt endpoint.

Copy link
Member

@deluan deluan left a comment

Choose a reason for hiding this comment

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

Looking good, please see my comments below

core/artwork/reader_resized.go Show resolved Hide resolved
Copy link

github-actions bot commented May 24, 2024

Download the artifacts for this pull request:

Copy link
Member

@deluan deluan left a comment

Choose a reason for hiding this comment

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

Nice tests. A couple of nitpicks and we should be good to merge

core/artwork/artwork_internal_test.go Outdated Show resolved Hide resolved
core/artwork/artwork_internal_test.go Outdated Show resolved Hide resolved
@deluan deluan merged commit 0488fb9 into navidrome:master May 25, 2024
5 checks passed
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.

None yet

3 participants