Good to know it still works!
May I ask what made you use window msgs instead of sockets? Didn't actually thought about juggling hWnds around.
Couple of reasons, albeit not very good ones:
1. This library was primarily influenced by the ability to control Winamp via Window Messages.
2. Window Messages are easier to work with,
to some extentIn hindsight, especially after porting it to so many other languages, I agree it wasn't a great choice.
For that exact reason, I've been thinking of writing the next version from scratch, this time using, probably using protobuf via REST or gRPC or both.
I'm thinking of making something more universal and generalized, so that it works cross-platform.
The only thing driving me nuts are the return values of
Library_GetArtworkUrl // which leaves me with a path to a *.tmp file
and
Library_GetArtwork // (which, I know, is deprecated) drops a base64 encoded image (at least looks like a base64 string)
Probably because all the covers are embedded into my music files? idk
Somebody got a clue on how to obtain something image-ish?
I can't remember what it returns, but looking at the source code, all it does on the IPC side is call Library_GetArtworkUrl from the MusicBee plugin API.
Looking at the latest plugin API, there is a function called Library_GetArtworkEx (since api version 47):
bool Library_GetArtworkExDelegate(string sourceFileUrl, int index, bool retrievePictureData, ref PictureLocations pictureLocations, ref string pictureUrl, ref byte[] imageData);
This should do what you want, but unfortunately MusicBeeIPC is not updated for some time and doesn't support that function. (At the date of this writing, MusicBeeIPC only supports up to api version 33
)
I will take a look again soon at MusicBeeIPC's source code and see if I could update MusicBeeIPC to catch up with the latest plugin API. (Or if I should just get started working on the next revamped version)