Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_bestversion (Read 12822 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.


Reply #25
Why is there no static linking of MSVC runtimes. In this day and age it should be mandatory.

That was a conscious choice - I assumed people wouldn't want their components bloated by all linking to the same runtime statically. If that's not what the consensus is amongst component developers, I'd be happy to change it. What do other components tend to do? Are there any guidelines for this?

It depends on how the components implements this comparison. A lexicographic comparison (using strcmp) might fail due to inconsistent encoding of characters outside the Basic Multilingual Plane. See UTF-8 (section CESU-8) about the encoding of UTF-16 surrogate pairs in UTF-8.

I'm doing stricmp_utf8 on strings returned from the foobar metadb, which I thought were all UTF-8, which if I'm right would all work fine (I know a bit about character encodings, the bugs are just because it's all been a rush job!). Does foobar not convert tags on adding them to its database?



Reply #26
The foobar2000 core - and therefore the metadb - expect all string to be UTF-8 encoded. The issue could therefore be caused by input plugins or by tagging plugins. However, we shouldn't discuss this further until we have confirmed whether this is the cause of the problems. ChronoSphere, could you verify this yourself or upload two files which should be matched but aren't?


Reply #27
I have uploaded two sets of files here.


Reply #29
for set2:
- all tracks are in the media library
- tags contain a % in the middle of the tag -> results in foobar crash when executing foo_bestversion
- tags contain a % at the end of the tag -> no crash

I immediately thought about printf() when I read that. I went to GitHub and found multiple uses of console::printf in the first file I looked at, e.g.
/* line 285 */ console::printf(("Only one version of " + title + " exists in library").c_str());

There are several options for fixing this bug:
Code: [Select]
// Option 1
console::printf("Only one version of %s exists in library", title.c_str());
// Option 2
console::info(("Only one version of " + title + " exists in library").c_str());
// Option 3
console::formatter() << "Only one version of " << title.c_str() << " exists in library"; // Not sure whether the call to c_str is required.

I haven't checked the other files.


Reply #30
Of course; good call foosion. I didn't know about console::info.

I've fixed all the bugs and issues that have been mentioned so far and have put up a new release, on github since it now allows you to attach files to releases (which themselves are generated from tags - nice!).

You can grab it here:
foo_bestversion.fb2k-component, version 1.0.1

ChronoSphere, those files you sent me now work fine! Thanks for helping out.

I can't edit my original post; do I need some special forum privilege for that? Also how do I get this added to the components page on


Reply #31
I can confirm it was able to restore all my broken playlists now, great job!
You can't edit posts after a few hours from what I know, it's an intended change implemented some months ago. Don't know about the foobar component page.

edit: a minor thing: it looks like the sorting of the playlist is not kept when replacing. I just noticed it threw tracks all over the place on two playlists.


Reply #33
Hi all,

I've fixed the Unicode bugs and fixed the breakages that appear to have happened alongside the latest update. New version is uploaded here:

... incidentally, that's the best place to download new releases from now on. Also the VS redistributable is no longer required. I still can't edit my original post to change this information though


Reply #34
When this component is installed (1.0.2), opening the preferences dialogue of SACD (foo_input_sacd 0.9.6) crashes foobar to desktop on my computer.


Reply #35
Seems fixed in 1.0.3. Now I just have to figure out what the component can do for me in my playlists


Reply #36
When this component is installed (1.0.2), opening the preferences dialogue of SACD (foo_input_sacd 0.9.6) crashes foobar to desktop on my computer.

The settings dialog of foo_input_sacd 0.9.6 is sensitive to other plugins as well.  I'd forgotten that I had installed another hacked DSD ASIO output plugin.  After I removed that plugin and uninstalled all of my DSD related ASIO drivers then foo_input_sacd 0.9.6 worked fine.

Re: foo_bestversion

Reply #37
Reviving an old topic - sorry in advance... there hasn't been any development / interest? in this component for quite a while which I think is a shame as this plugin has great potential. There really is no better method to trim a large playlist based on titles and technical info.

I have some ideas that I would like to present and have written them down at foo_bestversion Github proposal. Hopefully someone finds this interesting enough to have a go at the code.