HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: Fermion on 2006-06-26 16:59:24

Title: foo_custominfo
Post by: Fermion on 2006-06-26 16:59:24
Introduction
It is basically a 0.9 successor for Quicktag SQL (http://www.hydrogenaudio.org/forums/index.php?showtopic=31803), that allows you to set info fields for files without modifying them. Fields can be set using context menu commands that can be customized in the component preferences. Fields can be accessed in title formatting scripts by using simple variables like %RATING% etc (or functions, which are explained below).

I've also been working on a mini-sdk that allows other components to set their own fields using foo_custominfo. And I hope that components like foo_playcount would some day add an option for this. The sdk also has an interface for implementing other methods for storing the information, in case someone wants to export the info to MySQL or something.

Download here (http://www.tkk.fi/~tahlberg/foo)

Installation & Configuration
Just copy the dll file to fb2k\components as usual. Open "Preferences\Tools\Custom info". Select a method for storing custominfo data and press "Switch" button.
- Foobar2k config file: saves all info fields in foobar's configuration file. Reasonable loading time, fast reading of info, fast writing of info. This is also insecure, you will lose all changes since the last config file saving if foobar crashes or something.
- Text file (foobar2kdir\custominfo.txt): Utf-8 encoded text file (which shouldn't be modified though). Slow loading, fast reading of info, fast writing of info. This is also insecure, changes are not written to disk until you exit foobar.
- SQLite database (foobar2kdir\custominfo_sqlite.db): Slow loading, fast reading of info, slow writing of info. Changes are immediately written to disk which is why I personally recommend this option.

Available functions in titleformatting scripts
- $cinfo(X,Y). Returns value with field name X and index Y. Similar to $meta(X,Y).
- $cinfo_num(X). Number of values in field X. Similar to $meta_num(X).
- $cinfo_sep(X,Y,Z). Returns all values in field X separated with strings Y & Z as in $meta_sep(X,Y,Z).
- $cinfo_list(X,Y). Returns all custominfo values for current track using Y as a separator between field name and value, and X as separator between field/value-pairs.

Some advanced features in context menu commands
- You can set several fields at a time by separating field names and values with "|". For example "MYFIELD1|MYFIELD2|MYFIELD3" with corresponding value string "value1|value2|value3".
- Use # in front of field name to add new value, instead of replacing existing values. This can also be combined with the separators, for example: "MYFIELD|#MYFIELD|#MYFIELD".
- You can access system date and time in context menu commands using following variables: %_system_year%, %_system_month%, %_system_day%, %_system_dayofweek%, %_system_hour%, %_system_minute%, %_system_second%, %_system_millisecond%

Limitations
- Custom info cannot be accessed in track info panel "now playing" mode when playback is stopped. Also, masstagger doesn't seem to recognize custom info fields.
- Branching of multivalued custom info fields in Playlist Tree/Browser using %<tag>%-syntax is not possible.
Title: foo_custominfo
Post by: fabiospark on 2006-06-26 18:38:09
A thousand thanks!

After the quickest and simple try I can only say that:

1) where can I see the fields and their contents? It seems that the properties window doesn't show them.

2) if a physical field (written into the file) and a custominfo one has the same name, I can't see the value change in the playlist: does the written one has the precedence over the other?

Thanks again.
Title: foo_custominfo
Post by: Fermion on 2006-06-26 19:01:30
A thousand thanks!

After the quickest and simple try I can only say that:

1) where can I see the fields and their contents? It seems that the properties window doesn't show them.

2) if a physical field (written into the file) and a custominfo one has the same name, I can't see the value change in the playlist: does the written one has the precedence over the other?

Thanks again.

1) They won't show up in the properties window, because fields are not stored in meta/tech info. I might have to add a special dialog for listing the fields/values. Before that, you'll just have to know the names of the fields you've set.

2) Yes, if a physical field with the same name, it will be prioritized over the custominfo field. Can't help it, that's just the way the metadb display hooks work. But i will add support for some functions like $getcustominfofield(blahblah,index), that will access the custominfo fields directly (also making reading of multivalued fields possible, if I or someone implements some interface for setting them). And you can always use different fieldnames like MYRATING instead of RATING etc..
Title: foo_custominfo
Post by: fabiospark on 2006-06-26 19:28:35

A thousand thanks!

After the quickest and simple try I can only say that:

1) where can I see the fields and their contents? It seems that the properties window doesn't show them.

2) if a physical field (written into the file) and a custominfo one has the same name, I can't see the value change in the playlist: does the written one has the precedence over the other?

Thanks again.

1) They won't show up in the properties window, because fields are not stored in meta/tech info. I might have to add a special dialog for listing the fields/values. Before that, you'll just have to know the names of the fields you've set.

2) Yes, if a physical field with the same name, it will be prioritized over the custominfo field. Can't help it, that's just the way the metadb display hooks work. But i will add support for some functions like $getcustominfofield(blahblah,index), that will access the custominfo fields directly (also making reading of multivalued fields possible, if I or someone implements some interface for setting them). And you can always use different fieldnames like MYRATING instead of RATING etc..


Yes, I think it doesn't make sense to have two tags with the same field names so let's keep them different.

If possible, IMHO, the first thing you should consider is to set the info free from Foobar config file and let them have their own to be stored into.
(I confess I have personal interest into that as by now, with 0.8.3, I'm tagging my files on a PC with a remote control while I'm listening to them and only every now and then I masstag the SQL info physically into the files).

Thanks
Title: foo_custominfo
Post by: jkwarras on 2006-06-26 19:37:48
Oh! Thanks a lot for this Fermion
Title: foo_custominfo
Post by: perpleXa on 2006-06-26 19:58:16
Sounds really nice.
I'll try it as soon as you've added the field window

cheers perpleXa
Title: foo_custominfo
Post by: bytemastr on 2006-06-27 03:26:44
Very-very-very nice.

I, too, would like to see this written to another source, possibly a file, but something perhaps ODBC compliant, so that I could write to my MySQL database where my master information resides, which I'd be willing to collaborate with you on.

I do have a question and I have not had enough time to diagnose it, but does this plug-in intercept tag requests, such that if I configure this program to use tag %last_played% and then have the value set to %last_played% (as FB2K originally sees it), will this update the .ini file as well, or am I barking up the wrong tree?

Thanks again very much--This was pretty much my last hurdle to totally migrating over to 0.9.x.

First of all, if someone has already done something like this (couldn't find any), let me know and i'll remove this shit.

All comments are welcome...
Title: foo_custominfo
Post by: mazy on 2006-06-27 12:35:15
big hurray for this!

i can only hope that with the upcoming sdk someone would make option to store this info in xml files (one xml file for all music files in specific directory) or something like that. too bad that titleformatting hooks can't override values of existing tag fields ...

as for name, i don't feel much creative atm - something like foo_extratags, foo_extendedinfo, though foo_custominfo is just fine.

thank you

edit: i've just realized that with these hooks, one can't use [] construct like [$repeat(•,%rating%) ], but $if(%rating%,$repeat(•,%rating%) ,) instead. could this be taken care of somehow? maybe that would require work on foobar developers' side ...
Title: foo_custominfo
Post by: Fermion on 2006-06-29 16:59:52
0.1 beta 2 (http://www.tkk.fi/~tahlberg/foo)
- file moving/deleting within foobar should now work correctly
- library only -option
- all custominfo changes should now be correctly refreshed on the screen
- some fancy functions: $ciget(MYFIELD,<index>) and $cinum(MYFIELD) for working with multi-valued fields. $cilist(<line separator>,<name/value separator>) for listing all info fields and their values.
- options for disabling functions/fields in scripts
- use # in front of fieldname (e.g. #MYFIELD) in context commands to add a field instead of replacing
- lots of internal fixes
- sdk available


as for name, i don't feel much creative atm - something like foo_extratags, foo_extendedinfo, though foo_custominfo is just fine.

Perhaps I should stick with this, cause I can't even change the topic name anymore...

Quote
edit: i've just realized that with these hooks, one can't use [] construct like [$repeat(•,%rating%) ], but $if(%rating%,$repeat(•,%rating%) ,) instead. could this be taken care of somehow? maybe that would require work on foobar developers' side ...

Yes, I think $repeat() doesn't work with normal tags either.  An interesting "feature" of tagz scripts.. the brackets don't work with some functions in the way one might think they do.

I do have a question and I have not had enough time to diagnose it, but does this plug-in intercept tag requests, such that if I configure this program to use tag %last_played% and then have the value set to %last_played% (as FB2K originally sees it), will this update the .ini file as well, or am I barking up the wrong tree?

Hmm.. sorry, I don't quite understand this question..
Title: foo_custominfo
Post by: fabiospark on 2006-06-29 17:48:57
Quote
- some fancy functions: $ciget(MYFIELD,<index>) and $cinum(MYFIELD) for working with multi-valued fields. $cilist(<line separator>,<name/value separator>) for listing all info fields and their values.

... probably are the 38°C, here in Italy, but I can't clearly understand this: do you mind giving us an example, please?
I mean, are they functions to be used let's say, in trackinfo or similar?

Quote
- use # in front of fieldname (e.g. #MYFIELD) in context commands to add a field instead of replacing

Did you mean 'add a value' when you wrote 'add a field' ?
I mean, does this let us add a new value to a multi values field?

Thanks.
Title: foo_custominfo
Post by: Fermion on 2006-06-29 18:07:20
Quote
- some fancy functions: $ciget(MYFIELD,<index>) and $cinum(MYFIELD) for working with multi-valued fields. $cilist(<line separator>,<name/value separator>) for listing all info fields and their values.

... probably are the 38°C, here in Italy, but I can't clearly understand this: do you mind giving us an example, please?
I mean, are they functions to be used let's say, in trackinfo or similar?
Quote
- use # in front of fieldname (e.g. #MYFIELD) in context commands to add a field instead of replacing

Did you mean 'add a value' when you wrote 'add a field' ?
I mean, does this let us add a new value to a multi values field?

umm... something like that. Fields, values, almost the same thing.  Let's say you would already have a field named MYFIELD, then after this you would have two fields with same name but different values. And you can access them using $ciget(MYFIELD,0) and $ciget(MYFIELD,1). Function $cinum(MYFIELD) would return the number of fields, which in this case would be 2. $cilist() without parameters would return:
MYFIELD=myvalue1
MYFIELD=myvalue2
MYFIELD2=myvalue3
MYFIELD3=myvalue4
etc..

edit: ok, now i see what you meant, and yes, it will add a new value.. It's just that from dev's point of view it's a new field. Well, depending on the implementation of course.
Title: foo_custominfo
Post by: fabiospark on 2006-06-29 18:27:08
I did a quick test. This is what I saw, please tell me if I'm wrong on something.

1)  In trackinfo the functions $cixxx() don't work, in playlist columns they do.

2)  With $ciget() and $cinum() we have to use the field name without the '%%' symbols

3)  With $ciget() the values count starts with 0 (zero) and not with 1 (Zero will return the first item)

4)  With $cilist() we don't have to use any field name as it returns the whole list of all the fields and their values that are associated (by custominfo) with the track (remember we are in columns UI so the function works for each line/track).
Here, I don't understand the line separator: do you mean 'field+its value(s)' separator? (Perhaps they are stored in different lines in the config file...)

This evening I will test some old Quicktag SQL script and let you know the results.

Thanks again.


If we were in the old Fas West... I would already have been shot down: tooooo sloooooooooooow...
Title: foo_custominfo
Post by: Fermion on 2006-06-29 18:48:43
I did a quick test. This is what I saw, please tell me if I'm wrong on something.

1)  In trackinfo the functions $cixxx() don't work, in playlist columns they do.

confirmed.. and the variables don't seem to work either.. not sure if I can do anything about that.
Quote
2)  With $ciget() and $cinum() we have to use the field name without the '%%' symbols

3)  With $ciget() the values count starts with 0 (zero) and not with 1 (Zero will return the first item)

yep, they should work in a similar way to $meta() and $meta_num().
Title: foo_custominfo
Post by: foosion on 2006-06-29 19:09:00
confirmed.. and the variables don't seem to work either.. not sure if I can do anything about that.
If the track info panel directly calls titleformat_object::run(), there is nothing you can do; titleformat display hooks are not used by that method.

yep, they should work in a similar way to $meta() and $meta_num().
That raises the question why they do not use the same naming scheme. I think the name $custom would be too non-specific, but since you are essentially providing per-user track data, $user and $user_num seem appropriate.
Title: foo_custominfo
Post by: fabiospark on 2006-06-29 21:26:57
Can you confirm that I can't masstag from, say, %__situation% to %situation% (with format from field) and then split the fields into multiple values with comma as separator? (Or it's just me...)

Thanks
Title: foo_custominfo
Post by: Tomacco_Boy on 2006-06-30 23:48:34
Is there any chance of tagging rar's and zipped archives in the future ?
Title: foo_custominfo
Post by: foosion on 2006-07-01 01:39:55
Some comments about the custominfo SDK:

Code: [Select]
- For all functions that take a metadb_handle as parameter, you can specify the handle to be null.
  This tells custominfo to use the previously accessed storage entry instead of searching for an entry
  associated with certain location. This may greatly improve the speed of operations consisting of
  many calls. And naturally, lock()/unlock() must be used with this feature.
This is just asking for trouble. You may forget to acquire the lock, or may forget to update the "cursor" correctly in more complex operations. A more robust solution would be to use your own brand of handles that wrap access to the information of a single item much like a metadb_handle wraps access to the cached file metadata in foobar2000 itself.

Code: [Select]
- Return values for field processing methods are true on success (even if requested location/field not found),
  and false on critical failures (after which it will automatically be disabled).
That does not make sense. If something really goes horribly wrong, you can throw an exception. With an exception, you also have the chance to pass information about the failure up to the caller (and lastly to the user).

Raw pointers to service instances (like custominfo or metadb_handle): The smart pointer classes in the SDK weren't just created on a whim, they are meant to reduce programming errors. Using "optimizations" like avoiding their use is unnecessary and only encourages an inconsistent programming style.

Code: [Select]
- Custominfo core will take care of removing dead/empty entries, updating locations of moved files, 
  and restricting information storing to media library entries only (according to user settings).
Would it also update inactive backends, or would the information contained in these become outdated over time?

Code: [Select]
    //Returns the name or short description of the storage service in parameter "out". 
    //It is shown in the drop down list of the configuration dialog, and used for identifying the service.
    virtual void get_name(pfc::string_base &out) = 0;
This essentially means that the user will have to reconfigure the component if the name of a storage is ever changed (for whatever reason). If you use a GUID for identification and the name only for the user interface, you can avoid that.

Assuming items in the storage can be accessed efficiently as a linear list: This assumption is wrong for most advanced data structures (including an possible SQL backend). While it is possible to provide iterators for a lot of data structures, the best approach is again to use handles and just ask the storage backend for the handle associated with a given location/metadb_handle.

Updating information in the storage backend on an iten-by-item and even field-by-field basis: That is a performance bottleneck if I ever saw one, especially if you trigger a global update notification for every updated field. Any kind of batch update will be really slow.

Code: [Select]
custominfo* custominfo::get()
{
    static service_ptr_t<custominfo> ptr;
    if (ptr==0)
        service_enum_create_t(ptr,0);
    return ptr.get_ptr();
}
Apart from not being thread-safe, this will crash if the server is unloaded before the client, because at the time the service_ptr_t<> destructor is run, the pointer it contains is no longer valid in that case. It will try to call the release method of that pointer and cause an access violation. You should use static_api_ptr_t<> if you know the service exists (like inside foo_custominfo itself), or use a service_ptr_t<> and manually create the service instance. However, you should manually release that pointer, if the lifetime of the service_ptr_t<> extends beyond initquit::on_quit, which could happen if the service_ptr_t<> is a member of a dialog class.
Title: foo_custominfo
Post by: Fermion on 2006-07-01 19:18:25
0.1 beta 3 (http://www.tkk.fi/~tahlberg/foo)
- context submenus working.. whee
- context command importing/exporting using the good old .qtg files.
- storage: text file (foobar2k\custominfo.txt, utf8 encoded)
- storage: Sqlite database, read-only so far, compatible with the database used by Quicktag SQL.  (foobar2k\custominfo_sqlite.db)
- copying storage contents
- sdk removed for the time being


I did a quick test. This is what I saw, please tell me if I'm wrong on something.

1)  In trackinfo the functions $cixxx() don't work, in playlist columns they do.

confirmed.. and the variables don't seem to work either.. not sure if I can do anything about that.

Hmm.. now that i tried it again, it seems that it's working after all?

foosion: Thanks for the comments, i'll remove the sdk for now and think about that stuff.


Can you confirm that I can't masstag from, say, %__situation% to %situation% (with format from field) and then split the fields into multiple values with comma as separator? (Or it's just me...)

Huh? Can you explain that again? So what type of fields are those? And their values? And how would you do the splitting?
Title: foo_custominfo
Post by: Fermion on 2006-07-01 21:06:43
This is just asking for trouble. You may forget to acquire the lock, or may forget to update the "cursor" correctly in more complex operations. A more robust solution would be to use your own brand of handles that wrap access to the information of a single item much like a metadb_handle wraps access to the cached file metadata in foobar2000 itself.

Yes, this certainly is a problem, which I have to think about. But own handle type would not be very convenient either. I've always hated metadb handles, and two (perhaps three) handle types.. aaargh.
Quote
That does not make sense. If something really goes horribly wrong, you can throw an exception. With an exception, you also have the chance to pass information about the failure up to the caller (and lastly to the user).

But how can I be sure that an exception really is thrown? I mean, throwing an exception is easier to omit than setting up a correct return value. I also planned on adding a method for getting an error message. And of course I have to check for exceptions too.
Quote
Raw pointers to service instances (like custominfo or metadb_handle): The smart pointer classes in the SDK weren't just created on a whim, they are meant to reduce programming errors. Using "optimizations" like avoiding their use is unnecessary and only encourages an inconsistent programming style.

But still, the service pointer templates aren't used everywhere in the foobar2k sdk either. That was the main reason that encouraged me to use pointers..  And as you showed with the custominfo::get(), one can make mistakes with service_ptr_t<> too.
Quote
Would it also update inactive backends, or would the information contained in these become outdated over time?

No, it wouldn't make much sense to update inactive storages. The information in them is outdated anyway, and modifying them without user explicitly selecting the storage doesn't seem appropriate. Though I perhaps should make it more clear that they are not updated.
Quote
This essentially means that the user will have to reconfigure the component if the name of a storage is ever changed (for whatever reason). If you use a GUID for identification and the name only for the user interface, you can avoid that.

Yeah, thought about too. I might change that...
Quote
Assuming items in the storage can be accessed efficiently as a linear list: This assumption is wrong for most advanced data structures (including an possible SQL backend). While it is possible to provide iterators for a lot of data structures, the best approach is again to use handles and just ask the storage backend for the handle associated with a given location/metadb_handle.

True, but no matter how the data is organized, you can always construct a map from one dimensional array to the elements of the internal data structure (not the most effective solution but fast enough). I just didn't want to make things any more complicated by defining own iterator or handle types.
Quote
Updating information in the storage backend on an iten-by-item and even field-by-field basis: That is a performance bottleneck if I ever saw one, especially if you trigger a global update notification for every updated field. Any kind of batch update will be really slow.

Well, I know this, and I never meant this for any large scale operations. The main purpose is really just to set or remove single fields for small number of files, and if someone wants to update million fields at a time, it's really not my problem if it takes a lot of time. I see this as an issue of "ease of coding/extending vs. speed".

LOL, lots of fuzz about sdk that nobody will propably ever use.. well, good practice for me if nothing else.
Title: foo_custominfo
Post by: foosion on 2006-07-01 22:09:04
Yes, this certainly is a problem, which I have to think about. But own handle type would not be very convenient either. I've always hated metadb handles, and two (perhaps three) handle types.. aaargh.
Whether you like them or not, metadb handles are the key to fast metadata access in foobar2000.

But how can I be sure that an exception really is thrown? I mean, throwing an exception is easier to omit than setting up a correct return value. I also planned on adding a method for getting an error message. And of course I have to check for exceptions too.
You can be just as sure about an exception being thrown as you can be about the return value being correct. Of course you have to set up a try-catch block, but you can use one for several calls whereas you would have to check to the return value of every call with an approach that does not use exceptions. With exceptions, you can also signal failure and transmit an error message as a single operation, otherwise you have to ensure that the error message is not reset or changed between the time the method in which the error occurred returns and the time the caller tries to retrieve it with your separate method.

True, but no matter how the data is organized, you can always construct a map from one dimensional array to the elements of the internal data structure (not the most effective solution but fast enough). I just didn't want to make things any more complicated by defining own iterator or handle types.
Yes, you can, but that does not mean it is efficient by any means.

Well, I know this, and I never meant this for any large scale operations. The main purpose is really just to set or remove single fields for small number of files, and if someone wants to update million fields at a time, it's really not my problem if it takes a lot of time. I see this as an issue of "ease of coding/extending vs. speed".

LOL, lots of fuzz about sdk that nobody will propably ever use.. well, good practice for me if nothing else.
Perhaps you don't realize it, but your SDK reveals quite a lot about the inner workings of your component, so this isn't just about the SDK. Thanks for your openness anyway, I hope you won't be too offended when we ask people who complain about foobar2000 being slow with several tens of thousand items in the library to try to remove your component.
Title: foo_custominfo
Post by: Peter on 2006-07-02 14:57:12
But still, the service pointer templates aren't used everywhere in the foobar2k sdk either. That was the main reason that encouraged me to use pointers..
Service pointer template is not used when:
- Referenced object is not a service
- Storing the pointer anywhere would make no sense or imply buggy code, or relevant code is only called by implementation of service you get a pointer to, like in case of metadb display hooks getting raw pointer to metadb_handle.
Quote
And as you showed with the custominfo::get(), one can make mistakes with service_ptr_t<> too.
You can kill yourself with a spoon too, if you try hard enough.
The service pointer template assumes you have basic knowledge about consequences of your code being in a DLL, and services being implemented by other DLLs, which you apparently fail at.
Title: foo_custominfo
Post by: Teukka on 2006-07-02 16:55:54
i have a weird problem. I'm trying to rate songs but it works only one playlist...when i choose another playlist and trying to rate songs...nothing happens. someone help me 
Title: foo_custominfo
Post by: fabiospark on 2006-07-02 17:57:59
i have a weird problem. I'm trying to rate songs but it works only one playlist...when i choose another playlist and trying to rate songs...nothing happens. someone help me 

Probably you have "library only" checked and the files in the second playlist are not in the library.
Title: foo_custominfo
Post by: fabiospark on 2006-07-02 18:56:51
Quote


I did a quick test. This is what I saw, please tell me if I'm wrong on something.

1)  In trackinfo the functions $cixxx() don't work, in playlist columns they do.

confirmed.. and the variables don't seem to work either.. not sure if I can do anything about that.

Hmm.. now that i tried it again, it seems that it's working after all?


Tried a little more, these are the results:


Trackinfo mode = Follow cursor

OK, your three functions work.


Trackinfo mode = Now playing

They work only if there is a playing file. If I stop Foobar I'm still getting the "unknown function" message for all of the three.

If I go to the next track (while playing) I can see the message shown for half a second.

Thanks.
Title: foo_custominfo
Post by: fabiospark on 2006-07-02 20:23:21
How can we get the separate values of a multi values field as the old 'tag' (with no %%) did in albumlist or the #tag# did in PLT?

I can't figure up how to set PLT or browser panels to use the single values...


Thanks.
Title: foo_custominfo
Post by: Teukka on 2006-07-03 11:49:56

i have a weird problem. I'm trying to rate songs but it works only one playlist...when i choose another playlist and trying to rate songs...nothing happens. someone help me 

Probably you have "library only" checked and the files in the second playlist are not in the library.


where exactly i can uncheck this "library only"?
Title: foo_custominfo
Post by: fabiospark on 2006-07-05 21:12:56


i have a weird problem. I'm trying to rate songs but it works only one playlist...when i choose another playlist and trying to rate songs...nothing happens. someone help me 

Probably you have "library only" checked and the files in the second playlist are not in the library.


where exactly i can uncheck this "library only"?

In the preferences page.
Title: foo_custominfo
Post by: donnie on 2006-07-10 15:10:56
Sorry if I'm being really stupid here but is it possible to transfer custom info values to a field stored in the tacks' tags using the masstagger?
Title: foo_custominfo
Post by: Fermion on 2006-07-11 17:29:41
Sry about lack of updates, my access to internet is quite limited...

0.1 beta4 (http://www.tkk.fi/~tahlberg/foo)
- fixed an issue where info was not correctly saved for some tracks
- fixed text file line change reading (now requires CR+LF)
- fixed file deletion within fb2k (again)
- renamed tagz functions: $ciget() -> $cinfo(), $cinum() -> $cinfo_num(), $cilist() ->$cinfo_list()
- added function $cinfo_sep(). Behaves like $meta_sep().
- fully(?) functional(?) SQLite info storage. Can also read the database created by Quicktag sql.
- whole internal acrhitecture changed. Once again, hope I didn't break anything.
- new SDK (or a "wannabe" SDK at least), completely rewritten
Title: foo_custominfo
Post by: Fermion on 2006-07-11 17:42:26
How can we get the separate values of a multi values field as the old 'tag' (with no %%) did in albumlist or the #tag# did in PLT?

I can't figure up how to set PLT or browser panels to use the single values...


Thanks.

I must say that I'm not really familiar with almost any 0.9 components.. :/ Guess I have to do some research...
Title: foo_custominfo
Post by: BenniP on 2006-07-11 20:08:26
Great plugin, thank you!
Title: foo_custominfo
Post by: fabiospark on 2006-07-11 20:59:18
Sry about lack of updates, my access to internet is quite limited...

0.1 beta4 (http://www.tkk.fi/~tahlberg/foo)
- fixed an issue where info was not correctly saved for some tracks
- fixed text file line change reading (now requires CR+LF)
- fixed file deletion within fb2k (again)
- renamed tagz functions: $ciget() -> $cinfo(), $cinum() -> $cinfo_num(), $cilist() ->$cinfo_list()
- added function $cinfo_sep(). Behaves like $meta_sep().
- fully(?) functional(?) SQLite info storage. Can also read the database created by Quicktag sql.
- whole internal acrhitecture changed. Once again, hope I didn't break anything.
- new SDK (or a "wannabe" SDK at least), completely rewritten


I can't see the CI commands in the context menu and I can't enable the info storing.
After I choose the storing method, if I click on "save all" or exit and then re-enter the preferences page the box is still showing "none".
Another small thing: could you make it reopen its pref page when I reopen the preferences after selecting custominfo pref page, please? Now, it always opens on the general pref page.

Thanks.
Title: foo_custominfo
Post by: Fermion on 2006-07-12 11:50:51
I can't see the CI commands in the context menu and I can't enable the info storing.
After I choose the storing method, if I click on "save all" or exit and then re-enter the preferences page the box is still showing "none".

Did you press the "switch"-button? Did it give any warnings?
Quote
Another small thing: could you make it reopen its pref page when I reopen the preferences after selecting custominfo pref page, please? Now, it always opens on the general pref page.

Ok, I'll do that in next update.
Title: foo_custominfo
Post by: unabatedshagie on 2006-07-12 13:20:27
I have some tags called style and featuring which I would like to copy from the files to the database, how would I go about doing this?
Title: foo_custominfo
Post by: fabiospark on 2006-07-12 20:09:17
1)  For multi values fields, in regular tagz the $meta_sep(tag,', ') gives the same output as %tag%, with custominfo fields, $cinfo_sep(tag,', ') works as it's tagz sister but
%tag% returns only the first value and not the others.
Could you do something about it?

If you can, I think we won't need the $cinfo_sep() anymore.


2)  With the old QTSQL I could use the masstagger function "Format SITUATION using %__situation%" followed by "Split SITUATION field by "," separator".
With custominfo, in this way I'm getting only the first value.
If I use $cinfo_sep(__situation,', ') instead of %__situation% in the script, in columns UI I get [UNKNOWN FUNCTION] as output for %situation%.
After (if) you fix the %tag% thing, could you make everything work in masstagger (and in trackinfo too), please?

If you need some more examples let me know.


Thanks.
Title: foo_custominfo
Post by: Fermion on 2006-07-13 11:35:59
I have some tags called style and featuring which I would like to copy from the files to the database, how would I go about doing this?

Depends on if you want to keep them in files too or not. You could create a context menu command with field name "STYLE|FEATURING" and value "%style%|%featuring%", and then appy it to the files you want. But this way you have to access them using $cinfo(style) etc., or remove style and featuring tags from files with masstagger or file properties. Or you can use different field names for custom info values ("STYLE2|FEATURING2" or whatever).

Fabio:
I certainly could make %tag% show all of the values... but that's not the issue. As you might have noticed, %tag% with custominfo fields is not recognized by masstagger either. It evaluates to "?" as if the field wouldn't exist. There is nothing I can do about it. Same thing with track info.

Also, there is no way to split/branch the entries in playlist tree or browser using %<tag>%. They access the file info structures directly and know nothing about multi-valued custom fields. In album list one could do the branching with a special hack $char(4)$cinfo_sep(tag,$char(5))$char(4), but ... I think nobody's using album list anymore... :|

Sorry about the bad news, but that's just how it is.

And this also the only (legit) way I can think of implementing these db-only tags. The tech info approach used earlier doesn't work in 0.9 anymore.
Title: foo_custominfo
Post by: fabiospark on 2006-07-15 20:08:39
I certainly could make %tag% show all of the values... but that's not the issue. As you might have noticed, %tag% with custominfo fields is not recognized by masstagger either. It evaluates to "?" as if the field wouldn't exist. There is nothing I can do about it. Same thing with track info.

Also, there is no way to split/branch the entries in playlist tree or browser using %<tag>%. They access the file info structures directly and know nothing about multi-valued custom fields. In album list one could do the branching with a special hack $char(4)$cinfo_sep(tag,$char(5))$char(4), but ... I think nobody's using album list anymore... :|

Sorry about the bad news, but that's just how it is.

And this also the only (legit) way I can think of implementing these db-only tags. The tech info approach used earlier doesn't work in 0.9 anymore.


It's a pity.
I'm not a programmer so I beg your pardon if I'm saying something wrong:

- have you tried and asked about these preoblems in the development forum?
- have you talked to cbowron, the author of foo_browser and foo_playlist_tree?

Maybe they can give you some hints on where to go.

PS.
Is it right they don't work with foo_qiocksearch too?

Thanks.
Title: foo_custominfo
Post by: Fermion on 2006-07-16 16:32:48
0.1.0 (http://www.tkk.fi/~tahlberg/foo)
- some minor optimizations/fixes.
- I think it's pretty stable now, but please notify me of any bugs if you find any.
- added a command for removing dead custominfo entries (useful if files have been moved/removed outside foobar2k). It is slow, though.


- have you tried and asked about these preoblems in the development forum?
- have you talked to cbowron, the author of foo_browser and foo_playlist_tree?

Maybe they can give you some hints on where to go.

I don't think there's any need for hints, cause I already know it's a dead end..  And there's no way I'm gonna start begging other authors to change their components. I don't know how easy it would be to change the titleformatting behavior (track info, masstagger etc.) or what are the benefits of current behavior, but the branching in browser / playlist tree would propably take huge amount of extra work (and make the component slower).
Quote
Is it right they don't work with foo_qiocksearch too?

Dunno. Haven't tried.
Title: foo_custominfo
Post by: fabiospark on 2006-07-16 16:55:32
I don't think there's any need for hints, cause I already know it's a dead end..  And there's no way I'm gonna start begging other authors to change their components. I don't know how easy it would be to change the titleformatting behavior (track info, masstagger etc.) or what are the benefits of current behavior, but the branching in browser / playlist tree would propably take huge amount of extra work (and make the component slower).


Sorry, this is the last time I bother you about it.

Read this more as a question thrown to the masstagger developer rather than at you...

I think that a good solution would be having masstagger work with custominfo fields, at least.
We could periodically transfer (copy) the custominfo fields content to regular tags.
In fact this is what I'm still doing with my FB 0.8.3: Quicktagging my files while listening to them WITHOUT DISTURBING THEM and once in a while masstagging the SQL __tags into regular tags.

If I remember well, with FB0.9 you can tag playing files but when you do it you get a gap in the playing music. Quite annoying and so unuseful. But maybe with the last new betas they have fix it...

Anyway, thanks again for your efforts.
Title: foo_custominfo
Post by: uberkrieg on 2006-07-17 20:19:43
hello. great pluggin, thanks for releasing it.
is there a way that I can use this pluggin with the foo_playcount so it saves first_player, last_played, and play_count to the database and not to a real tag withing the file?
thanks!
Title: foo_custominfo
Post by: fabiospark on 2006-07-17 20:31:07
hello. great pluggin, thanks for releasing it.
is there a way that I can use this pluggin with the foo_playcount so it saves first_player, last_played, and play_count to the database and not to a real tag withing the file?
thanks!


The brand new official playcount plugin already lets you do something similar.
Title: foo_custominfo
Post by: foosion on 2006-07-19 15:35:48
foo_custominfo labelled as known potential troublemaker

foo_custominfo has been put on the list of known potential troublemakers (http://www.hydrogenaudio.org/forums/index.php?showtopic=44213) because it wrongly assumes that metadb_display_hook methods are only called from the main thread. It thereby breaks components that run titleformatting scripts in a worker thread. Please use the "report post" feature when you announce a fixed version to notify a moderator.
Title: foo_custominfo
Post by: Fermion on 2006-07-20 15:31:59
foo_custominfo labelled as known potential troublemaker

foo_custominfo has been put on the list of known potential troublemakers (http://www.hydrogenaudio.org/forums/index.php?showtopic=44213) because it wrongly assumes that metadb_display_hook methods are only called from the main thread. It thereby breaks components that run titleformatting scripts in a worker thread. Please use the "report post" feature when you announce a fixed version to notify a moderator.

Is there any more detail you can give? Imho I'm doing the synchronization correctly and I'm not calling any foobar API functions inside the hooks. There were such issues in betas 2 and 3, but these should be fixed.

Thanks.
Title: foo_custominfo
Post by: Fermion on 2006-07-20 17:15:51
Ok, now I read that topic about foosic. If you are referring to the problem causing the console error message, then it was fixed as I said above.
Title: foo_custominfo
Post by: foosion on 2006-07-20 20:36:02
Thanks for the clarification. I missed that there is a newer version than 0.1 beta 3 when I did my tests. We will keep the entry in the list of known potential troublemakers for some weeks, though it now has information about the faulty version(s) and an update note.
Title: foo_custominfo
Post by: Infernus on 2006-07-21 22:31:05
have some troubles with custominfo 1.0 and fb0.93b2 (I think problem was also with 0.92) and I cant really reproduce it....
Sometimes when I cange settings from plugins in the tools-selection of fb preferences and then press save all button + close: custominfo switches the storage method form "fb config file" to "none"......but not every time....???
Title: foo_custominfo
Post by: Fermion on 2006-07-22 19:29:13
0.1.1 (http://www.tkk.fi/~tahlberg/foo)
- bugfix: config saving caused disabling of the component (thanks, Infernus)
- bugfix: titleformatting function names were interpreted wrong in certain cases
- bugfix: weird behavior of the pref. page tab control
- date/time variables available (only!) in the context menu commands: %_system_year%, %_system_month%, %_system_day%, %_system_dayofweek%, %_system_hour%, %_system_minute%, %_system_second%, %_system_millisecond%
- some internal improvements
Title: foo_custominfo
Post by: unabatedshagie on 2006-07-24 05:04:26
A couple of questions:

1. Is there no way of editing the current information for the tracks other than completely overwriting it?

2. How do you remove stored information from a track?

And now a bug (of sorts):

1. The date/time variable fields are not padded with leading zero's

Finally a feature request:

1. Have an option to create a backup of the database incase of corruption, accidential deletion etc?
Title: foo_custominfo
Post by: Fermion on 2006-07-24 12:19:35
1. Is there no way of editing the current information for the tracks other than completely overwriting it?

Not atm. Maybe I'll add such a feature, maybe not.
Quote
2. How do you remove stored information from a track?

Right now it's possible only to remove single fields by setting an empty value to it and having the removal of empty fields turned on in the preferences. Or remove multiple fields with the FIELD1|FIELD2|FIELD3 syntax and leaving the value string empty. But I could work out something more practical...
Quote
1. The date/time variable fields are not padded with leading zero's

That's the way it was meant to be.
Quote
1. Have an option to create a backup of the database incase of corruption, accidential deletion etc?

I don't know if that's really necessary. I mean you can manually copy the database file / fb2k config file, or create some script or batch file to do it automatically.
Title: foo_custominfo
Post by: Der_Iltis on 2006-07-25 18:21:57
Does this plugin work with the freedb tagger so that I can add freedb data to database only?
Title: foo_custominfo
Post by: Russell777 on 2006-07-25 22:19:14
Sorry if i'm asking something stupid ,but can this plugin add values besides from the context menues?
(i mean by titleformatting from let's say trackinfo or columns ui playlist column?)
Title: foo_custominfo
Post by: mazy on 2006-07-25 23:15:32
no, that's not possible atm, though i think that custom function for this could be added. i don't see much use for it though, maybe just for the masstagger.

on a sidenote: custom info works perfectly with foo_skip
Title: foo_custominfo
Post by: unabatedshagie on 2006-08-07 17:44:17
Any updates to this excellent plugin?
Title: foo_custominfo
Post by: q-stankovic on 2006-08-08 13:05:04
A little bug:

I created a command that places a skip tag (foo_skip). I wanted to have this command directly in context menu without any submenu so i created following name: "Skip".  But i get a submenu with the name "Skip" that contains a command with the name of an arbitrary track (  )

It seems to me that in current version we have to create submenus in context menu
Title: foo_custominfo
Post by: Infernus on 2006-08-08 14:37:10
works fine here with these settings:

Display Name: Custom Info/Skip Track
Field Name: SKIP
Value: 1
Title: foo_custominfo
Post by: mazy on 2006-08-08 15:21:59
A little bug:
...
It seems to me that in current version we have to create submenus in context menu
confirmed, top-level context menu commands not supported correctly.
Title: foo_custominfo
Post by: foxyshadis on 2006-08-09 12:33:40
Any chance of adding the custominfo menu items to the keyboard shortcuts list, so we can turn them into hotkeys?
Title: foo_custominfo
Post by: unabatedshagie on 2006-08-09 13:21:40
Any chance of adding the custominfo menu items to the keyboard shortcuts list, so we can turn them into hotkeys?
They should be accessable from the keyboard shortcuts page, just type in custom into the search box and you should find them.
Title: foo_custominfo
Post by: unabatedshagie on 2006-08-12 09:15:15
Im trying to create an autoplaylist which only shows songs that don't have %rating% tags.

I can get autoplaylist to show if I want tracks with a rating greater than 3 using
Code: [Select]
%rating% GREATER 3
but I can't get unrated ones to show.

I have tried
Code: [Select]
%rating% MISSING
but it returns every track. I then tried
Code: [Select]
NOT %rating% IS ?
which returns nothing.

Any ideas how to do this?


Also could someone show some examples of what these are used for?

Quote
- $cinfo(X,Y). Returns value with field name X and index Y. Similar to $meta(X,Y).
- $cinfo_num(X). Number of values in field X. Similar to $meta_num(X).
- $cinfo_sep(X,Y,Z). Returns all values in field X separated with strings Y & Z as in $meta_sep(X,Y,Z).
- $cinfo_list(X,Y). Returns all custominfo values for current track using Y as a separator between field name and value, and X as separator between field/value-pairs.
Title: foo_custominfo
Post by: foosion on 2006-08-12 19:56:45
Use the following to check for the absence of the rating tag field:
Code: [Select]
rating MISSING
Title: foo_custominfo
Post by: unabatedshagie on 2006-08-12 20:59:43
Use the following to check for the absence of the rating tag field:
Code: [Select]
rating MISSING
Doesn't seem to work, it still bring up every track. Would it make a difference that I am storing the rating using custominfo?

None of the tags I have stored in custominfo work in the autoplaylist.
Title: foo_custominfo
Post by: foosion on 2006-08-12 22:26:19
Doesn't seem to work, it still bring up every track. Would it make a difference that I am storing the rating using custominfo?
Yes, it would. Sorry that I overlooked this possibility. In this case try
Code: [Select]
NOT "[%rating%]" IS ?*

%rating% alone would result in a question mark, if the field is not defined, the brackets cause the result to be the empty string in that case, and ?* tests for any string that is at least one character long.
Title: foo_custominfo
Post by: unabatedshagie on 2006-08-13 04:45:23
Doesn't seem to work, it still bring up every track. Would it make a difference that I am storing the rating using custominfo?
Yes, it would. Sorry that I overlooked this possibility. In this case try
Code: [Select]
NOT "[%rating%]" IS ?*

%rating% alone would result in a question mark, if the field is not defined, the brackets cause the result to be the empty string in that case, and ?* tests for any string that is at least one character long.
Thanks, works perfectly now
Title: foo_custominfo
Post by: Fermion on 2006-08-25 02:40:06
0.1.2 (http://www.tkk.fi/~tahlberg/foo)
- bugfix: commands in context menu root were not working correctly (thanks, q-stankovic)
Title: foo_custominfo
Post by: q-stankovic on 2006-08-30 17:56:33
0.1.2 (http://www.tkk.fi/~tahlberg/foo)
- bugfix: commands in context menu root were not working correctly (thanks, q-stankovic)


No! 
When i choose as Displayname "Skip" i get following: Context menu->Skip->Skip
Title: foo_custominfo
Post by: Fermion on 2006-08-31 12:36:25

0.1.2 (http://www.tkk.fi/~tahlberg/foo)
- bugfix: commands in context menu root were not working correctly (thanks, q-stankovic)


No! 
When i choose as Displayname "Skip" i get following: Context menu->Skip->Skip

Hmm.. I think it's because you've created the Skip-command before the new version, and foobar uses the context menu path it has already saved with the old version. If this is the case, there are couple of solutions:
1) editing context menu manually (Display -> Context Menu)
2) resetting whole context menu (Display -> Context Menu -> Reset Page)
3) using different display name like "skip" or "Skip " or "/Skip" instead of "Skip"
4) I could update GUIDs for all the commands, but then everyone would have to reconfig their keyboard shortcuts etc.. :/
Title: foo_custominfo
Post by: FofR on 2006-09-14 21:34:11
I am wondering if a custominfo for ARTISTS not TRACKS is possible? i.e. a second SQL database for artist entries. Thus if for example U2 are playing and I want to write some custom info, e.g. In biography custom info: "U2 are great" I'd like this to be accessible whenever any U2 track plays.

The reason I want this is to store information such as similar artists, biography, discography etc. To store this in each individual track entry would be quite painful.
Title: foo_custominfo
Post by: FofR on 2006-09-19 14:35:35
*bump as no one replied*
Title: foo_custominfo
Post by: bytemastr on 2006-09-25 16:47:16
Can you write in a hook that will cause foo_custominfo to save the custom entries when the Save All button is hit in the configuration pane?  It appears that the only time foo_custominfo commits the changes to disk is when FB2K is closed, which can be quite problematic if FB2K crashes (or the machine) and one has been making lots of custom entries as the songs play.

Alternative to that, could you export the save function up to a level where we can assign it to a hotkey and invoke it when needed?

Thank you in advance.
Title: foo_custominfo
Post by: bytemastr on 2006-09-25 20:26:29
Let me correct myself ...  If one stores the custominfo fields in the FB2K config file, Save All will save them along with the rest of the settings.

If one stores the custominfo fields in another format outside of the FB2K config file, Save All will not save the fields to that separate file.

For the time being, I'm perfectly happy storing my fields inside the FB2K file, however it may be beneficial to have the other formats save at the same time a Save All is called--if that's even possible--I haven't inspected the SDK in some time to see if there is even a way to do this.

Can you write in a hook that will cause foo_custominfo to save the custom entries when the Save All
[...]
Title: foo_custominfo
Post by: thuan on 2006-09-27 14:08:13
Somehow when I click on the remove dead entries I only get "Remove dead entries failed. Press cancel to disable foo_custominfo or ok to ignore and continue." Any idea? I use foobar0.9.4 and custominfo 0.1.2 with SQLite DB.
Title: foo_custominfo
Post by: Infernus on 2006-09-27 14:51:17
Somehow when I click on the remove dead entries I only get "Remove dead entries failed. Press cancel to disable foo_custominfo or ok to ignore and continue." Any idea? I use foobar0.9.4 and custominfo 0.1.2 with SQLite DB.


Same here, but since many fb versions. I think this was only a idea of the author but never implemented. Even doesn't work with txt-file
Title: foo_custominfo
Post by: PokéParadox on 2006-09-29 12:42:30
Any plans on adding a custom tag editor?
This would be very useful for files that don't (and should not) support tagging.
Title: foo_custominfo
Post by: mazy on 2006-09-29 15:58:34
Any plans on adding a custom tag editor?
This would be very useful for files that don't (and should not) support tagging.

it would be best if this could have been integrated to default foobar's properties dialog (as for example playback statistics are). i have no idea whether there's any way (service) to do so, it should be though ...


Fermion, i have few requests
Title: foo_custominfo
Post by: neothe0ne on 2006-10-06 23:17:42
Any plans on adding a custom tag editor?
This would be very useful for files that don't (and should not) support tagging.


I was ironically coming to this topic to request something amounting to the same thing, involving a Pokemon GBS emulated audio format no less.  How exactly are custom tags stored in the text file?  If I understand properly, the format in the txt file is:

file://[filename]
0
1
4 [number of characters of the custom tag title]
TEST [custom tag title]
3 [number of characters in custom tag entry]
abc [custom tag entry]

And repeat.

Is this right?

If I want to add title tags to about 30 files which do not support tagging, do I have to create 30 individual context entries in the Custominfo dialog in Properties, or can I just directly add file entries in the txt file without using foobar?
Title: foo_custominfo
Post by: mercury on 2006-10-07 20:13:51
i'm frequently sort out my music (changing path to files)
is it possible to take files by guid or something like that beside/instead filepath?

thanks
Title: foo_custominfo
Post by: Mystiq on 2006-10-13 19:44:58
no, that's not possible atm, though i think that custom function for this could be added. i don't see much use for it though, maybe just for the masstagger.

on a sidenote: custom info works perfectly with foo_skip


I think there would be some nice possibilities for function like that. Possible place to use this would be for play count plugin style but without the need for media library etc.

I got rating thing to work nicely with playlist tree and browser. Brilliant plugin!
Title: foo_custominfo
Post by: Chris Norman on 2006-10-20 21:00:00
Hi,

Just a short question:

Will this plugin support direct writing of tags? I quite liked foo_quicktag with the ability for example to write %genre% tags straight from the context menu. If does anyone else have a "workaround" to write quickly predefinded tags?

EDIT:

Found an answer to my second question: Workaround is to use the masstager context menu entry and to define scrips there. Anyway, this is quite painstaking as you have to create a single entry for e.g. for every genry + not the possibility of organizing everything into submenus.

Chris
Title: foo_custominfo
Post by: azazel100 on 2006-10-30 21:05:17
Featrue request:

  Assign values globally, not to specific songs.

from user point of view:


many usefull applications:If You can only find some spare time ;]
Title: foo_custominfo
Post by: Birk on 2006-10-30 21:10:03
very great idea, I'm waiting of something like that
Title: foo_custominfo
Post by: mazy on 2006-10-31 17:26:57
well thought, azazel100. i didn't realize that custom info would be nice place to store these "globals" which we could use for parametrization / state changing stuff.

and that idea to store album related things by using unique variables with "calculated" names, is simply yet powerful. we could of course use $crc if needed.

so i second all you wrote, plus:
Title: foo_custominfo
Post by: FofR on 2006-11-29 13:08:26
I second this, I move my files around a lot and lose their custom info.
Title: foo_custominfo
Post by: Imperecedero on 2006-12-16 02:01:20
i want to add the PERFORMER tag to my database but because most of my albums are cue based i can't, so i hear about this plugin. It works great but it's very tedious to open the preference panel every time to change the performer details. I was thinkings if it is possible to have an inputbox every time i want to add a performer??? Get the idea???
Title: foo_custominfo
Post by: plum on 2007-01-03 12:17:49
I'm getting a new computer and want to copy my music files and everything to its hard drive. Is there a way to do this without losing the custom info? (I use it for ratings.)

I'm not a code geek, so please use simple words ^^
Title: foo_custominfo
Post by: neothe0ne on 2007-01-23 04:09:29
I'm getting a new computer and want to copy my music files and everything to its hard drive. Is there a way to do this without losing the custom info? (I use it for ratings.)

I'm not a code geek, so please use simple words ^^


Your custominfo database file should be stored in C:\Program Files\foobar2000\, or C:\Documents and Settings\You\Application Data\foobar2000\, depending on whether or not you selected per-user settings when you installed foobar.  Just copy the file, and leave the directory paths to your music exactly the same.
Title: foo_custominfo
Post by: mazy on 2007-01-23 10:13:04
we really need someone to implement variation of the text file storage method which would create one file per directory (of the playing item and default locaton for read only item - cd etc.).
Title: foo_custominfo
Post by: panfist on 2007-01-24 10:44:32
we really need someone to implement variation of the text file storage method which would create one file per directory (of the playing item and default locaton for read only item - cd etc.).



This is a brilliant idea. Combine this with azazel100's idea, and as long as you have an existing directory structure you can apply variables globally to directories and sub-directories. The only problem is, obviously it would be better if this could still be implemented for the sqlite database.

Please keep working on this it is much appreciated!
Title: foo_custominfo
Post by: crazymad on 2007-01-29 23:49:52
I would like to have a value saved automatically when a certain event happens.
specifically I would like to save the system date and time saved in, say, %playback_start% on playback-start of every song. is that possible?
Title: foo_custominfo
Post by: matturius on 2007-02-06 09:34:15
Hi,

will there be a further developement of this extension? I am planning to switch from musikCube to foobar and I am used to save the rating in an MySQL database. As far as I understood the main problem of this plugin is, besides of some lacking features, its performance for big music collections, correct? Are there some databased alternatives?
Title: foo_custominfo
Post by: Infernus on 2007-02-06 10:21:37
if there is further development...this question would interest me too. The plugin has 3 modes
a) write mysql lite database on the fly
b) store custom fields in the foobar's database, which is the fastest method
c) in a textfile

a) I have never tried because as u write the author wrote its slower than fb's db

I use b) and its really fast, i cannot determine any difference in speed
c) I use for tranfering my ratings to another foobar installation on same pc


The biggest disadvantage with costom config is that when u rename/move files or use network devices from a other pc, custom config cannot handle your ratings etc. anymore.
So, a big wishlist for me to combine customconfig entries with a filename - not path (on 30000 tracks here I think I have only a few doublenamed soundfiles)

There are no database plugin alternatives.
Title: foo_custominfo
Post by: matturius on 2007-02-06 11:09:06
Hi,

I assigned Plus and Minus on my keyboard as shortcuts for rating +-1, so it is quite easy to rate a song. I also switched to save the ratings in the Foobar config files, but cannot say anything about performance. So far it seems usable for me.

@Infernus: Couldn't you export your ratings to a text file, apply some search and replace functions for new filepathes/drives and re-import them into your config file? That's how I would solve that problem.
Title: foo_custominfo
Post by: wibbly on 2007-02-09 17:03:19
I'm confused.

What exactly do I have to do to get this plugin to save ReplayGain values (instead of being forced to save the values in each MP3 header after a RG scan)?

I installed the .dll and selected a database type to use. But what do I need to do to get the RG tags written to the database instead of the MP3s?
Title: foo_custominfo
Post by: mazy on 2007-02-10 15:29:58
that's not possible, wibbly :/
Title: foo_custominfo
Post by: wibbly on 2007-02-10 19:38:40
that's not possible, wibbly :/




So I'm even more confused than I thought! Thanks for the reply anyway...
Title: foo_custominfo
Post by: jmorrell on 2007-02-12 06:21:09
probably quite easy to do but i'm very new to foobar so bare with me..Im using this having ratings for my music.

I've added the column and got the stars showing. Some things i would like to be able to do...

1. Im going to have 2 buttons with hearts, - and + which i can click on and add or take away stars. At the moment i can add as many stars as i want, same for the context menu. How can i limit this to 5. And also limit it to -2.

2. Is it possible for me to add an entry to the playback order dropdown. To only play 5 Star songs in the current playlist? If so how could i do that.

3. Does anyone have any grey heart icons ?

THanks.
Title: foo_custominfo
Post by: Slotos on 2007-02-12 12:39:29
1. For increasing use $ifequal(%rating%,5,5,$add(%rating%,1)), for decreasing use $ifequal(%rating%,-2,-2,$sub(%rating%,1))

2. foo_skip (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=30361&view=findpost&p=446051)
Title: foo_custominfo
Post by: jmorrell on 2007-02-15 20:58:50
Oh no!  i just clicked reset ALL and lost everything, all my tweaks, the whole thing...

slowly trying to design everything again. I had a custom Style for my ratings on the columns tab. It was quite small but help it display Stars instead of Numbers.

Could anyone tell me what it was..I found it on these forums and it was just a single line of code.

much appreciated. joe
Title: foo_custominfo
Post by: wolfsong on 2007-02-20 22:29:59
I know masstagger doesn't but can autoplaylists use custom info tags?
Title: foo_custominfo
Post by: Slotos on 2007-02-21 10:28:05
Yes.

Wolfsong, yes.
Title: foo_custominfo
Post by: wolfsong on 2007-02-21 14:05:15
Yes.

Wolfsong, yes.

It doesn't seem to be working for me.
Title: foo_custominfo
Post by: ciaran on 2007-03-31 18:47:51
Doesn't seem to work, it still bring up every track. Would it make a difference that I am storing the rating using custominfo?
Yes, it would. Sorry that I overlooked this possibility. In this case try
Code: [Select]
NOT "[%rating%]" IS ?*

%rating% alone would result in a question mark, if the field is not defined, the brackets cause the result to be the empty string in that case, and ?* tests for any string that is at least one character long.


So how do you do this in TagZ? There is no $cinfo_test function and testing for $cinfo_num > 0 doesn't work or anything.

I have a custominfo tag called IPOD_PL and I want to check if it even exists.
Title: foo_custominfo
Post by: Purple Monkey on 2007-03-31 20:37:58
Code: [Select]
NOT %ipod_pl% IS ?

Should work fine.
Title: foo_custominfo
Post by: Yotsuya on 2007-04-02 07:49:37
Is there a way to store a tag via titleformatting function instead of context menu? (or a titleformatting command to execute the context option). I would like a custominfo equivalent of $puts(), a reversal of $cinfo(X,Y). Something that could be used like this:

// PerTrack
$cinfo_put(lastplayed,%cwb_systemdatetime%))
Title: foo_custominfo
Post by: HYDE on 2007-04-19 03:22:42
Is there a way to store in %title% field? I try to put %title% to files then don't have title tag or to files then have wrong tags, but don't work.
works fine for %artist% and %album%
Title: foo_custominfo
Post by: Eibwen on 2007-05-06 13:59:32
This is a feature request, a writing option i'd really like to see, is having a per folder, or per file, xml file

So lets say i have a folder
C:\music\artist\album\*.mp3
the plugin would create a:
C:\music\artist\album\info.xml

This would allow the ability to move around the files and retain the tags, still without modifying the files

Or if i was using the archive reader plugin:
C:\music\artist - album.zip
the plugin creates:
C:\music\artist - album.xml

and stores the info for all songs in the archive in that file

an alternative to the archive reader method, is simply allowing the user to define a location to keep the file info for any read-only locations, say a network folder or CD


This idea could also work with just text files, i was just thinking XML because then everything would be clearly defined, where the description of your current text file database thing makes it sound as if the formatting of it is very strict and not user friendly, but i havn't tried looking at it at all
Title: foo_custominfo
Post by: Evacide on 2007-05-26 21:31:47
can anyone reupload this file?
Title: foo_custominfo
Post by: FofR on 2007-05-27 13:46:05
Core Features I'd like:
* Artist and Album DBs for thing like Wiki info, playcounts, website, album information, etc; information stored once per artist or album not every track.
* Use of CRCs instead of file location to determine the DB entry, my files move around a lot.
* Ability to write to the DBs on track change.
Title: foo_custominfo
Post by: Linkin on 2007-05-28 18:45:49
Download doesn't work. Any mirrors?
Title: foo_custominfo
Post by: FavioD on 2007-05-29 09:24:56
Man, right when I need it, its gone, can anyone please upload it?
Title: foo_custominfo
Post by: Execution King on 2007-05-29 20:53:20
=-[
Title: foo_custominfo
Post by: elishnevsky on 2007-05-30 00:23:03
Here you go, I uploaded foo_custominfo 0.1.2

http://www.sendspace.com/file/t33pp0 (http://www.sendspace.com/file/t33pp0)
Title: foo_custominfo
Post by: FavioD on 2007-05-30 11:28:24
thank you my man
Title: foo_custominfo
Post by: SonicExplorer on 2007-06-08 17:47:37
I installed foo_custominfo and am not being given any selection under preferences to select from, and can therefore not use the plug-in.  There's apparently a few different selections in the list-box that are supposed to be present (txt, database, sql) and I don't get ANY.

Would anybody know why this may be happening??

Thanks,

Sonic
Title: foo_custominfo
Post by: HYDE on 2007-06-27 05:14:09
how I do to store %artist% %album %genre% %track% with these plugin, I want to tag my files without modify it.
Title: foo_custominfo
Post by: kanak on 2007-06-28 23:04:13
Fermion

Thank you so much for this plug. It's really useful. However, the plugin lacks two key features which is preventing me from really using it:

1. Ability to copy existing tags to the databse: I want to transfer all tags that continually change (rating, play_count, last_played) to the database, but i don't see anyway to do this at the moment.

2. Ability to view custominfo tags in properties: Without this I'm literally blind as to what tags i have in the database. not a nice situation.


Also,

* Artist and Album DBs for thing like Wiki info, playcounts, website, album information, etc; information stored once per artist or album not every track.


I second this.

* Use of CRCs instead of file location to determine the DB entry, my files move around a lot.


I think it would be sufficient if the plugin could change the DB entry when we use the "Move/Rename/Copy" command in foobar. How long would the calculation of CRC take (per track)?
Title: foo_custominfo
Post by: thuan on 2007-06-29 03:59:06
Quote
1. Ability to copy existing tags to the databse: I want to transfer all tags that continually change (rating, play_count, last_played) to the database, but i don't see anyway to do this at the moment.

2. Ability to view custominfo tags in properties: Without this I'm literally blind as to what tags i have in the database. not a nice situation.

For the first you can do it manually like this:
- Create a new Tag item in the second tab of custominfo's settings.
- Naming and Field name as you chose.
- The Value field is the appropriate tagz string for the tag you want to sync. e.g. put %RATING% to sync with real %RATING% tag.
- Use the new context command with files you need to sync.
As for the 2nd request, I don't know a work around so I like it to be implemented too.

Quote
Core Features I'd like:
* Use of CRCs instead of file location to determine the DB entry, my files move around a lot.

I think it would be sufficient if the plugin could change the DB entry when we use the "Move/Rename/Copy" command in foobar. How long would the calculation of CRC take (per track)?

A nicer way I can think of is to stamp each track that has DB entry with an ID tag. As computing CRC is a little extreme.
Title: foo_custominfo
Post by: topdownjimmy on 2007-07-08 19:49:54
Quote
Core Features I'd like:
* Use of CRCs instead of file location to determine the DB entry, my files move around a lot.

I think it would be sufficient if the plugin could change the DB entry when we use the "Move/Rename/Copy" command in foobar. How long would the calculation of CRC take (per track)?

A nicer way I can think of is to stamp each track that has DB entry with an ID tag. As computing CRC is a little extreme.


What if rather than CRC, custominfo was able to use fingerprint data from the foosic component (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/Foosic_Music_Database_(foo_sic)), as anybody who uses foosic is already calculating fingerprints with every play?

Despite the fact that (in my experience) foo_custominfo data does follow files around when moved with "Move, Rename or Copy Files," this would be nice in certain cases, such as if files are moved manually outside of foobar.

Also, is Fermion even around anymore?  Looks like he hasn't posted since August of last year, and the foo_custominfo homepage (http://users.tkk.fi/~tahlberg/foo) is missing.  Is there source code for this floating around?  I think this is an important component that many people rely on.
Title: foo_custominfo
Post by: Nemphael on 2007-08-15 18:01:23
What if rather than CRC, custominfo was able to use fingerprint data from the foosic component (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/Foosic_Music_Database_%28foo_sic%29), as anybody who uses foosic is already calculating fingerprints with every play?


I really support your idea. After inquiring information from Foosic.org, it seems they won't include tag storing of FooIDs through foo_sic, because they find it unnecessary. The source code of libFooID is available to the public, so access to/tag storing of FooIDs is still possible even outside of foo_sic. Scanning for FooIDs could be done as a background process, or as a first time measure for files when storing to Custominfo. As said by the staff of Foosic.org in response to my e-mail: Even with slow hardware, the computing of a FooID is done in <1,5 seconds.Technically, Custominfo with FooID support shouldn't be a problem for those with sufficent hardware and some free time - should still be an optional feature or a different version, though.
Title: foo_custominfo
Post by: topdownjimmy on 2007-08-19 18:59:44
What if rather than CRC, custominfo was able to use fingerprint data from the foosic component (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/Foosic_Music_Database_%28foo_sic%29), as anybody who uses foosic is already calculating fingerprints with every play?


I really support your idea. After inquiring information from Foosic.org, it seems they won't include tag storing of FooIDs through foo_sic, because they find it unnecessary. The source code of libFooID is available to the public, so access to/tag storing of FooIDs is still possible even outside of foo_sic. Scanning for FooIDs could be done as a background process, or as a first time measure for files when storing to Custominfo. As said by the staff of Foosic.org in response to my e-mail: Even with slow hardware, the computing of a FooID is done in <1,5 seconds.Technically, Custominfo with FooID support shouldn't be a problem for those with sufficent hardware and some free time - should still be an optional feature or a different version, though.

I would love to see this happen.  Is the source code for custominfo available anywhere?
Title: foo_custominfo
Post by: atahualpa on 2007-08-26 16:27:32
hey folks,

i have the following problem:

i have great part of my music collection stored on an external HD.

after excessivly tagging it with custominfo and filling up my custominfo_sqlite.db with data, i accidentally re-scanned my media library when the external HD was turned OFF.

Afterwards, my custominfo seemed not to be associated with the re-scanned files anymore ... i guess that's because after scanning the lib when the HD was turned off, foobar thought the files were erased and "erased" the associated custominfo.

But I discovered that in the custominfo_sqlite.db file, the "erased" custom info is still there with correct paths and everything.

So how do i instruct foobar too read this info or to "not-ignore" it?
I mean, the data is still there! ...and i don't want to do the tagging-work all over again ;-)

thanks for help

PD: an implementation of the CRC/fingerprint idea might be useful to re-associate the custominfo with my files... in any case it's better than just storing the path
Title: foo_custominfo
Post by: Slotos on 2007-08-29 00:25:56
Atahualpa, I suppose fields are just marked as "deleted". So try using any sqlite database editor and remove that mark.
Title: foo_custominfo
Post by: Web_Engel on 2007-09-11 09:45:11
One question has been asked several times but has not been answered:

How do I mass-copy the custom-info tags to real file tags.

I want to use that as a backup every few months; I'll need it when I want to move files around, and I'll need that one day when I decide to move away from foobar.

This is a crucial question for me before I even start working with Custom Info.  Any hints?

Martin
Title: foo_custominfo
Post by: bubbleguuum on 2007-09-11 12:34:51
One question has been asked several times but has not been answered:

How do I mass-copy the custom-info tags to real file tags.

I want to use that as a backup every few months; I'll need it when I want to move files around, and I'll need that one day when I decide to move away from foobar.

This is a crucial question for me before I even start working with Custom Info.  Any hints?

Martin


Someone would have to write a plugin using the custominfo SDK to do it
Title: foo_custominfo
Post by: neothe0ne on 2007-09-13 00:49:54
One question has been asked several times but has not been answered:

How do I mass-copy the custom-info tags to real file tags.

I want to use that as a backup every few months; I'll need it when I want to move files around, and I'll need that one day when I decide to move away from foobar.

This is a crucial question for me before I even start working with Custom Info.  Any hints?

Martin


I migrate my foobar2000 ratings to WMP11 by making playlists of all the 5-rated songs, the 4-rated songs, etc.  I simply save them as m3u's, import them in WMP11, and after making sure the files are a part of my media library, select all, right click and hit Rate.

I'm sure you can do the same without turning all the custominfo tags into ID3 tags.  What application doesn't support m3u's anyway..
Title: foo_custominfo
Post by: Morgensonne on 2007-10-08 21:57:05
I have some old play_counter tags in my id3tags. i use custom tag for a while and recognized theres no change in the track info display, when theres a real tag and a custom tag. after deleting the real tag the right custom tag is shown. so is there a possibility to delete the real tag if a custom tag is written or how can it be done by hand (i mean copy the real tag to the custom info)?
Title: foo_custominfo
Post by: Nemphael on 2007-10-08 22:29:54
Using foo_uie_quicksearch, this can be done with a simple script(Change %play_counter% to your tag, if you use something else):
Code: [Select]
%play_counter% GREATER 0 AND "$cinfo(play_counter)" GREATER 0

You can use the same for foo_playlist_tree, but then you'll have to write play_counter instead of %play_counter%.
You should still look over the result, though, so you don't mess anything up.

We know Fermion hasn't logged on in four months. Would it be proper asking for someone to (re)write Custominfo, maybe?
Title: foo_custominfo
Post by: francesco on 2007-10-31 06:47:45
is there a way to tag directly the song?
to tag the song in the metadata???
Title: foo_custominfo
Post by: patul on 2007-10-31 07:16:38
is there a way to tag directly the song?
to tag the song in the metadata???


You can use foo_playcount.dll either official of mod. Though, I prefer to have the statistics to be saved in "database only".
Title: foo_custominfo
Post by: francesco on 2007-10-31 07:46:23

is there a way to tag directly the song?
to tag the song in the metadata???


You can use foo_playcount.dll either official of mod. Though, I prefer to have the statistics to be saved in "database only".


thanks i have foo_playcount.dll mod but it doesn't tag the rating in the metadata
Title: foo_custominfo
Post by: patul on 2007-10-31 10:20:02
thanks i have foo_playcount.dll mod but it doesn't tag the rating in the metadata


It's kind of weird, since I had the same problem too, that's why I use foo_custominfo after neither official playcount nor unofficial worked for me. I'm quite new to this forum, but I felt quite curious why other members do not suffered the same problem, so I was thinking the problem was me or my configuration. Glad I'm not alone.

Forgot to mention, what was not working is play counter, not rating.
Title: foo_custominfo
Post by: dex Otaku on 2007-11-21 06:54:04
Download link is currently dead [server claims file doesn't exist].
Title: foo_custominfo
Post by: Jose Hidalgo on 2007-11-28 00:47:25
Download link is still dead... where can we download foo_custominfo ? Is it a deprecated component or is it still usable with foobar 0.9.5 ?
Title: foo_custominfo
Post by: elishnevsky on 2007-11-28 01:09:13
It is usable with 0.9.5. I uploaded the latest known version. Get it here (http://www.sendspace.com/file/to6sa5) or here (http://w14.easy-share.com/11190411.html).
Title: foo_custominfo
Post by: Jose Hidalgo on 2007-11-28 01:47:19
Thanks Einstein ! 
Title: foo_custominfo
Post by: I don't mind on 2008-01-18 19:33:53
Just like atahualpa I'm in trouble right now. Unfortunately I excluded every file type from the foobar database. After realizing and reverting this all my play counts and ratings are gone. But when browsing the database with a text editor, all the values are still there. I followed Slotos' advice to use an sqlite browser to undelete the data but it seems as if they are not accesible in that way too.
So I'll ask atahualpa's question again: Is there a way to retrieve the data from the db-file?

P.S. to the developer: How about an option to identify songs by their tags?
Title: foo_custominfo
Post by: Jose Hidalgo on 2008-01-18 20:49:53
Hello 'I don't mind', welcome to HA Forums BTW...

The best would be implementing that retrieval option directly into the component's prefs. What does the dev think ?
Title: foo_custominfo
Post by: Slotos on 2008-01-18 22:54:04
Jose hidalgo, you should be more attentive. Developer have finished his work with this component long time ago. And he doesn't owe you anything, so your "what does the dev think" is actually a "bit" selfish. You could be at least thankful for that he created this component at all.

I don't mind, can you please mail your database to slotos@gmail.com? I'd like to try working it out.
Title: foo_custominfo
Post by: I don't mind on 2008-01-19 11:56:54
Thanks for your help guys.

Are the sources of this plugin public (or legally reversable) so that the cummunity could go on with the work on this promising concept?
Title: foo_custominfo
Post by: I don't mind on 2008-01-20 23:00:48
Hey, good news!
I managed to recover my database. I used a Ruby script to parse the database-file and store the information in a newly generated custominfo.txt. It's a dirty hack, but it worked for me. Until now I just implemented the recovery of the two values "RATING" and "PLAY_COUNTER" but every other value would be just the same.
If you should use the script it might happen that you'll have to customize the first line in the text file after it's generation. Just refer to an original custominfo.txt what's the right value there.
Feel free to ask if you should have the same problem and you're not able to use the script sucessfuly.

P.S: Thanks to Slotos, who offered to help me (and had exactly the same idea that I had  )

edit: There seems to be a little problem with songs that are divided into subsongs: The meta information for the first track is not restored. I'll look over this issue...

Code: [Select]
file = File.open('custominfo_sqlite.db',"r")
raw = file.readlines("file")
data = Array.new()
raw.each { |temp|
if temp.include? "RATING"
    pos = temp.index("RATING")
    if temp[pos-1,1].unpack('c')[0] > 50
        url = "file"+temp[0..pos-1]
        subsong = "0"
    else
        url = "file"+temp[0..pos-2]
        subsong = temp[pos-1,1].unpack('c')[0]
    end
    name = "RATING"
    value = temp[pos+6,3].to_i.to_s
    data << [url,subsong,name,value]
elsif temp.include? "PLAY_COUNTER"
    pos = temp.index("PLAY_COUNTER")
    if temp[pos-1,1].unpack('c')[0] > 50
        url = "file"+temp[0..pos-1]
        subsong = "0"
    else
        url = "file"+temp[0..pos-2]
        subsong = temp[pos-1,1].unpack('c')[0]
    end
    name = "PLAY_COUNTER"
    value = temp[pos+12,3].to_i.to_s
    data << [url,subsong,name,value]
end

}
file.close()
raw = nil

output = File.open('temp.dat','w')
count = 0
while true
    temp = data.pop
    break if temp == nil
    count += 1
    url = temp[0]
    subsong = temp[1]
    names = [temp[2]]
    values = [temp[3]]
    remi = Array.new()
    data.size.times { |i|
        if data[i][0] == url && subsong == data[i][1]
            if names.include?(data[i][2])
                remi << i
                values[names.index(data[i][2])] = [values[names.index(data[i][2])],data[i][3]].max
            else
                remi << i
                names << data[i][2]
                values << data[i][3]
            end
        end
    }
    remi.reverse!
    remi.each { |i|
        data.delete_at(i)
    }
    output << "#{url}\x0D\x0A#{subsong}\x0D\x0A#{names.size}\x0D\x0A"
    names.size.times { |i|
        output << "#{names[i].size}\x0D\x0A#{names[i]}\x0D\x0A#{values[i].size}\x0D\x0A#{values[i]}\x0D\x0A"
    }
end
output.close()
output = File.open('custominfo.txt','w')
output << "D08C788A-7F13-40C5-B3B2-E4B4ED99E6F7\x0D\x0A#{count}\x0D\x0A" << IO.read("temp.dat")
unlink("temp.dat")
Title: foo_custominfo
Post by: Jose Hidalgo on 2008-01-21 14:09:52
Bravo 'I don't mind'.  Now that you've solved your problem, maybe you could think about improving this great little piece of script (adding additional fields for instance, solving the subsongs issue), then providing the final version directly as a downloadable file ? Thanks in advance.
Title: foo_custominfo
Post by: Slotos on 2008-01-21 14:34:31
Great work, I don't mind. Seems like I should learn Ruby, it's not the first time I've seen it being really useful =)
Title: foo_custominfo
Post by: I don't mind on 2008-01-21 15:47:15
I have analyzed the structure a bit further but I'm not able to tell where the length of the url is stored. So if somebody could find this, it will be easy to write a completely generic script. Until now I just know that the 6 bytes before the url itself refer to the subsong, the length of the name field and length of the value field. Before those there are 2 unknown bytes and then there is a x81 in most of of the cases.

Unfortunately I don't have much time atm as I'm writing my thesis. But everybody should feel free to add anything to the script he wants. It's open source
Title: foo_custominfo
Post by: foosion on 2008-01-21 16:00:06
Why not just use an SQLite library to access the database file instead of writing a custom parser?
Title: foo_custominfo
Post by: I don't mind on 2008-01-21 16:05:34
Good question! The sqlite browsers I tried were unable to find any data within the file. Maybe a library could do that, but I din't try.
Title: foo_custominfo
Post by: fbuser on 2008-01-21 22:22:17
There are no means in the SQLite-API to recover deleted records. So there exists no library to undelete those  records. As for filesystems deleting data does not mean to completely overwrite them. So as far as you don't overwrite old data your are able to recover deleted data with a parser (and what "I don't mind" does).
Title: foo_custominfo
Post by: elenhil on 2008-01-22 20:09:57
Perhaps someone could help me with my database, too? I've been using foo_playback_custom and at some point of time changed tags from uppercase to lowercase, which introduced horrible confusion into my DB. There are now double entries for every song's first/last played and playcounter and because of that the plugin in question fails to read them correctly.

Unfortunately, I know next to nothing of SQLite, but I can set down the task quite easily hoping someone generous (and knowledgeable) would help me out. The task is quite straightforward:

to find all entries duplicated in upper and lowercase, of which
1) to choose the one first_played entry which is less that the other one
2) to choose the one last_played entry which is more than the other one
3) to sum both upper and lowercase play_counter entries
and place the result in a new, clean custominfo DB.

Can someone be so kind as to look at my DB and compose the abovementioned query to fix it?
Title: foo_custominfo
Post by: Phant on 2008-01-25 09:52:12
I am getting a 404 page when I click the download link.  Is there somewhere else I should be looking?
Title: foo_custominfo
Post by: foosion on 2008-01-25 11:23:24
There are no means in the SQLite-API to recover deleted records.

Ah, sorry. I missed the part about recovering deleted entries.
Title: foo_custominfo
Post by: Slotos on 2008-01-25 23:10:41
I am getting a 404 page when I click the download link.  Is there somewhere else I should be looking?

http://www.shareonall.com/foo_custominfo_incs.dll (http://www.shareonall.com/foo_custominfo_incs.dll)
Title: foo_custominfo
Post by: takt on 2008-02-02 13:15:12
Isn't this what everyone's looking for?

http://kitahei.cocolog-nifty.com/youyou/20...info__6ab8.html (http://kitahei.cocolog-nifty.com/youyou/2007/04/foo_custominfo__6ab8.html)
Title: foo_custominfo
Post by: Nimrud7 on 2008-02-03 13:39:49
Someone please!! Is there a way to directly edit/set the value set bij the context menu command? Is it possible to edit song info in the playlist?

Or like suggested before, is there someone with programming experience who can do this for us? It shouldn't be too hard really:

Current foo_custominfo database:

Code: [Select]
quicktag (table)
* url (text)
* subsong (integer(8))
* fieldname (text)
* value (text)


I like the subsong field, because that allows us to set custom info for cue sheet files. Plus it oversets the current artist, album, title tags. But I don't understand why there aren't seperate fields for each tag. Is the current way faster than what I suggest?

The only thing foo_custominfo misses for me is that I can't set fields directly (the function to set values is already built in, but through the context menu)

Foosion, mate, please why won't you consider creating this for us? PLEASE!! I honestly think that it shouldn't be too hard to implement. It would make foobar the best player in the world for me. Thanks you guys for the work done already!
Title: foo_custominfo
Post by: mystNZ on 2008-02-14 00:14:02
How can I automatically store the date the song was added to the library into the db? Basically, I would like to have an auto playlist with the 100 latest songs added?

Great plugin by the way, I currently use it for storing rating. And %dateadded% is the only feature left that I need from iTunes.
Title: foo_custominfo
Post by: DeathWolf on 2008-02-18 15:12:02
Any chance there could be a way to define how a track is id'ed?(rather than use just the path for that, allowing to define something like filename&filesize, or some other combination not purely based on where the file is located)

It'd really be helpful for people moving files around:)
Title: foo_custominfo
Post by: Slotos on 2008-02-19 13:41:17
How can I automatically store the date the song was added to the library into the db?

Use foo_cwb_hooks. It provides system date variable and new file tagger functionality.
Title: foo_custominfo
Post by: Milan123 on 2008-02-19 16:24:53
The server is down? I get a 404... 
Title: foo_custominfo
Post by: vigge on 2008-02-19 18:00:59
Uploaded 0.1.2 while the site is down, not sure if it's the latest though.
http://vigge.net/fb2k/foo_custominfo_0.1.2.zip (http://vigge.net/fb2k/foo_custominfo_0.1.2.zip)
Title: foo_custominfo
Post by: Slotos on 2008-02-21 19:14:05
not sure if it's the latest though

it is
Title: foo_custominfo
Post by: Whatever6750 on 2008-02-22 22:43:53
I'm having some trouble using this with panels UI theme rating buttons.

This seams to be the standard bit of script for rating buttons in a panels UI theme,

Code: [Select]
$if(%isplaying%,
    $puts(rating,$if2($meta($get(ratingField)),0))
    $button(86,$sub(%_height%,18),0,0,13,13,/images\rating\rating$get(rating).png,/images\rating\rating1.png,TAG:SET:$get(ratingField):1,$if(%glass%,nobkgnd))
    $button(86,$sub(%_height%,18),13,0,12,13,/images\rating\rating$get(rating).png,/images\rating\rating2.png,TAG:SET:$get(ratingField):2,$if(%glass%,nobkgnd))
    $button(86,$sub(%_height%,18),25,0,12,13,/images\rating\rating$get(rating).png,/images\rating\rating3.png,TAG:SET:$get(ratingField):3,$if(%glass%,nobkgnd))
    $button(86,$sub(%_height%,18),37,0,12,13,/images\rating\rating$get(rating).png,/images\rating\rating4.png,TAG:SET:$get(ratingField):4,$if(%glass%,nobkgnd))
    $button(86,$sub(%_height%,18),49,0,13,13,/images\rating\rating$get(rating).png,/images\rating\rating5.png,TAG:SET:$get(ratingField):5,$if(%glass%,nobkgnd))

Or something simmalar to that anyway. Now my questions is how would I make that work to rate with foo_custominfo?

I would appreciate any help.
Title: foo_custominfo
Post by: vigge on 2008-02-23 00:48:30
Have the buttons call the Custom Info menu items for rating;
Code: [Select]
//Rate buttons
        $puts(rW,12)
        $puts(rX,$eval($get(rX) + {$get(columnW) - 5*$get(rW)}/2))
        $puts(rY,$add($get(rY),2))
        $button2($get(rX),$get(rY),$mul($get(rW),4),0,$get(rW),$get(rowH),,,Rate 5,TOOLTIP:"Rate 5")
        $button2($get(rX),$get(rY),$mul($get(rW),3),0,$get(rW),$get(rowH),,,Rate 4,TOOLTIP:"Rate 4")
        $button2($get(rX),$get(rY),$mul($get(rW),2),0,$get(rW),$get(rowH),,,Rate 3,TOOLTIP:"Rate 3")
        $button2($get(rX),$get(rY),$get(rW),0,$get(rW),$get(rowH),,,Rate 2,TOOLTIP:"Rate 2")
        $button2($get(rX),$get(rY),0,0,$get(rW),$get(rowH),,,Rate 1,TOOLTIP:"Rate 1")
Title: foo_custominfo
Post by: Whatever6750 on 2008-02-23 01:45:09
Have the buttons call the Custom Info menu items for rating;
Code: [Select]
//Rate buttons
        $puts(rW,12)
        $puts(rX,$eval($get(rX) + {$get(columnW) - 5*$get(rW)}/2))
        $puts(rY,$add($get(rY),2))
        $button2($get(rX),$get(rY),$mul($get(rW),4),0,$get(rW),$get(rowH),,,Rate 5,TOOLTIP:"Rate 5")
        $button2($get(rX),$get(rY),$mul($get(rW),3),0,$get(rW),$get(rowH),,,Rate 4,TOOLTIP:"Rate 4")
        $button2($get(rX),$get(rY),$mul($get(rW),2),0,$get(rW),$get(rowH),,,Rate 3,TOOLTIP:"Rate 3")
        $button2($get(rX),$get(rY),$get(rW),0,$get(rW),$get(rowH),,,Rate 2,TOOLTIP:"Rate 2")
        $button2($get(rX),$get(rY),0,0,$get(rW),$get(rowH),,,Rate 1,TOOLTIP:"Rate 1")


I still can't manage to get it working right. I think I have got the buttons working to set a rating but the 5 heats or whatever it may be doesnt display the current rating.
Title: foo_custominfo
Post by: vigge on 2008-02-25 07:20:45
You need to draw/print the hearts/stars/images out as well, use $repeat(*,%rating%)$repeat(-,$sub(5,%rating%)) or something
Title: foo_custominfo
Post by: randmdood on 2008-03-01 05:28:31
quick question..

should this work (cuz i don't think it does, if not how would i do it)

i want to set the tag %time% as the mod of the system time and 5

I have the following set up in the context menu commands,
Display name:Custom Info/Time
Field name: TIME
Value: $mod(%_SYSTEM_SECOND%,5)

i can't see what wrong... but i have no idea what the limitations are on custominfo.. haven't really used it.
basically i want this done continually (once every second).. is it possible?
Title: foo_custominfo
Post by: Slotos on 2008-03-01 10:13:01
Everything is ok except
basically i want this done continually (once every second).. is it possible?
Title: foo_custominfo
Post by: randmdood on 2008-03-02 02:02:05
Everything is ok except

basically i want this done continually (once every second).. is it possible?


so there is no way to gewt the system time (seconds) as a variable in foobar then? cwb hooks doesn't have it in seconds.... and the field name time (in above post) only gets set when a button gets pushed setting the time.
Title: foo_custominfo
Post by: mgsisawesome on 2008-03-19 14:35:51
I am looking to import information from last.fm into the database of playcounts, but I am having trouble understanding the syntax of the txt file.  How would anyone recommend that I do that?

Thanks!
Title: foo_custominfo
Post by: carpman on 2008-03-21 22:56:37
Hi,

Does anyone know how to remove a field so it's actually removed from the custominfo_sqlite.db file? I'm trying to reduce the load on it, but can't see how a single field can be removed without flushing all the fields.

Had a look through this post and elsewhere but didn't find anything.

Any help welcome.
Thanks
C.
Title: foo_custominfo
Post by: kanak on 2008-03-21 23:29:51
Hi,

Does anyone know how to remove a field so it's actually removed from the custominfo_sqlite.db file? I'm trying to reduce the load on it, but can't see how a single field can be removed without flushing all the fields.

Had a look through this post and elsewhere but didn't find anything.


Lets say you want to remove a tag called XYZ

Then under the "Context Menu Commands" in foo_custominfo preferences, add a new entry that sets the tag XYZ to an empty value. Then make sure the "Instead of writing value, remove tag" field is checked. Apply this to all relevant tracks.
Title: foo_custominfo
Post by: carpman on 2008-03-21 23:57:02
Lets say you want to remove a tag called XYZ

Then under the "Context Menu Commands" in foo_custominfo preferences, add a new entry that sets the tag XYZ to an empty value. Then make sure the "Instead of writing value, remove tag" field is checked. Apply this to all relevant tracks.


Thanks.    I'd done the first part (intuitively seemed right) but ...
I must be blind; I hadn't even noticed that tick box -- [use with caution!] must have scared me off.
Cheers.
C.
Title: foo_custominfo
Post by: mgsisawesome on 2008-03-25 01:01:10
I think I am getting close to be able to reproduce a textfile with a perl script similar to what is produced by the plugin but I have errors when I open it in foobar.  It tells me "filename not valid."

Does anyone have any Idea what I might be doing wrong?

Thanks!

EDIT:  I fixed my first problem by specifying UTF-8 encoding when I wrote the textfile, however now I am getting an error message about an invalid header.  Should I have changed the encoding or is there a different problem with the file format?  The format of the file I create is as follows from my perl script.

Code: [Select]
open OUTFILE, ">:encoding(UTF-8)", "$outfilename"

print OUTFILE "D08C788A-7F13-40C5-B3B2-E4B4ED99E6F7";
print OUTFILE "\n<Total Tracks>";

print OUTFILE "\nfile://";
print OUTFILE $Location . "\n";
print OUTFILE "0\n4\n12\nPLAY_COUNTER\n";
print OUTFILE length($playedCount) . "\n";
print OUTFILE $playedCount . "\n";
print OUTFILE "12\nFIRST_PLAYED\n";
print OUTFILE length($firstPlayed) . "\n";
print OUTFILE $firstPlayed . "\n";
print OUTFILE "11\nLAST_PLAYED\n";
print OUTFILE length($lastPlayed) . "\n";
print OUTFILE $lastPlayed;

close OUTFILE;
Title: foo_custominfo
Post by: FootageOfACop on 2008-03-26 23:17:06
Quick question:

How can I make a script to automatically convert custominfo in the text database to an actual tag?
Title: foo_custominfo
Post by: Slotos on 2008-03-27 08:36:31
Guess tag from tag works nice IIRC.
Title: foo_custominfo
Post by: johnElectric on 2008-04-29 19:53:34
New to foobar.

I wanted this component so I could create a date-added section. It appears as if the link is down and I cannot find it anywhere else


found the new link like 4 posts up. thnx
Title: foo_custominfo
Post by: neothe0ne on 2008-06-04 00:37:48
foobar2000 0.9.5.3 obliterated my custominfo.  As in, it told me custominfo didn't work properly with 0.9.5.3, removed all the songs from my ratings-based autoplaylists, broke my ratings custominfo tag loading, and after installing 0.9.5.2 over it, my custominfo was still ****ed.  Thank God I just copied my foobar2000 folder to my laptop this morning so I didn't lose days worth of library maintenance.

Anyone else had this problem?  Is it because 0.9.5.3 removed whatever API support, whatever that means?
Title: foo_custominfo
Post by: wolfsong on 2008-06-05 14:04:46
foobar2000 0.9.5.3 obliterated my custominfo.  As in, it told me custominfo didn't work properly with 0.9.5.3, removed all the songs from my ratings-based autoplaylists, broke my ratings custominfo tag loading, and after installing 0.9.5.2 over it, my custominfo was still ****ed.  Thank God I just copied my foobar2000 folder to my laptop this morning so I didn't lose days worth of library maintenance.

Anyone else had this problem?  Is it because 0.9.5.3 removed whatever API support, whatever that means?

Yes but thankfully I store my ratings as a tag. I only used custominfo for creating some temporary playlists. I'll probably just store everything in tags going forward since tags can easily be removed.
Title: foo_custominfo
Post by: bytemastr on 2008-06-09 23:49:24
Yep, doesn't even load in 0.9.5.3 for me.


Yes.

Wolfsong, yes.

It doesn't seem to be working for me.
Title: foo_custominfo
Post by: 2E7AH on 2008-06-10 00:16:01
latest foo_playcount.dll 2.1.4. doas the similar job:

it uses %first_played%, %last_played%, %played_per_day%, %play_count%, %added% and %rating% in separate file (optional) "PlaybackStatistics.dat", only that it is not in sqlite format, and you can not add other custom tags.

too bad for foo_custominfo, i miss that component, as well
Title: foo_custominfo
Post by: neothe0ne on 2008-06-10 00:44:16
latest foo_playcount.dll 2.1.4. doas the similar job:

it uses %first_played%, %last_played%, %played_per_day%, %play_count%, %added% and %rating% in separate file (optional) "PlaybackStatistics.dat", only that it is not in sqlite format, and you can not add other custom tags.

too bad for foo_custominfo, i miss that component, as well


And where do you get foo_playcount?  I just exhausted the forum search and came up with nothing.
Title: foo_custominfo
Post by: TrNSZ on 2008-06-10 00:49:57
[deleted]
Title: foo_custominfo
Post by: Kent Wang on 2008-06-16 06:23:42
Any plans on updating this to work with the latest fb2k version?
Title: foo_custominfo
Post by: thuan on 2008-06-16 12:31:00
The original author has been AWOL from June last year till now, so likely won't happen.
Title: foo_custominfo
Post by: Hector C on 2008-06-20 03:56:01
If only I had the skill necessary ... anyway, I miss it too. I got "Live", "Cover", "Instrumental", "Mood", and others ... I am going back to the previous version
Title: foo_custominfo
Post by: Maximka on 2011-07-25 16:15:37
Download here (http://www.tkk.fi/~tahlberg/foo)


The requested URL /~tahlberg/foo was not found on this server.
Are there any mirrors? I spent half an hour, but I could not find the file foo_custominfo.dll in the whole Internet.
Title: foo_custominfo
Post by: r3v0 on 2013-10-10 09:57:29
Download here (http://www.tkk.fi/~tahlberg/foo)


The requested URL /~tahlberg/foo was not found on this server.
Are there any mirrors? I spent half an hour, but I could not find the file foo_custominfo.dll in the whole Internet.


Is this still anywhere to be found on the net?
Title: foo_custominfo
Post by: db1989 on 2013-10-10 18:50:30
I highly doubt it would be compatible with foobar2000 by now anyway, 7 years later.
Title: foo_custominfo
Post by: r3v0 on 2013-10-11 07:15:28
I highly doubt it would be compatible with foobar2000 by now anyway, 7 years later.


Yep, I read somewhere that it became incompatible.