Comments (5)
This was indeed a bug in
ampd
. I fixed it in this commit.OK, tested it and now it finds my cover art files alright. Thanks for fixing!
You're welcome!
However I suggest letting users configure the cover art filename pattern(s) they wish to use. This may come as a surprise, but in my case, within some folders I have more than one image file lying around; these can be back covers, cd pictures, liner notes etc. So using astherisks matches the first one in alphabetical order, regardless of which one it is.
In my last commit I've added the property artwork.filename.pattern
which can be used to specify the glob when looking for artwork.
But it's only used when browsing and not when viewing the queue.
This is because javampd
can only return the artwork for the file currently played. For browsing, ampd
itself looks for artwork using the value of mpd.music.directory
.
For this, we could just use
String.hashCode()
and it would be a better solution than what we have now.Yes, that's simple enough.
Implemented the use of String.hashCode()
on the associated branch
Unfortunately, the mpd library in use (javampd) does not offer an option to read specific id3 tags.
That's too bad. Think it could be requested as a new feature for
javampd
?
You could do that, yes. The repository is https://github.com/finnyb/javampd
But it seems inactive at the moment.
Also, sorry if my next question is dumb, but I really need some orientation in regards to
mpd
in general, so here goes: Can this client integrate a plugin to scrobble to last.fm? Or that's a concern formpd
itself?
There is no system for plugins in ampd
. Also, scrobbling is something which should be done on the server-side, in my opinion.
For example, I'm using mpdscribble
from ampd.
Hi there,
happy to hear you're enjoying ampd
!
To problem 1:
Things concering the cover cache and loading covers from MusicBrainz:
You're totally right, I also got some weird covers from the MusicBrainz API. Especially for non-popular tracks. I just checked the code and the "min score" for a cover to appear in the search query results is 60. The higher it is the higher is the chance it's the correct cover. To be honest I don't know which value would give us well balanced search results.
I made it configurable via the application.properties
, the name is min.score
. You could try different values with the -Dmin.score=XX
flag when starting ampd
.
You could also turn off the local cache completely via -Dlocal.cover.cache=false
. ampd
won't make any calls to the MusicBrainz API in that case.
No cover in the queue
This is indeed a bug, thanks for reporting it! Fixed that.
To problem 2:
It looks like ampd
fails to read the file. Java cannot read files on Windows that contain a colon (:
).
Just tested it on OSX and it works, so that's something I can't fix.
Personally, I would recommed to abstain from these "problematic" characters (:*\
etc.) in filenames.
For now, I placed a try catch
around it.
I'm glad to hear your ideas on it!
from ampd.
Sorry, I think I didn't make myself clear. My issue was thinking that the queue tab should display cover arts from local filesystem only. If I disable caching with MusicBrainz it just shows nothing. Is this by design as of right now?
About the second issue, I thought a simple way to avoid illegal characters in those filenames: calculating a cheap hash function from the artist/album name and using said hash to create and read files. So, instead of creating a cache file named DEVO - Q: Are We Not Men? [...].jpg
, it could be created like as89g63490g23as9fa8[...].jpg
and from the artist/album, refer to that same file by calculating said hash every time. That's my quick thought; I know it may not look clean...
Also btw some artists like Caetano Veloso happen to have released three, four albums named exactly the same, only in different years. This will fool the algorithm into thinking they're the same album when they're not. Maybe a better solution is to use the MusicBrainz album ID.
from ampd.
Hi there!
Sorry, I think I didn't make myself clear. My issue was thinking that the queue tab should display cover arts from local filesystem only. If I disable caching with MusicBrainz it just shows nothing. Is this by design as of right now?
This was indeed a bug in ampd
. I fixed it in this commit.
About the second issue, I thought a simple way to avoid illegal characters in those filenames: calculating a cheap hash function from the artist/album name and using said hash to create and read files. So, instead of creating a cache file named
DEVO - Q: Are We Not Men? [...].jpg
, it could be created likeas89g63490g23as9fa8[...].jpg
and from the artist/album, refer to that same file by calculating said hash every time. That's my quick thought; I know it may not look clean...
For this, we could just use String.hashCode()
and it would be a better solution than what we have now.
Also btw some artists like Caetano Veloso happen to have released three, four albums named exactly the same, only in different years. This will fool the algorithm into thinking they're the same album when they're not. Maybe a better solution is to use the MusicBrainz album ID.
Yes, this would also be my preferred solution. Unfortunately, the mpd library in use (javampd) does not offer an option to read specific id3 tags.
from ampd.
This was indeed a bug in
ampd
. I fixed it in this commit.
OK, tested it and now it finds my cover art files alright. Thanks for fixing!
However I suggest letting users configure the cover art filename pattern(s) they wish to use. This may come as a surprise, but in my case, within some folders I have more than one image file lying around; these can be back covers, cd pictures, liner notes etc. So using astherisks matches the first one in alphabetical order, regardless of which one it is.
For this, we could just use
String.hashCode()
and it would be a better solution than what we have now.
Yes, that's simple enough.
Unfortunately, the mpd library in use (javampd) does not offer an option to read specific id3 tags.
That's too bad. Think it could be requested as a new feature for javampd
?
Also, sorry if my next question is dumb, but I really need some orientation in regards to mpd
in general, so here goes:
Can this client integrate a plugin to scrobble to last.fm? Or that's a concern for mpd
itself?
from ampd.
Related Issues (20)
- Adding individual tracks from playlists HOT 4
- Custom Port HOT 2
- Error on Browse HOT 2
- Error: Could not write JSON: For input string: "0.000000" HOT 4
- Browse => Album (empty) HOT 7
- album art HOT 1
- Album art (cover.jpg) not being loaded HOT 1
- Connection is dropped on song with missing artist tag HOT 2
- ampd 1.5.4 – search menu item is inactive HOT 2
- Please improve search functionality. HOT 6
- 1.5.8 Browse Albums Error HOT 2
- Playlist edit results in HTTP 404 HOT 11
- Add functionality to edit playlists HOT 1
- Filter Radio Web Streams HOT 1
- Attempt to view playlist contents - too few arguments for "search" HOT 5
- Error fetching albums HOT 4
- Error when selectign a genre HOT 9
- Add skip forward/reverse buttons. HOT 3
- Reordering playing queue items HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ampd.