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

feat: improve cover selection algorithm #516

Closed
wants to merge 1 commit into from

Conversation

heimoshuiyu
Copy link

Hi,

Gonic is a fantastic project for local music streaming. However, I noticed that Gonic doesn't recognize some album covers. After digging into the code, I found that cover art can only be recognized if it follows certain fixed patterns. Most of my albums are downloaded from BitTorrent, so the naming of cover art varies. Here is a sample file list created by running find /data/ | grep -i -E '.png|.jpg|.jpeg|.webp|.gif ':

files.txt

To address this issue, I propose a simple but more effective way to select cover art from an album. Please check the code for details.

A docker images built on this PR is available: docker.io/heimoshuiyu/gonic:cover

@sentriz sentriz closed this in 453639e Sep 12, 2024
@sentriz
Copy link
Owner

sentriz commented Sep 12, 2024

thanks! i needed this for another project (this project will provide some lower level audio metadata and related functionality for Go) I implemented it there, and used your test cases. hoep you dont mind. thanks!

https://github.com/sentriz/wrtag/blob/master/coverparse/coverparse.go

@heimoshuiyu heimoshuiyu deleted the cover branch September 25, 2024 01:40
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.

2 participants