Help - Search - Members - Calendar
Full Version: Temporary meta data
Hydrogenaudio Forums > Hosted Forums > foobar2000 > Development - (fb2k)
skipyrich
Can I add a temporary custom meta field that will be kept only in memory? Or there are another methods to identify a playlist item that may be moved to another position or playlist later?
Cosmo
QUOTE(skipyrich)
Can I add a temporary custom meta field that will be kept only in memory?

Prefs > Database > Block tag update operations.
~ Files will not be altered; meta info will only be stored in the playlist (& database, if enabled). It will remain until you refresh / reload the file.
skipyrich
QUOTE(Cosmo @ Feb 1 2006, 01:42 AM)
Prefs > Database > Block tag update operations.
~ Files will not be altered; meta info will only be stored in the playlist (& database, if enabled). It will remain until you refresh / reload the file.
*


Thank you for your reply, but I don't want to block tags writing at all, I just want to identify the playlist item by any way...
I.e. (pseudocode):

CODE

class A : public menu_item_v2
{
   virtual void perform_command(...){
       data.get_item(0)->handle_temp_meta_put("my_meta_field", 1);
   }
};
class B : public play_callback
{
   virtual void on_playback_new_track(metadb_handle * track){
       if(track->handle_temp_meta_get("my_meta_field")){
           // do something
           track->handle_temp_meta_remove("my_meta_field");
       }
   }
};

foosion
No, that is not possible. You would have to maintain a mapping from handles to temporary data yourself.
skipyrich
Thank you.
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.