I feel kinda stupid for asking this question, but googling for 20 minutes didn't bring up anything related to my problem.
So I'm writing a component for foobar2000, just getting started and trying to do basic things like getting the current track's meta-data.
Everything works fine for local files, but when playing a stream, I can't seem to get the stream's title as transmited by the server.
I read that foobar2000 tries to be smart and splits the stream title at the first - to fill the artist and title fields.
In foobar's playlist this even works as expected, I see artist and title assigned properly. However, in my component I get the station name as the title, and nothing as the artist.
Also, for debugging I tried reading directly from the file_info struct, but even there things are "messed up"
This is my test code:
metadb_handle_ptr track;
static_api_ptr_t<play_control>()->get_now_playing(track);
file_info_impl fi;
track->get_info(fi); // List ALL meta tags for this track
for (int i = fi.meta_get_count() - 1; i >= 0; --i) {
dlog("Have: %s(%d) -> %s", fi.meta_enum_name(i), (int)fi.meta_enum_value_count(i), fi.meta_enum_value(i, 0));
}
The result in my debug log is:
Have: url(1) -> http://www.facebook.com/BigBRadio143
Have: genre(1) -> Chinese Asian CPOP Cantonese Mandarin C-POP Asian Canto-Pop Mando-Pop Taiwan China Singapore Malaysia Taiwanese World International
Have: title(1) -> Big B Radio - CPOP | The Hot Station for Asian Music
In Winamp for example, this stream displays as "Jess Lee - Shoes (Big B Radio - CPOP | The Hot Station for Asian Music)"
Any help?