Help - Search - Members - Calendar
Full Version: playlist_loader::is_our_content_type() problem
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
halabund
I am trying to implement a playlist reader for a certain playlist format. It works fine when the playlist is loaded from the hard disc. It works when the playlist is loaded from the web using File->Add location... and the URI contains the correct extension. But it does not work when the extension is not part of the URI even though the content type is sent correctly by the server (foobar2000 just inserts a single entry into the playlist, and treats it as an audio file, not as a playlist file).

It seems that the function playlist_loader::is_our_content_type() is not even being called. What am I doing wrong? When the file extension is not present, why isn't foobar checking the content type instead of blindly inserting the entry into playlist as an audio file?

I only have a class derived from playlist_loader in the component and nothing else.
foosion
You aren't doing anything wrong. Content type handling in playlist_loader::g_load_playlist() has been disabled at some point in the past to avoid opening every file. Since the current version allows getting the content type without opening a file, the code has been fixed to include this check again. However, you will not get the benefit of that until a new version of foobar2000 is released.

QUOTE(halabund @ Jul 29 2007, 23:53) *
I only have a class derived from playlist_loader in the component and nothing else.

Adding DECLARE_COMPONENT_VERSION wouldn't hurt, when you release it eventually. smile.gif
halabund
Thanks for the reply! smile.gif

QUOTE(foosion @ Jul 30 2007, 11:39) *
Adding DECLARE_COMPONENT_VERSION wouldn't hurt, when you release it eventually. smile.gif

I am still a beginner, so it might take a while until I get there... But---thanks to your tutorial---I did include a DECLARE_COMPONENT_VERSION smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.