IPB

Welcome Guest ( Log In | Register )

8 Pages V   1 2 3 > »   
Reply to this topicStart new topic
foo_custominfo, New component for "database-only tags".
Fermion
post Jun 26 2006, 16:59
Post #1





Group: Members
Posts: 55
Joined: 26-November 04
Member No.: 18351



Introduction
It is basically a 0.9 successor for Quicktag SQL, 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

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.

This post has been edited by Fermion: Jul 22 2006, 20:03
Go to the top of the page
+Quote Post
fabiospark
post Jun 26 2006, 18:38
Post #2





Group: Members
Posts: 472
Joined: 16-February 05
Member No.: 19881



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.
Go to the top of the page
+Quote Post
Fermion
post Jun 26 2006, 19:01
Post #3





Group: Members
Posts: 55
Joined: 26-November 04
Member No.: 18351



QUOTE (fabiospark @ Jun 26 2006, 20:38) *
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..
Go to the top of the page
+Quote Post
fabiospark
post Jun 26 2006, 19:28
Post #4





Group: Members
Posts: 472
Joined: 16-February 05
Member No.: 19881



QUOTE (Fermion @ Jun 26 2006, 20:01) *
QUOTE (fabiospark @ Jun 26 2006, 20:38) *

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
Go to the top of the page
+Quote Post
jkwarras
post Jun 26 2006, 19:37
Post #5





Group: Members
Posts: 808
Joined: 10-June 03
From: Zaragoza
Member No.: 7113



Oh! Thanks a lot for this Fermion smile.gif


--------------------
Iván
My Blog: http://www.ivancastell.org
Go to the top of the page
+Quote Post
perpleXa
post Jun 26 2006, 19:58
Post #6





Group: Members
Posts: 5
Joined: 28-March 04
From: Germany
Member No.: 13066



Sounds really nice.
I'll try it as soon as you've added the field window smile.gif

cheers perpleXa
Go to the top of the page
+Quote Post
bytemastr
post Jun 27 2006, 03:26
Post #7





Group: Members
Posts: 33
Joined: 15-February 06
From: Washington, DC
Member No.: 27759



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.

QUOTE (Fermion @ Jun 26 2006, 12:29) *
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...
Go to the top of the page
+Quote Post
mazy
post Jun 27 2006, 12:35
Post #8





Group: Members
Posts: 680
Joined: 11-July 03
From: Brno, Czech Rep.
Member No.: 7705



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 smile.gif

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 ...

This post has been edited by mazy: Jun 27 2006, 13:41


--------------------
info about my tag guesser script for foo_lua (preview version available):
http://www.hydrogenaudio.org/index.php?showtopic=16987
Go to the top of the page
+Quote Post
Fermion
post Jun 29 2006, 16:59
Post #9





Group: Members
Posts: 55
Joined: 26-November 04
Member No.: 18351



0.1 beta 2
- 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


QUOTE (mazy @ Jun 27 2006, 14:35) *
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... biggrin.gif

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.

QUOTE (bytemastr @ Jun 27 2006, 05:26) *
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..

This post has been edited by Fermion: Jun 29 2006, 17:05
Go to the top of the page
+Quote Post
fabiospark
post Jun 29 2006, 17:48
Post #10





Group: Members
Posts: 472
Joined: 16-February 05
Member No.: 19881



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.
Go to the top of the page
+Quote Post
Fermion
post Jun 29 2006, 18:07
Post #11





Group: Members
Posts: 55
Joined: 26-November 04
Member No.: 18351



QUOTE (fabiospark @ Jun 29 2006, 19:48) *
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. biggrin.gif 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.

This post has been edited by Fermion: Jun 29 2006, 18:22
Go to the top of the page
+Quote Post
fabiospark
post Jun 29 2006, 18:27
Post #12





Group: Members
Posts: 472
Joined: 16-February 05
Member No.: 19881



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...

This post has been edited by fabiospark: Jun 29 2006, 18:30
Go to the top of the page
+Quote Post
Fermion
post Jun 29 2006, 18:48
Post #13





Group: Members
Posts: 55
Joined: 26-November 04
Member No.: 18351



QUOTE (fabiospark @ Jun 29 2006, 20:27) *
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().
Go to the top of the page
+Quote Post
foosion
post Jun 29 2006, 19:09
Post #14





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



QUOTE (Fermion @ Jun 29 2006, 19:48) *
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.

QUOTE (Fermion @ Jun 29 2006, 19:48) *
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.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
fabiospark
post Jun 29 2006, 21:26
Post #15





Group: Members
Posts: 472
Joined: 16-February 05
Member No.: 19881



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
Go to the top of the page
+Quote Post
Tomacco_Boy
post Jun 30 2006, 23:48
Post #16





Group: Members
Posts: 71
Joined: 23-July 04
From: Australia
Member No.: 15689



Is there any chance of tagging rar's and zipped archives in the future ?


--------------------
You're talking to my guy all wrong... It's the wrong tone. Say it again, and i'll stab you in the face with a soldering iron!
Go to the top of the page
+Quote Post
foosion
post Jul 1 2006, 01:39
Post #17





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



Some comments about the custominfo SDK:

CODE
- 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
- 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
- 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
    //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
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.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
Fermion
post Jul 1 2006, 19:18
Post #18





Group: Members
Posts: 55
Joined: 26-November 04
Member No.: 18351



0.1 beta 3
- 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

QUOTE (Fermion @ Jun 29 2006, 20:48) *
QUOTE (fabiospark @ Jun 29 2006, 20:27) *

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.


QUOTE (fabiospark @ Jun 29 2006, 23:26) *
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?
Go to the top of the page
+Quote Post
Fermion
post Jul 1 2006, 21:06
Post #19





Group: Members
Posts: 55
Joined: 26-November 04
Member No.: 18351



QUOTE (foosion @ Jul 1 2006, 03:39) *
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. biggrin.gif
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.. wink.gif 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. smile.gif
Go to the top of the page
+Quote Post
foosion
post Jul 1 2006, 22:09
Post #20





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



QUOTE (Fermion @ Jul 1 2006, 22:06) *
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. biggrin.gif
Whether you like them or not, metadb handles are the key to fast metadata access in foobar2000.

QUOTE (Fermion @ Jul 1 2006, 22:06) *
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.

QUOTE (Fermion @ Jul 1 2006, 22:06) *
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.

QUOTE (Fermion @ Jul 1 2006, 22:06) *
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. smile.gif
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.


--------------------
http://foosion.foobar2000.org/ - my components for foobar2000
Go to the top of the page
+Quote Post
Peter
post Jul 2 2006, 14:57
Post #21


foobar2000 developer


Group: Admin
Posts: 3275
Joined: 30-September 01
Member No.: 84



QUOTE (Fermion @ Jul 1 2006, 22:06) *
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.. wink.gif
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.
Go to the top of the page
+Quote Post
Teukka
post Jul 2 2006, 16:55
Post #22





Group: Members
Posts: 9
Joined: 2-July 06
Member No.: 32480



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 huh.gif
Go to the top of the page
+Quote Post
fabiospark
post Jul 2 2006, 17:57
Post #23





Group: Members
Posts: 472
Joined: 16-February 05
Member No.: 19881



QUOTE (Teukka @ Jul 2 2006, 17:55) *
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 huh.gif

Probably you have "library only" checked and the files in the second playlist are not in the library.
Go to the top of the page
+Quote Post
fabiospark
post Jul 2 2006, 18:56
Post #24





Group: Members
Posts: 472
Joined: 16-February 05
Member No.: 19881



QUOTE
QUOTE (Fermion @ Jun 29 2006, 20:48) *

QUOTE (fabiospark @ Jun 29 2006, 20:27) *

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.
Go to the top of the page
+Quote Post
fabiospark
post Jul 2 2006, 20:23
Post #25





Group: Members
Posts: 472
Joined: 16-February 05
Member No.: 19881



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.
Go to the top of the page
+Quote Post

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

 



RSS Lo-Fi Version Time is now: 21st August 2014 - 21:38