IPB

Welcome Guest ( Log In | Register )

2 Pages V  < 1 2  
Reply to this topicStart new topic
foo_bestversion, Picks the best versions of tracks from library (+last.fm top tracks)
hymerman
post Feb 7 2014, 11:05
Post #26





Group: Members
Posts: 85
Joined: 1-June 05
Member No.: 22429



QUOTE (mudlord @ Feb 7 2014, 02:21) *
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?

QUOTE (foosion @ Feb 7 2014, 10:39) *
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?
Go to the top of the page
+Quote Post
foosion
post Feb 7 2014, 15:16
Post #27





Group: FB2K Moderator (Donating)
Posts: 4439
Joined: 24-February 03
Member No.: 5153



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?

This post has been edited by foosion: Feb 7 2014, 15:17


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
ChronoSphere
post Feb 7 2014, 17:03
Post #28





Group: Members
Posts: 507
Joined: 11-March 07
Member No.: 41384



I have uploaded two sets of files here.
Go to the top of the page
+Quote Post
hymerman
post Feb 7 2014, 17:23
Post #29





Group: Members
Posts: 85
Joined: 1-June 05
Member No.: 22429



Added a separate bug about this here:

https://github.com/hymerman/foo_bestversion/issues/15
Go to the top of the page
+Quote Post
foosion
post Feb 7 2014, 18:51
Post #30





Group: FB2K Moderator (Donating)
Posts: 4439
Joined: 24-February 03
Member No.: 5153



QUOTE
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.
QUOTE (https://github.com/hymerman/foo_bestversion/blob/master/foo_bestversion/BestVersion.cpp)
/* line 285 */ console::printf(("Only one version of " + title + " exists in library").c_str());

There are several options for fixing this bug:
CODE
// 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.

This post has been edited by foosion: Feb 7 2014, 18:52


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
hymerman
post Feb 7 2014, 22:19
Post #31





Group: Members
Posts: 85
Joined: 1-June 05
Member No.: 22429



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 foobar2000.org?
Go to the top of the page
+Quote Post
ChronoSphere
post Feb 7 2014, 22:44
Post #32





Group: Members
Posts: 507
Joined: 11-March 07
Member No.: 41384



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.

This post has been edited by ChronoSphere: Feb 7 2014, 22:53
Go to the top of the page
+Quote Post
Robertina
post Feb 8 2014, 01:22
Post #33





Group: Members
Posts: 1306
Joined: 4-January 09
Member No.: 65169



QUOTE (hymerman @ Feb 7 2014, 10:19) *
Also how do I get this added to the components page on foobar2000.org?

http://www.hydrogenaudio.org/forums/index....showtopic=82691
Go to the top of the page
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th September 2014 - 21:47