HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: cwbowron on 2006-04-13 19:04:56

Title: foo_cwb_hooks
Post by: cwbowron on 2006-04-13 19:04:56
foo_cwb_hooks adds various functions and variables to global title formatting. It also adds a timestamp action to masstagger scripts, and the ability to run a script on files added to the media library (New File Tagger).

More information on my components page: http://www.bazquux.com/wiki/Foobar2000:Hooks (http://www.bazquux.com/wiki/Foobar2000:Hooks)
Title: foo_cwb_hooks
Post by: Silversight on 2006-04-13 19:25:21
The download works, but the archive is corrupted.
Title: foo_cwb_hooks
Post by: foosion on 2006-04-13 19:26:23
Is there a special reason why this function is not called "urldecode" like in other languages? Just wondering.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-04-13 19:32:32
Archive has been fixed.  I had forgotten to switch to binary mode when uploading it.

Is there a special reason why this function is not called "urldecode" like in other languages? Just wondering.


I was unaware that it was commonly called urldecode in other languages.  I do not do much work in applications that require decoding url's.  Based on that feedback, I will make it recognize either function.
Title: foo_cwb_hooks
Post by: mazy on 2006-04-25 21:49:33
cwbowron, could you, please add other functions to your hook plugin?

- playing playlist's name
- active playlist's name
- queue index of track
Title: foo_cwb_hooks
Post by: year98 on 2006-08-08 12:51:44
I would like to request

-current playback order
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-11 20:23:04
I added a couple more things today to foo_cwb_hooks:

Quote
Release 1.0.2

    * added $removethe() function which removes "The " and "A " at the beginning of a string. Good for removing articles in the names of bands.
    * added %systemdate% [yyyy-mm-dd] and %systemdatetime% [yyyy-mm-dd hh:mm:ss]
Title: foo_cwb_hooks
Post by: mazy on 2006-08-12 01:44:55
thank you for this update, cwbowron. what are you thoughts on the other requests?
Title: foo_cwb_hooks
Post by: Squeller on 2006-08-12 13:06:09
* added $removethe() function which removes "The " and "A " at the beginning of a string. Good for removing articles in the names of bands.

Erm, narrow. What if band names begin with "der, die, das, la, le, les, het, ein, eine, ...etc..."?

What we rather need is a $ltrim, $rtrim in foobars language. Well, that would be really helpful.

$ltrim('The doors','The') = ' doors'
Title: foo_cwb_hooks
Post by: mazy on 2006-08-12 16:52:58
Squeller, i'm all for new functions in tagz for some tasks that take quite some formatting to do in current version, but i still think that it's not bad idea to have such specialized function like $removethe() available - there could be some failsafe logic implemented ...
Title: foo_cwb_hooks
Post by: saivert on 2006-08-13 22:35:08
You could make a component that enables the use of LUA in order to expand the possibilities of the title formatting language. like foo_lua_formatting.
Title: foo_cwb_hooks
Post by: vlada on 2006-08-15 00:15:30
I'd like to vote for queue index. Please see also this thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=47221).
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-15 18:21:13
After looking into some of the SDK documentation, I don't know that its possible to safely add functions for activeplaylist, playing playlist or whether an item is in the database.  Queue index looks possible, but it might not be that useful depending on what you want to use the queue index for.  (if you want to display it in the playlist view, it might not be very useful because the item will not get redrawn if the queue index changes)
Title: foo_cwb_hooks
Post by: vlada on 2006-08-16 12:19:47
That's sad, that it is not possible to automatically redraw the queue indexes. Then it really won't help in what I planed to do. At least we have a queue viewer.

If somebody got an idea on how to workaround this problem I'd really appreciate it.
Title: foo_cwb_hooks
Post by: Chronial on 2006-08-17 16:17:49
I don't know if this is possible, but: just redraw all playlist entries of songs that are in the queue?
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-17 16:20:25
I don't know if this is possible, but: just redraw all playlist entries of songs that are in the queue?


I dont know that there is a way for me to tell the playlist to redraw the items.

EDIT: I may have found a way to do this using metadb::dispatch_refresh
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-17 18:07:55
I just put up 1.0.3 on my web site, which adds %queueindex%, %playinglist% and %activelist%. 

Playlist *will* get updated when the queue index changes.  The queue, the playing list and the active list are all cached via callbacks so that during handle formatting, no SDK functions should be called.
Title: foo_cwb_hooks
Post by: roentgen on 2006-08-17 19:16:17
I just put up 1.0.3 on my web site, which adds %queueindex%, %playinglist% and %activelist%. 

Playlist *will* get updated when the queue index changes.  The queue, the playing list and the active list are all cached via callbacks so that during handle formatting, no SDK functions should be called.

Finally .... great work.

Still... when there are some items in queue, and manually double click an item in the playlist the queue gets erased (why???), but %queueindex% doesn't get updated (reloading info from files seems to solve the display)
Title: foo_cwb_hooks
Post by: Chronial on 2006-08-17 19:21:11
Great work there

I have some more suggestions concerning the queue:
foobar stores the playlist of the queued file - could you make this accessible to tagz, so we can check it against %playlist_name% to see if it is really _this_ playlist entry that is enqueued? (I don't think the default %queueindex% should do this - this would keep interesting information away from us ("Is _this file_ enqueued?").

Another problem is the fact that the same file may be enqueued multiple times. It might be usefull to have a comma-seperated list of all indexes that this file is enqueued as (so we have %queueindex% and %queueindexes%).
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-17 19:32:31

I just put up 1.0.3 on my web site, which adds %queueindex%, %playinglist% and %activelist%. 

Playlist *will* get updated when the queue index changes.  The queue, the playing list and the active list are all cached via callbacks so that during handle formatting, no SDK functions should be called.

Finally .... great work.

Still... when there are some items in queue, and manually double click an item in the playlist the queue gets erased (why???), but %queueindex% doesn't get updated (reloading info from files seems to solve the display)


The manual double click thing is out side my control.

I think I know the issue with the not refreshing is, and I will fix it.

EDIT: I did fix it, 1.0.3b has been uploaded to my web site.  Get it while it's hot.
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-08-17 20:56:40
Great thing and thanks, Chris!

I tested %queueindex" and everything worked as it should do! Just like to repeat Chronials request for a comma seperated list of all indexes. But i don't think that an second variable %queueindexes% is necessary


Still... when there are some items in queue, and manually double click an item in the playlist the queue gets erased (why???)


Why? Ask Peter! 
If i would give an answer i would say: What else should happen?
Title: foo_cwb_hooks
Post by: mazy on 2006-08-17 21:58:17
just wanted to thank you, cwbowron ... this queue stuff is what many guys here, including me, wanted. %queuesize% would be nice to have (though i realize that with one track queued more than once it wouldn't be enough to find whether given queued track is last in the queue or not).
Title: foo_cwb_hooks
Post by: Chronial on 2006-08-17 23:15:00
I added some stuff and sent it to cwbowron - hope he likes it ^^.
My current format string (inserted before the tracklength):
$if(%queueindex%,'['%queueindexes%/%queuelength%']')
(With some additional colorcodes)

This gives results like:
[2/5]
[3,4/5]

looks great and gives a perfect overview of the queue.

PS:
Quote
If i would give an answer i would say: What else should happen?

The same as in winamp: keep the queue untouched.
Title: foo_cwb_hooks
Post by: vlada on 2006-08-18 00:05:08
Thanks a lot cwbowron, it works great. The queue indexes was the last feature of Winamp I've been missing in fb2k. But I agree with Chronial, that the queue shouldn't be touched if I double click a file. Is anywhere an official foobar2000 feature request thread, where I could post this?
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-08-18 13:29:45
But I agree with Chronial, that the queue shouldn't be touched if I double click a file. Is anywhere an official foobar2000 feature request thread, where I could post this?


Post just a new topic under "General". But i don't understand your problem: Why should you define a queue and then start playback by doubleclicking?
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-18 13:58:50
I incorporated the changes sent to my by Chronial and released version 1.0.4.  In addition to those changes, I renamed all the functions and variables provided by foo_cwb_hooks with a 'cwb_' prefix for potentially faster comparisons and so that i will not have to worry if other devs want to write hooking plugins.

Complete info is available at the website: http://wiki.bowron.us/index.php/Foobar2000#foo_cwb_hooks (http://wiki.bowron.us/index.php/Foobar2000#foo_cwb_hooks)
Title: foo_cwb_hooks
Post by: bfly on 2006-08-18 21:46:55
I added some stuff and sent it to cwbowron - hope he likes it ^^.
My current format string (inserted before the tracklength):
$if(%queueindex%,'['%queueindexes%/%queuelength%']')
(With some additional colorcodes)

This gives results like:
[2/5]
[3,4/5]


I don't get it. Tried putting your line in a new column, tried putting in in front of the length-column, nothing happened, althougs there are songs in the queue.

Can you explain? TIA!
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-18 21:50:37
I don't get it. Tried putting your line in a new column, tried putting in in front of the length-column, nothing happened, althougs there are songs in the queue.

Can you explain? TIA!


In the release version I added cwb_ prefixes to all the variables, so that this plugin wont step on any other potential plugins toes and for potentially faster comparisons.

Try:

Code: [Select]
$if(%cwb_queueindex%,'['%cwb_queueindexes%/%cwb_queuelength%']')
Title: foo_cwb_hooks
Post by: bfly on 2006-08-18 22:16:11
Thanks Christopher, that worked. Great plugin, thanks a lot!
Title: foo_cwb_hooks
Post by: year98 on 2006-08-19 10:29:38
Can playback order variable be possible? I think that will be a great feature...^^
Title: foo_cwb_hooks
Post by: vlada on 2006-08-19 10:31:44

But I agree with Chronial, that the queue shouldn't be touched if I double click a file. Is anywhere an official foobar2000 feature request thread, where I could post this?


Post just a new topic under "General". But i don't understand your problem: Why should you define a queue and then start playback by doubleclicking?


Sometimes I put some songs in a queue which I want to hear. Then I decide, that right now I want to listen do a certain song, so I double click it. But I'd like my queue to continue then.

It is also useful when more people are operating with the player (at a party). You don't want anybody else to delete so simply your queue.

Btw. Is it possible to delete a file from a queue?
Title: foo_cwb_hooks
Post by: thuan on 2006-08-19 13:00:14
Quote
Btw. Is it possible to delete a file from a queue?
No or not yet.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-19 15:17:09
Sometimes I put some songs in a queue which I want to hear. Then I decide, that right now I want to listen do a certain song, so I double click it. But I'd like my queue to continue then.

It is also useful when more people are operating with the player (at a party). You don't want anybody else to delete so simply your queue.

Btw. Is it possible to delete a file from a queue?


Discussion of how the queue operates and suggestions as to how it should work are well outside the scope of this plugin.
Title: foo_cwb_hooks
Post by: vlada on 2006-08-19 15:53:26
Discussion of how the queue operates and suggestions as to how it should work are well outside the scope of this plugin.


Sure, I'm sorry. Let's continue here (http://www.hydrogenaudio.org/forums/index.php?showtopic=47539).
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-08-20 14:27:34
Some ideas for new variables and functions:

1. %cwb_replaygain_mode%

2. %cwb_hotness% (look here: http://www.hydrogenaudio.org/forums/index....showtopic=31287 (http://www.hydrogenaudio.org/forums/index.php?showtopic=31287) , with permission of topdownjimmy)

3. $group()

    Examples for the group-function:

    $group(%date%,5) creates:

    1980 - 1985
    1985 - 1990
    1990 - 1995
    ...

    $group($cut(%album%,1),3) creates:

    A - C
    D - F
    G - I
    ...

What do you think?
Title: foo_cwb_hooks
Post by: Chronial on 2006-08-20 15:52:20
%cwb_replaygain_mode% is not a good idea - if you really want access to the player settings this has to be done with a more general approach - like $cwv_setting(replaygain_mode) - otherwise you will create far to many fields.

About this group function:
so it just simply round down the given value and generate something like
"*roundedvalue* - *roundedvalue*+*step*"
and the same for letters?
Title: foo_cwb_hooks
Post by: thuan on 2006-08-21 01:10:44
%cwb_replaygain_mode% is for displaying what mode you're using not set it as I see. And I don't think changing player settings with tagz string is a good idea although it seems to be convenient.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-21 01:52:59
%cwb_replaygain_mode% is for displaying what mode you're using not set it as I see. And I don't think changing player settings with tagz string is a good idea although it seems to be convenient.


I dont think anyone was suggesting that we have tagz variables set player settings.  I believe the request was to display the replaygain mode, not to be able to change.

And I am not sure that its even possible.  Title formatting hooks cannot access SDK functions because they might be called from the main thread.  The other functions work by caching the information and they can do this because there are callbacks availble that let know when the playlists change or the playing song changes.  I don't know if there are any callbacks that inform plugins when replaygain mode changes.
Title: foo_cwb_hooks
Post by: thuan on 2006-08-21 04:19:24
If it's so then maybe it should be call $cwb_info(a) with a is replaygain_mode or sth like that. I misinterpret the $cwv_setting(replaygain_mode) part.
Title: foo_cwb_hooks
Post by: Squeller on 2006-08-21 07:54:39
You have introduced two variables for displaying playlist names. I'd really appreciate variables for both, which indicate the playlists length and the current index position. I personally would like to have a $progress bar with those data in my trackinfo panel...
Title: foo_cwb_hooks
Post by: foosion on 2006-08-21 09:05:10
I don't know if there are any callbacks that inform plugins when replaygain mode changes.
I'm afraid there aren't any, though I already asked Peter about adding that some time ago, since it would be highly useful for things like a ReplayGain toolbar as well.
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-08-21 17:35:23
I have some more suggestions concerning the queue:
foobar stores the playlist of the queued file - could you make this accessible to tagz, so we can check it against %playlist_name% to see if it is really _this_ playlist entry that is enqueued? (I don't think the default %queueindex% should do this - this would keep interesting information away from us ("Is _this file_ enqueued?").


Now i know what you mean, Chronial! Can repeat the request and also the demand that %queueindex% shouldn't do it. Great would be a variable like %cwb_entry_inqueue% that is true if the entry is enqueued and false if just the file is enqueued.

Have a nice day, you all! 
Title: foo_cwb_hooks
Post by: Chronial on 2006-08-21 19:05:20
unfortunately there is no way to access the name of the playlist the file is in from within the titleformating hook.

%cwb_entry_inqueue% would also be quite problemtic since this doesn't deliver good results if the same file is enqueued multipe times.

So I thought about the problem and in my opinion the only use of such a variable would be to have the answer to one question: "on which playlist will the queue end?" - so I created a field that will hold just this information(%cwb_queue_end_playlist%). You'll have access to it, once cwbrown adds  it to his release (if he decides to do so)
Title: foo_cwb_hooks
Post by: rendom on 2006-08-21 19:33:19
Any ways to get info from specific file from playlist?
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-22 16:37:36
Release 1.0.5

*  $cwb_datediff(d1,d2) - number of days between two dates in the format yyyy-mm-dd or yyyy-mm-dd hh:mm:ss
* added %cwb_queue_end_playlist% (Chronial)
* fixed $cwb_ltrim to not automatically add a space to the paramaters
Title: foo_cwb_hooks
Post by: Squeller on 2006-08-22 17:00:47
So I thought about the problem and in my opinion the only use of such a variable would be to have the answer to one question: "on which playlist will the queue end?" - so I created a field that will hold just this information(%cwb_queue_end_playlist%). You'll have access to it, once cwbrown adds  it to his release (if he decides to do so)
I don't understand. So this is useful only in case I add files to playback queue? Now it returns "?" to my trackinfo panel (also to columns global variables)
Title: foo_cwb_hooks
Post by: Chronial on 2006-08-22 17:27:59
%cwb_queue_end_playlist% returns the playlist the last song of the queue belongs to. If there is not queue, or the llast song hast no playlist, it will return nothing ("?");
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-08-22 18:15:40
%cwb_queue_end_playlist% returns the playlist the last song of the queue belongs to. If there is not queue, or the llast song hast no playlist, it will return nothing ("?");


I understand how it works but i can't see what i should use it for. 
Title: foo_cwb_hooks
Post by: Chronial on 2006-08-22 19:39:18
Code: [Select]
$if(%cwb_queueindex%,'['$if($strcmp(%cwb_queue_end_playlist%,%playlist_name%),'->'
%cwb_queueindexes%/%cwb_queuelength%']')

I'm not sure if I used $strcmp correctly. But this should be done with color codes, after all.
Title: foo_cwb_hooks
Post by: Russell777 on 2006-08-22 21:30:53
Is it possible to get system time even when no track is playing?
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-22 21:39:58
Is it possible to get system time even when no track is playing?


Yes.
Title: foo_cwb_hooks
Post by: Squeller on 2006-08-23 20:36:44
So you made it possible for us to access the active/playing playlist: many thanks for that! But what I'm hoping for is having the total number of playlist entries accessible, just like foo_uie_playlistdropdown does. At the moment I'm abusing (http://minnit.de/etc/fb_notebook.png) the playlist dropdown just for displaying the active playlist and number of entries...
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-23 21:01:22
Release 1.0.6

    * fixed incorrect way of getting active playlist
    * added %cwb_activelist_count% and %cwb_playinglist_count%
Title: foo_cwb_hooks
Post by: Russell777 on 2006-08-23 22:03:12
Thank you for this component and for updating it! Is it possible to implement a command that gets
the volume value?
Title: foo_cwb_hooks
Post by: lhaymehr on 2006-08-24 01:27:23
Could you add system colors to this plugin?
Title: foo_cwb_hooks
Post by: Stuart60611 on 2006-08-24 02:19:00
I think it would awesome if you could add hotness and hot_color.  A lot of people use the hotness code, and it is now as far as I know not possible to display such data in the track info. panel.  With this addition, one would be able to do so.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-24 03:23:43
I think it would awesome if you could add hotness and hot_color.  A lot of people use the hotness code, and it is now as far as I know not possible to display such data in the track info. panel.  With this addition, one would be able to do so.


If someone posts the formula for hotness I will look into it.
Title: foo_cwb_hooks
Post by: Stuart60611 on 2006-08-24 04:16:17
I think it would awesome if you could add hotness and hot_color.  A lot of people use the hotness code, and it is now as far as I know not possible to display such data in the track info. panel.  With this addition, one would be able to do so.

If someone posts the formula for hotness I will look into it.


Hotness Code (topdownjimmy's original code and modified by others).
Note:  change %play_counter% if using official statistics component to %play_count%.

Code for global variables tab:
Code: [Select]
// hourly decay version (hotness)
/////////////////////////////////////////

// baselines: define baseline frequency and decay periods
//
// baselinefrequency: decrease if songs stay hot too long
// baselinedecay: decrease if too many songs are hot
//
$puts(baselinefrequency,14)   
$puts(baselinedecay,7)   

// convert baselines to hours
$puts(baselinefrequency,$mul($get(baselinefrequency),24))   
$puts(baselinedecay,$mul($get(baselinedecay),24))   

// calculate "age": the number of hours the song has been in the library
// actually it's just hardcoded ^^
$puts(age,$mul(%play_counter%,$get(baselinefrequency)))   

// calculate "recentness": number of hours since song was last played
$puts(recentness,
$sub(
$add(
$mul(
$add(
$mul($right(%_system_year%,2),365),
$select(%_system_month%,0,31,59,90,120,151,181,212,243,273,304,334),
$add($div($right(%_system_year%,2),4),$if($or($greater(%_system_month%,2),$greater($mod(%_system_year%,4),0)),1,0)),
%_system_day%
),
24
),
%_system_hour%
)
,
$add(
$mul(
$add(
$mul($substr(%last_played%,3,4),365),
$select($substr(%last_played%,6,7),0,31,59,90,120,151,181,212,243,273,304,334),
$add($div($substr(%last_played%,3,4),4),$if($or($greater($substr(%last_played%,6,7),2),$greater($mod($substr(%last_played%,1,4),4),0)),1,0)),
$substr(%last_played%,9,10)
),
24
),
$substr(%last_played%,12,13)
)
)
)   

// calculate "decay": the specific decay period
$puts(decay,$div($mul(%play_counter%,$get(baselinefrequency),$get(baselinedecay),$if2(%rating%,$get(avgrating))),$mul($max($get(age),$get(baselinefrequency)),3)))   

// calculate "hotness"
$puts(hotness,$div($mul($max($sub($get(decay),$get(recentness)),0),100),$get(decay)))

$set_global(hotness,$get(hotness))
$set_global(hot_color,$blend(000000|000000,0000FF|0000FF,$get(hotness),100))

/////////////////////////////////////////

Display hotness with $get_global(hotness).  This will diplay a hotness value of 0-100.  I use a character to display my hotness (along with the hotness color) and no number, such as $char(9650).  You access hotness color with the hot_color variable and can set column custom style with $set_style(text,$get_global(hot_color),$get_global(hot_color)).  You custom sort the column with $num($get_global(hotness),3).  You have to have all three boxes checked under global variables tab, except legacy support and obviously all three boxes checked on the hotness column.
Title: foo_cwb_hooks
Post by: Squeller on 2006-08-24 04:55:19
cwbowron you are fast, thank you. I am ashamed to ask again, but could you maybe add a function with a value for the total play time of a playlist (similar to %length% in the playlist dropdown plugin).
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-08-24 10:41:00
I think it would awesome if you could add hotness and hot_color.  A lot of people use the hotness code, and it is now as far as I know not possible to display such data in the track info. panel.  With this addition, one would be able to do so.


The most amazing thing is that you can use %cwb_hotness% in any media library viewer to organize your database! 
Title: foo_cwb_hooks
Post by: cwbowron on 2006-08-24 13:19:53
Quote
If someone posts the formula for hotness I will look into it.



Hotness Code (topdownjimmy's original code and modified by others).
Note:  change %play_counter% if using official statistics component to %play_count%.

Code for global variables tab:

<SNIP>

Display hotness with $get_global(hotness).  This will diplay a hotness value of 0-100.  I use a character to display my hotness (along with the hotness color) and no number, such as $char(9650).  You access hotness color with the hot_color variable and can set column custom style with $set_style(text,$get_global(hot_color),$get_global(hot_color)).  You custom sort the column with $num($get_global(hotness),3).  You have to have all three boxes checked under global variables tab, except legacy support and obviously all three boxes checked on the hotness column.


I want a formula.  I dont want the whole complicated tagz mess.
Title: foo_cwb_hooks
Post by: FofR on 2006-08-24 15:53:22
I updated the wiki page with the info on the official site, just to help out:
Wiki (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:0.9_CwBowron%27s_Title_formating_%28foo_cwb_hooks%29)
Feel free to edit it and include useful tags etc.
Title: foo_cwb_hooks
Post by: Stuart60611 on 2006-08-24 15:58:06

Quote
If someone posts the formula for hotness I will look into it.



Hotness Code (topdownjimmy's original code and modified by others).
Note:  change %play_counter% if using official statistics component to %play_count%.

Code for global variables tab:

<SNIP>

Display hotness with $get_global(hotness).  This will diplay a hotness value of 0-100.  I use a character to display my hotness (along with the hotness color) and no number, such as $char(9650).  You access hotness color with the hot_color variable and can set column custom style with $set_style(text,$get_global(hot_color),$get_global(hot_color)).  You custom sort the column with $num($get_global(hotness),3).  You have to have all three boxes checked under global variables tab, except legacy support and obviously all three boxes checked on the hotness column.


I want a formula.  I dont want the whole complicated tagz mess.



Sorry, I don't know the formula, but I only can provide you the code.  Perhaps, pm topdownjimmy, and he can provide you with what you need.
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-08-24 16:03:49
I had some ideas for special functions but don't like to post them now because i don't know if they are realizable at all.
Is it possible that a function calculates a value for a file wich is not builded by other Tags/values of the file but from other files wich have one common tag with the source file. That would happen by looking into database.

Because my english is too bad to express correctly what i mean here two examples.

$avg(%rating%,%album% %discnumber%) would give back the average rating of the album the file belongs to

$sum(%_length%,%album% %discnumber%) would give back the length of whole album

Or more common:

$statistic_function(Value,Of_same)
Title: foo_cwb_hooks
Post by: Chronial on 2006-08-24 17:01:12
No, this is not possible.

It would be way to slow to collect this data every time titelformating is done.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-01 17:32:30
Release 1.0.7

* %cwb_next_title% - title of the next song in the playlist of the playing item or the next item in the queue
* %cwb_next_artist% - artist of the next song in the playlist of the playing item or the next item in queue
* %cwb_playback_order%
Title: foo_cwb_hooks
Post by: TheTravis on 2006-09-01 17:35:41
Release 1.0.7

* %cwb_next_title% - title of the next song in the playlist of the playing item or the next item in the queue
* %cwb_next_artist% - artist of the next song in the playlist of the playing item or the next item in queue
* %cwb_playback_order%


cwbowron, thank you!
Title: foo_cwb_hooks
Post by: mazy on 2006-09-01 19:44:25
nice additions, cwbowron!

could you add something like %cwb_next_path%?
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-01 19:50:07
could you add something like %cwb_next_path%?


I'm planning to add an option that would let you define a string or two, and then retrieve the 'next' version of it like.

So you'd define the variable as %path% and then you'd be able to retrieve its value for the next track such as %cwb_next_userdef%.
Title: foo_cwb_hooks
Post by: ktr on 2006-09-01 21:24:39
Thank you for this component and for updating it! Is it possible to implement a command that gets
the volume value?


i would appreciate that, too.
Title: foo_cwb_hooks
Post by: thuan on 2006-09-02 01:45:45
Thanks  for your handy plugin. Could you do something about the late update of %cwb_next_title%, when a new song start the next song still the old one in the balloon tooltip. I use latest ColumnUI BTW.
Title: foo_cwb_hooks
Post by: mazy on 2006-09-02 10:50:43
I'm planning to add an option that would let you define a string or two, and then retrieve the 'next' version of it like.

So you'd define the variable as %path% and then you'd be able to retrieve its value for the next track such as %cwb_next_userdef%.

that would be nice! but what about something like $cwb_next(tag) then?
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-09-02 21:40:06
I tried following things without succes:
In PT i created a query with source "@playlist<%cwb_playinglist%>" or "@playlist<%cwb_activelist%>".

Is it an issue with PT or with this component?
Title: foo_cwb_hooks
Post by: Sw!ng on 2006-09-03 10:46:59
Handy, very handy Component ... THNX !!

I wonder that noone asks for a variable, to get the "Stop After Current" - Value ...!!
Title: foo_cwb_hooks
Post by: Chronial on 2006-09-03 16:10:18
About the %_replaygain_mode% request:
This can be done rather easily - just check on every playback start (this is the only time the mode can realy change). So you'll have a %_used_replaygain_mode%. The only problem left it that you'd have to refresh all title formatting as this affects all tracks.
If you do so, this would require a config dialog to switch it off.
But even without refreshing it would be useful - as it could be used in track info pannel, prettypop and similar displays.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-05 15:50:04
I tried following things without succes:
In PT i created a query with source "@playlist<%cwb_playinglist%>" or "@playlist<%cwb_activelist%>".

Is it an issue with PT or with this component?


Its an issue that Playlist Tree doesnt support tagz in the query source designator.
Title: foo_cwb_hooks
Post by: Stuart60611 on 2006-09-11 04:54:07
Request.  cwb_followcursor.
Title: foo_cwb_hooks
Post by: AsD on 2006-09-11 14:42:22
Thanks for the plugin.
I have 3 requests:
1 cwb_stop_after_current
2 cwb_is_playing
3 cwb_is_paused

The last 2 should work like in foobar 8. I mean with all the instances of the file even if the playlist is broken (for foo browser)

Thanks again!
Title: foo_cwb_hooks
Post by: alphaex32 on 2006-09-11 17:54:46
Would it be possible to add a function that can indicate which column is currently selected for sorting the columnsUI playlist? That way, we could have conditional formatting based on whether the playlist is being sorted by album, artist, etc.
Here's what it might look like:
$ifequal(cwb_sort_column,2,$rgb(239,235,231),$rgb(133,87,204))
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-11 18:10:31
Would it be possible to add a function that can indicate which column is currently selected for sorting the columnsUI playlist? That way, we could have conditional formatting based on whether the playlist is being sorted by album, artist, etc.


not possible.
Title: foo_cwb_hooks
Post by: alphaex32 on 2006-09-11 18:20:17
Would it be possible if it were implemented in columnsUI directly?
This just gave me a really good idea, though. How about implimenting some sort of user definable global variables whose values can be changed using events (i.e. toolbar buttons, menu, keyboard shortcuts, etc.). These variables could then be retrieved in formatting strings to change formatting based on the value of that variable. This would allow us, for example, to hit a toolbar button which could instantly change the formatting of the playlist.
Here's what it might look like:
$ifequal(cwb_globalvar_A,1,$rgb(239,235,231),$rgb(133,87,204))
Title: foo_cwb_hooks
Post by: fabiospark on 2006-09-11 19:08:52
Are all the variables added by cwb_hooks working in the various trackinfo panels and outside Foobar? (I'm using a Samurize screensaver that is a sort of a trackinfo panel too, to show the now playing info).

Thanks.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-11 19:28:56
Are all the variables added by cwb_hooks working in the various trackinfo panels and outside Foobar? (I'm using a Samurize screensaver that is a sort of a trackinfo panel too, to show the now playing info).


It should work any place where title formatting can happen.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-11 21:56:49
Release 1.0.8
    *  %cwb_stopaftercurrent%
    * %cwb_followcursor%
    * if follow cursor mode is enabled, cwb_next_artist and cwb_next_title will now be correct
Title: foo_cwb_hooks
Post by: pepoluan on 2006-09-11 22:04:52
Mods: With all the amazing functions this plugin provided, shouldn't the thread's title be changed?
Title: foo_cwb_hooks
Post by: Hamallainen on 2006-09-11 22:12:53
I really like this plugin, especially the playback queue fonctions
Thanks a lot
Title: foo_cwb_hooks
Post by: Stuart60611 on 2006-09-12 17:36:50
Thanks for creating this wonderful component and adding cwb_followcursor!  Several other suggestions:

First, I think cwb_queuecount should be added so that it is consistent with the other fields for providing both the length and item count for the queue as is the case with active and playing playlists.

Second,  which is already listed on requested features,, fields for the length of the active and playing playlist should be added so that one can display the item count and length of the active and playing playlist.

Third, the only real problem with the component is its inability to refresh in displays for cwb_playlinglist and cwb_activelist.  Once this bug is ironed out, one can create a complete display showing the active playlist count, length, and the same for the queue and playing playlist.


Again, thanks for creating this great component, and I look forward to the above issues being resolved.

Best regards.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-12 18:14:37
First, I think cwb_queuecount should be added so that it is consistent with the other fields for providing both the length and item count for the queue as is the case with active and playing playlists.


%cwb_queuelength% is already available.  The naming is a little different (length vs count) but its the same functionality.  Perhaps I will rename it at some point to avoid confusion with a length in seconds vs an item count.

Quote
Third, the only real problem with the component is its inability to refresh in displays for cwb_playlinglist and cwb_activelist.  Once this bug is ironed out, one can create a complete display showing the active playlist count, length, and the same for the queue and playing playlist.


That's not really a bug, its more of a limitation of the title formatting in foobar2000.  It is possible to tell components when the info relating to a file has changed, but since the playinglist and activelist do not correspond to a file, there's no good way to tell other components that that information has changed.  My best guess at a good way to do it, might be to post a message that the information for the currently playing song has changed because I would think that most of the displays that would include %cwb_playinglist% and %cwb_activelist% would relate to information about the current song (trackinfo panel, statsusbar, etc)
Title: foo_cwb_hooks
Post by: Chronial on 2006-09-12 18:23:59
Have you ever tried doing a hardcore full-db refresh?
If this does not crash the player and locks it for anything below one second I think that's an option.
But that would need you to add a config panel. But I don't believe you can avoid that a lot longer after all ;)
I think a selection for "information not belonging to any track / general information" to refresh either nothing, just the playing song or the whole DB would be a good solution.
Title: foo_cwb_hooks
Post by: foosion on 2006-09-12 19:16:45
I think a selection for "information not belonging to any track / general information" to refresh either nothing, just the playing song or the whole DB would be a good solution.
That's not a good solution, that's an inane workaround. Suppose the user has 100000 tracks in the library, and the currently displayed track is neither playing nor in the library.

The available events used in conjunction with titleformatting only cover track and playback related changes; they are not suitable to handle unrelated state changes (including the time of day and various configuration options). If you still want to be able to access these in formatting scripts, it might be time to collaborate with the relevant parties to set up a framework for just that - instead of doing something that might only get the component on the list of known potential troublemakers.
Title: foo_cwb_hooks
Post by: Chronial on 2006-09-12 21:20:56
As far as i've seen it, updating the whole Db will only notify the components displaying those tracks to update. Someone with 100000 (who will get quite some performance Problems with foobar and most components ;) won't have all those 100000 tracks "in use" - so sending an update for the whole db will actually refresh about 1000 tracks - in any case not more than is done at startup after all.
I said it has to be tested and if it's gives acceptable results should be added as an _option_.
(If this "brute force" method works, one could als refresh the playing and the active playlist to the refresh - this should for sure refresh every track the user is able to see)

Quote
If you still want to be able to access these in formatting scripts, it might be time to collaborate with the relevant parties to set up a framework for just that.

Well, I haven't jet seen Peter beeing very interested in user requests (if this is good or not is another topic).

Every component affects the performance and stability of foobar - it's allways up to the user to decide if he wants to trade preformance/stability for this specific feature.
It don't think this is sollution is very hackish after all (but I won't argue about that - I'm sure you're more experienced with the foobar SDk ;)
Title: foo_cwb_hooks
Post by: Peter on 2006-09-12 21:26:08
It don't think this is sollution is very hackish after all
This "not very hackish after all" solution doesn't even guarantee that relevant track gets refreshed.
Title: foo_cwb_hooks
Post by: Peter on 2006-09-12 21:43:08
I don't want to get into pointless arguments here, but the metadb_display_hook API was meant to show info that directly describes the item being queried (and not global data), and affected items should be refreshed properly.
I see that for some users and even developers, reliability of their software is secondary priority. I won't bother trying to convince you to stop this.
Most of these features are not provided by default for efficiency reasons (would require massive refresh dispatch on any configuration / playback state / etc change), and no hack that you can come up with will both work reliably and avoid efficiency issues (*). If anything, these variables should be directly provided by the UI part that people try to use them with (playlist view, now playing track display, whatever) that can refresh itself when relevant variable changes.

[edit]
(*) In fact, there is no way to get all tracks that are possibly displayed somewhere at all, so you run into reliability issues no matter what you do. No, refreshing entire Media Library does not guarantee refreshing every possible displayed track, because user may be eg. working with newly acquired content that hasn't been moved to the Media Library folders yet.
Title: foo_cwb_hooks
Post by: Peter on 2006-09-12 22:04:15
As far as i've seen it, updating the whole Db will only notify the components displaying those tracks to update. Someone with 100000 (who will get quite some performance Problems with foobar and most components  won't have all those 100000 tracks "in use" - so sending an update for the whole db will actually refresh about 1000 tracks - in any case not more than is done at startup after all.
I said it has to be tested and if it's gives acceptable results should be added as an _option_.
(If this "brute force" method works, one could als refresh the playing and the active playlist to the refresh - this should for sure refresh every track the user is able to see)
Amount of false verifiable info in just the above quote offends me.
People have successfully used foobar2000 with close to 100000 tracks. The performance is not what I'd call "perfectly smooth", but it's by several magnitudes better than most of other software. I'll leave flaming you for that statement to TrNSZ when he shows up. I have to credit him for making me invent the metadb_handle system in first place, when the old approach underperformed with his old library of about 20000 tracks.
Updating whole media library with each playback state, playback queue state, system time etc change will:
- Cause full rebuild of all autoplaylists etc - which means running some query on all items in the library, possibly repeatedly if multiple autoplaylists exist.
- Totally kill performance of any other realtime ML viewers (autoplaylist is the only one I'm currently aware of, but we plan to add autorefresh to Album List sooner or later).
Title: foo_cwb_hooks
Post by: Chronial on 2006-09-12 22:04:30
Well, every user has his own POV regarding reliability (at least 20% of the private computer systems i'm seeing start up with some kind of fatal error/virus message which is then clicked away and explained to be "normal").
I for sure know that this will allways be connected with effiency and reliability  issues, and I for sure wouldn't use such a feature myself.
But I haven't yet seen a component that shows infos about songs neither in the db nor in the currently playing nor in the active playlist.

So you'd say that we should provide a interface for other components to use these new title formating vars and hope for them to implement it?

Quote
People have successfully used foobar2000 with close to 100000 tracks. The performance is not what I'd call "perfectly smooth", but it's by several magnitudes better than most of other software.

I never said anything else. But while the job is very well done on your side, many component authors did not think about such big databases resulting in performance issues. I'm sure foobar will handle those 100000 tracks quite perfectly in default setup on a halfway modern machine unless you do something very stupid (like adding the whole DB 100 times to a playlist :D).

Btw. I have to gratulate you on very thought-throught API you are providing for foobar - as seen in it's full grace in the implementation of the queue variables ;).

Quote
Updating whole media library with each playback state, playback queue state, system time etc change will:
- Cause full rebuild of all autoplaylists etc - which means running some query on all items in the library, possibly repeatedly if multiple autoplaylists exist.
- Totally kill performance of any other realtime ML viewers (autoplaylist is the only one I'm currently aware of, but we plan to add autorefresh to Album List sooner or later).

quote me:
Quote
I said it has to be tested and if it's gives acceptable results should be added as an _option_.

So you're saying as long as you are not using autoplaylist or a realtime ML viewer (which are horrible idea after all - I don't want to wait for this damn thing to reload my 20000 tracks just to listen to that one new song oO) we are safe to send a update for the whole library? :P (Just kiddin ;)
Title: foo_cwb_hooks
Post by: foosion on 2006-09-12 22:33:18
So you'd say that we should provide a interface for other components to use these new title formating vars and hope for them to implement it?
That's exactly what I was getting at. In the old days people weren't afraid to create and publish their own services. Asking the right people to support it can be a big help in getting such communication between components to work.  As far as I can see this functionality is mostly desired for use in the track info panel, so that you should probably talk with terrestrial about a solution.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-13 13:31:19
That's exactly what I was getting at. In the old days people weren't afraid to create and publish their own services. Asking the right people to support it can be a big help in getting such communication between components to work.  As far as I can see this functionality is mostly desired for use in the track info panel, so that you should probably talk with terrestrial about a solution.


In the next version of cwb_hooks I will make a callback service that plugins interested in getting notifications of the change in a variable can implement.  I'm thinking the best way to do it is to pass the name of the relevant variable to the callback function so that plugin writers can do a quick strstr() or equivalent function to test whether that variable appears in a formatting string.
Title: foo_cwb_hooks
Post by: ...Just Elliott on 2006-09-13 22:27:52
If there's one feature in this, I'm going to start using it. That feature is:

information about the current dB (or similar level) of the track, maybe average track dB etc. - This would allow for some VERY interesting effects.

hope it could be included, that would be killer :-)
Title: foo_cwb_hooks
Post by: alphaex32 on 2006-09-13 23:15:32
I'd just like to restate my suggestion for some kind of global variable system to store values that can be used by formatting strings and changed by buttons, menus, etc.
Title: foo_cwb_hooks
Post by: Kirya on 2006-09-13 23:22:40
Please, add %cwb_next_directoryname%. It would be great
Title: foo_cwb_hooks
Post by: Squeller on 2006-09-14 02:43:24
Looks like a bug: When switching to an autoplaylist, %cwb_activelist% does not refresh in my trackinfo_mod panel. It does refresh on all other playlists.

EDIT. Hmm. After playing a track in this playlist for the first time, %cwb_activelist% now always refreshes, no matter if it is active or not. Maybe this is a more general issue with new playlists (the autoplaylist I meantioned above was newly created).

EDIT2: The problem is the following: If no playlist entry is marked, the variable doesn't get refreshed.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-14 14:10:27
I just released 1.0.9, but it should not have any user visible changes.  Details on the callback service are availble at http://wiki.bowron.us/index.php/Foobar2000...per_Information (http://wiki.bowron.us/index.php/Foobar2000#Developer_Information).  I will contact terrestrial and see if he is willing to support this in foo_trackinfo_mod

Quote
Release 1.0.9

    * added service so other components can get notified of changes to cwb_hook variables
Title: foo_cwb_hooks
Post by: Squeller on 2006-09-16 15:14:17
Could you introduce %cwb_autoplaylist% as a binary variable which detects, if a playlist is an autoplaylist?
Or does someone know if this is already possible with maybe another plugin?
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-09-18 18:25:21
There is a situation there %cwb_next_title% won't show the next title wich is going to be played after the current one: If the last track in the queue wasn't added from a playlist but from a media library viewer (PT, Database search,...).
Title: foo_cwb_hooks
Post by: kockroach on 2006-09-21 04:41:08
Hey cwbowron,  I was wondering if it might be possible to add in "%cwb_next_album% to the available strings.

Thanks!

Edit:  A question for you as well.  Do these strings not work in Columns_UI?
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-21 13:19:04
Hey cwbowron,  I was wondering if it might be possible to add in "%cwb_next_album% to the available strings.


I'm adding two user definable strings for the next track.  By default they are going to be album and path.

Quote
Edit:  A question for you as well.  Do these strings not work in Columns_UI?


They should, but it might not be getting updated correctly, depending on which variables you are using and where you are using them.
Title: foo_cwb_hooks
Post by: kockroach on 2006-09-21 15:09:48
They should, but it might not be getting updated correctly, depending on which variables you are using and where you are using them.

I think it is how I was trying use them....or at least how I thought they could be used.  For some reason I was thinking that %cwb_next_artist% was going to allow me to pull info from any track, not just the selected (or playing) track.  I was planing to used this to group unrelated tracks under a single heading in the Single Column Playlist.  Unfortunately, it won't work as the strings only work with selected tracks.
Title: foo_cwb_hooks
Post by: Erich w/ an h on 2006-09-21 21:51:06
Hey cwbowron,  I was wondering if it might be possible to add in "%cwb_next_album% to the available strings.


I'm adding two user definable strings for the next track.  By default they are going to be album and path.


what about previous as well? and how far ahead can you look? for example, can you do something like this:

$cwb_next(#,tag)
$cwb_prev(#,tag)

where the # is how many tracks ahead/back, and the tag is the tag to read?

thanks for the plugin, btw. Great stuff
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-21 21:58:45
what about previous as well? and how far ahead can you look? for example, can you do something like this:

$cwb_next(#,tag)
$cwb_prev(#,tag)

where the # is how many tracks ahead/back, and the tag is the tag to read?


You cannot really do $cwb_next or $cwb_prev function because you really are not supposed to work with other files and stuff inside a title formatting callback.  cwb_hooks works around this by caching all the information and just retrieving it from its own variables.  This is why it is limited to next_artist, next_title, next_user1, and next_user2.
Title: foo_cwb_hooks
Post by: Sartorius on 2006-09-22 06:19:33
Is it possible to make %cwb_next_user1% avaiable for EACH track of the playlist?
I really need it to determine first (or last) track in a folder.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-22 13:16:01
Is it possible to make %cwb_next_user1% avaiable for EACH track of the playlist?
I really need it to determine first (or last) track in a folder.


No.

No more requests regarding %cwb_next_*%.
Title: foo_cwb_hooks
Post by: Chronial on 2006-09-22 13:55:07
To explain cwbworon's answer a little bit further:
While title formating is done, the only accessible data is data stored in the current Song, or data the plugin got from foobar before title formating was running.
Info about next song is not aviable at all, cwbowron does make quite some assumbtions about foobars behaviour to get the data for the next song - so this feature is allready quite buggy.
Developing any further into that direction does not make any sense at all.
Title: foo_cwb_hooks
Post by: Hamallainen on 2006-09-22 14:13:24
Hi

I have a request. I would really like to get rid of the status bar. But right now i can't because it displays some infos that we can see nowhere else. I would prefer to have those infos displayed the way i want in a trackinfo panel.
What i would need is the volume level (i think it has already been requested) and the length of the selected item(s) in the active playlist.
Is it possible ?

Thanks
Title: foo_cwb_hooks
Post by: reardon on 2006-09-22 16:25:48
Quote
No.

No more requests regarding %cwb_next_*%.


Well, I just gotta try:  clearly you can't do things against the file itself.  But perhaps you could at least allow for a simple cwv_prev in addition to the existing cwb_next.  Cache as before.  Don't worry about iterators or indexing or arbitrary field lookup (I agree its too much and violates the whole spirit of the quick callback).  But, for me and others, a quick look back allows for proper album formatting, better "now playing" experience, etc., while a glance forward does not.  I only know if the current track is the first on an album if it differs from the one prior (you cannot rely on tracknumber=1)

Also, your solution for user-definable is appropriate and tuned properly, not overkill.  Good idea.

For me cwb_prev would actually be more useful than cwb_next, and arguably (my dull understanding of the fb interface in question) cleaner/legal.

+Reardon
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-22 16:32:23
Well, I just gotta try:  clearly you can't do things against the file itself.  But perhaps you could at least allow for a simple cwv_prev in addition to the existing cwb_next.  Cache as before.  Don't worry about iterators or indexing or arbitrary field lookup (I agree its too much and violates the whole spirit of the quick callback).  But, for me and others, a quick look back allows for proper album formatting, better "now playing" experience, etc., while a glance forward does not.  I only know if the current track is the first on an album if it differs from the one prior (you cannot rely on tracknumber=1)


What would you use this for?
Title: foo_cwb_hooks
Post by: reardon on 2006-09-22 16:56:20
What would you use this for?


#1 usage is for proper album formatting (grouping).  Currently there is no reliable way of doing this.  With cwb_prev I can simply test whether the previous track is part of the same album as current track.  Relying on tracknumber==1 is not useful.  There are too many scenarios, some because of sorts and more often because of ad-hoc playlists, where that test is invalid for album grouping.

Secondary usage is for Now Playing stuff... allowing for the last track info to be displayed.  Just a simple way of answering the "what was that last song?" question in my main music hall, mostly for guests.

+Reardon
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-22 17:08:42
#1 usage is for proper album formatting (grouping).  Currently there is no reliable way of doing this.  With cwb_prev I can simply test whether the previous track is part of the same album as current track.  Relying on tracknumber==1 is not useful.  There are too many scenarios, some because of sorts and more often because of ad-hoc playlists, where that test is invalid for album grouping.


This is not possible.  Even if I did add %cwb_prev_% variables, they would only refer to the LAST PLAYED track, not the previous track for every entry in the playlist.  What you are asking for is not possible inside a title formatting callback.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-22 22:49:15
Quote
Release 1.0.11

    * %cwb_volume%
    * %cwb_selection_duration% - in seconds
    * %cwb_activelist_duration%
    * %cwb_playinglist_duration%
    * $cwb_hms() converts a time in seconds into hh:mm:ss
    * %cwb_playback_state% - stop, play, pause
Title: foo_cwb_hooks
Post by: mazy on 2006-09-22 23:05:26
amazing, cwbowron, thank you!
Title: foo_cwb_hooks
Post by: Hamallainen on 2006-09-22 23:48:40
Wow that's wonderful, thank you so much
Bye Bye status bar 
Title: foo_cwb_hooks
Post by: random.n on 2006-09-23 01:21:08
Bye bye status bar indeed! All that's left is %cwb_activelist_locked% and %cwb_activelist_lockname%.
Title: foo_cwb_hooks
Post by: Squeller on 2006-09-23 10:49:36
* $cwb_hms() converts a time in seconds into hh:mm:ss
Could you maybe make this more universal?

I'm dreaming of: $cwb_timeconv(%variablewithseconds%,wk,dd,hh,mm,ss,nn)

so that we can have the string:

$get(wk) weeks $get(dd) days $get(hh) hours ...

I know we could do the conversion ourselves, but a) the complex code and b) probably better performance if you do the conversions...
Title: foo_cwb_hooks
Post by: Sw!ng on 2006-09-23 14:10:24
Ahm, sorry, it seems that I missed something ...

---> What is the difference from %cwb_queueindexes% to %cwb_queueindex% ...??
For me, both show the same value ...
Title: foo_cwb_hooks
Post by: Hamallainen on 2006-09-23 14:21:43
What is the difference from %cwb_queueindexes% to %cwb_queueindex% ...??

If an item is present 2 (or more) times in the playback queue, %cwb_queueindexes% will display all its indexes and %cwb_queueindex% will display only the first index.
You can try by adding many times the same song
Title: foo_cwb_hooks
Post by: Chronial on 2006-09-23 15:05:13
Just enqueue the same file multiple times and you will see the difference:
%cwb_queueindex% holds _one_ number - the first index of this file in the queue
%cwb_queueindexes% holds a comma seperated list of numbers - all indexes of this file in the queue
As long as the file is only enqueued once, they both hold the same value.
Title: foo_cwb_hooks
Post by: Blitzmeister on 2006-09-23 16:01:58
If someone could help me please..  How would one use %cwb_activelist_duration% & cwb_hms() converts a time in seconds into hh:mm:ss (Together to make a tracklist into Hours minutes & seconds)??

Cheers
Title: foo_cwb_hooks
Post by: Hamallainen on 2006-09-23 16:15:28
If someone could help me please..  How would one use %cwb_activelist_duration% & cwb_hms() converts a time in seconds into hh:mm:ss (Together to make a tracklist into Hours minutes & seconds)??

Code: [Select]
$cwb_hms(%cwb_activelist_duration%)

Works for me, i don't know why it would not for you
Title: foo_cwb_hooks
Post by: Blitzmeister on 2006-09-23 16:34:19
Thanks  It works until you add or remove songs & the time stays the same.  Does it need to use --> refresh cwb_next_* on playlist operations (reorder,add,remove) in any way??

Cheers
Title: foo_cwb_hooks
Post by: Hamallainen on 2006-09-23 17:06:26
It works until you add or remove songs & the time stays the same.

You are right. I don't know if it's supposed to be like this or if it's a bug. Sorry
Title: foo_cwb_hooks
Post by: Chronial on 2006-09-23 17:30:41
Come on, do some reading for you self, we're not your library.
Title: foo_cwb_hooks
Post by: Stuart60611 on 2006-09-24 17:38:59
I searched the threads and could not find the code for this.  I want to convert the value displayed in seconds for %cwb_playinglist_duration% to days:minutes:seconds in a simlar fashion to the way playlist dropdown displays this data.  Anyone know of the appropriate code?
Title: foo_cwb_hooks
Post by: Yotsuya on 2006-09-24 17:45:55
$cwb_hms(%cwb_playinglist_duration%)
Title: foo_cwb_hooks
Post by: Stuart60611 on 2006-09-24 18:25:34
Request:

%cwb_playlist%, %cwb_playlist_count% and %cwb_playlist_duration%.  I am writing the code to display certain playlist info with trackinfo mod.  However, I want to display the item count for particular playlist which may or may not be active or playing.  As such, these hooks would make it possible.  The user could define the name for %cwb_playlist%, and the other two variables could automatically store the count and duration for the user defined playlist.
Title: foo_cwb_hooks
Post by: Infernus on 2006-09-24 19:28:51
Would it be possible that the %cwb_next*% variables show the right next fields even when playback order is shuffle (track, directory, album)?
By now it shows false next fields and have to be sorted out.
The same with order: repeat
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-24 23:39:14
Would it be possible that the %cwb_next*% variables show the right next fields even when playback order is shuffle (track, directory, album)?


No, not really.

But with %cwb_playback_order% you can test to see what the playback order is and not use %cwb_next_*% if its not really going to work.
Title: foo_cwb_hooks
Post by: metal_termite on 2006-09-25 03:13:45
Would it be possible to add something like %cwb_audioscrobbler% to check if foo_audioscrobbler has submitted a track or not?

%cwb_audioscrobbler% = 0, when false
%cwb_audioscrobbler% = 1, when true
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-25 13:18:33
Would it be possible to add something like %cwb_audioscrobbler% to check if foo_audioscrobbler has submitted a track or not?

%cwb_audioscrobbler% = 0, when false
%cwb_audioscrobbler% = 1, when true


No, that should be done in foo_audioscrobbler.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-29 13:25:29
New version, should help somewhat with the lag issues in foo_uie_trackinfo_mod.

Quote
= Version 1.0.12 =
  *  $cwb_wdhms() - weeks, days, hours, minutes, seconds
    * $cwb_splitnum() - converts "12345678" to "12 345 678". optional second paramater can be delimiter (i.e. comma for comma separated)
    * reduced callback notifications by posting one message for some items rather than all variables (cwb_next rather than cwb_next_title, cwb_next_artist, etc)
Title: foo_cwb_hooks
Post by: Russell777 on 2006-09-29 13:47:39
New version, should help somewhat with the lag issues in foo_uie_trackinfo_mod.

Quote

= Version 1.0.12 =
  *  $cwb_wdhms() - weeks, days, hours, minutes, seconds
    * $cwb_splitnum() - converts "12345678" to "12 345 678". optional second paramater can be delimiter (i.e. comma for comma separated)
    * reduced callback notifications by posting one message for some items rather than all variables (cwb_next rather than cwb_next_title, cwb_next_artist, etc)


Thanks for the update,it acts better but still lags.
Title: foo_cwb_hooks
Post by: thuan on 2006-09-29 15:29:44
Don't see this on the request list and IIRC no one has requested this here yet. Could you add this feature if possible which users can add their own variables and define it like the way we can use global varibables in ColumnUI, global variables in ColumnUI are limited to ColumnUI and its extensions only.
Title: foo_cwb_hooks
Post by: Blitzmeister on 2006-09-29 15:33:47
After reading 6 pages & the Wiki I can't seem to find the answer to this question. Can you change the way %cwb_systemdate% shows year, month, date into the reverse?

Cheers.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-09-29 15:39:51
After reading 6 pages & the Wiki I can't seem to find the answer to this question. Can you change the way %cwb_systemdate% shows year, month, date into the reverse?


No, but you could use $substr() (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Titleformat_Reference#.24substr.28s.2Cm.2Cn.29) to split it up yourself.
Title: foo_cwb_hooks
Post by: agent s. on 2006-09-29 15:48:46
Code: [Select]
$put(systemdate,$right(%cwb_systemdate%,2)'-'$substr(%cwb_systemdate%,6,8)$left(%cwb_systemdate%,4)
Title: foo_cwb_hooks
Post by: tomthomson on 2006-09-29 15:50:51
@Blitzmeister

I use following function to arrange systemdate for my needs:
Code: [Select]
 $substr(s,m,n)

Returns substring of string s, starting from m-th character and ending at n-th character.

DD.MM.YYYY would be
Code: [Select]
// DAY
$substr(%cwb_systemdate%,9,10)'.'
// MONTH
$substr(%cwb_systemdate%,6,7)'.'
// YEAR
$substr(%cwb_systemdate%,1,4)


edit: hehe, quick guys here
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-09-29 20:37:56
A function that i would really need does similar like $meta_sep(Tag,s1,s2) but would sort the multiple tags by alphabet.
Title: foo_cwb_hooks
Post by: Yotsuya on 2006-10-01 08:06:03
Since we are all making requests I'd like to throw one in..

How about a function like maybe $cwb_filename(x) that will do:
Code: [Select]
$replace(x,$char(92),,$char(47),,$char(58),,$char(42),,$char(63),,$char(34),,$char(60),,$char(62),,$char(124),)


Returning string x stripped of \,/,:,*,?,",<,>,| which are the characters windows reports as invalid for filenames. IMO it would be very useful when using tags for albumart or other filename functions.

EDIT: Or perhaps add a second parameter which woudl determine what character to replace those with.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-10-02 14:12:08
Quote
= Release 1.0.13 =
* added preferences option to turn on/off notifications.
Title: foo_cwb_hooks
Post by: pepoluan on 2006-10-02 17:33:14
After reading 6 pages & the Wiki I can't seem to find the answer to this question. Can you change the way %cwb_systemdate% shows year, month, date into the reverse?
No, but you could use $substr() (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Titleformat_Reference#.24substr.28s.2Cm.2Cn.29) to split it up yourself.
Besides YYYY-MM-DD is ISO 8601 standard.
Title: foo_cwb_hooks
Post by: Russell777 on 2006-10-02 17:51:03
Quote
= Release 1.0.13 =
* added preferences option to turn on/off notifications.


Thank you very much!It completely solves the problem of high cpu usage!Great plugin,thanks again!
Title: foo_cwb_hooks
Post by: Squeller on 2006-10-02 18:06:32
I do not know if it's your plugins mistake, or trackinfo_mod panels:

When I update a playlist, e.g. with foo_playlist_bind, %cwb_activelist_count% does not refresh. It does refresh if I go to another playlist and then return.

Can you fix that or ist it the trackinfo_mods job? BTW, I have notifications turned on.
Title: foo_cwb_hooks
Post by: cwbowron on 2006-10-02 18:26:01
I do not know if it's your plugins mistake, or trackinfo_mod panels:

When I update a playlist, e.g. with foo_playlist_bind, %cwb_activelist_count% does not refresh. It does refresh if I go to another playlist and then return.

Can you fix that or ist it the trackinfo_mods job? BTW, I have notifications turned on.


It's on my end.  I will fix it.
Title: foo_cwb_hooks
Post by: Squeller on 2006-10-03 07:54:40

I do not know if it's your plugins mistake, or trackinfo_mod panels:

When I update a playlist, e.g. with foo_playlist_bind, %cwb_activelist_count% does not refresh. It does refresh if I go to another playlist and then return.

Can you fix that or ist it the trackinfo_mods job? BTW, I have notifications turned on.


It's on my end.  I will fix it.

Thank you. Can you make the trackinfo_mod refresh when time variables change AND no track is playing (you know normally it doesn't refresh when nothing happens)?
Title: foo_cwb_hooks
Post by: Erich w/ an h on 2006-10-03 22:15:07
thank you for your explinations and for your work with the plugin, its very much appreciated. Ive got one question and one request.

Q: cwb_next_user1 - how does a user define it? I feel silly asking, but im tired today, pardon.
EDIT: FOUND IT, THANKS

request: can you make a cwb_unhex function? the included hex function is useful, but in order to turn hex > regular numbers, I have to do something like this:

Code: [Select]
$puts(unhex,$pad_right(FF,6,0))

$puts(hex1,$replace($substr($get(unhex),6,6),A,10,B,11,C,12,D,13,E,14,F,15))
$puts(hex2,$mul($replace($substr($get(unhex),5,5),A,10,B,11,C,12,D,13,E,14,F,15),16))
$puts(hex3,$mul($replace($substr($get(unhex),4,4),A,10,B,11,C,12,D,13,E,14,F,15),256))
$puts(hex4,$mul($replace($substr($get(unhex),3,3),A,10,B,11,C,12,D,13,E,14,F,15),4096))
$puts(hex5,$mul($replace($substr($get(unhex),2,2),A,10,B,11,C,12,D,13,E,14,F,15),65536))
$puts(hex6,$mul($replace($substr($get(unhex),1,1),A,10,B,11,C,12,D,13,E,14,F,15),1048576))

$puts(unhex,$add($get(hex1),$get(hex2),$get(hex3),$get(hex4),$get(hex5),$get(hex6)))

$get(unhex) = $hex($get(unhex),)


Sometimes I want to 'unhex' a number so I can use arithmetic functions on it, and I cant do $add(FF,1). But $hex($add($cwb_unhex(FF),1)) would work fine. Also, its useful for unicode characters that are sometimes listed in hex: $char($cwb_unhex(41)) = $char(65) = A

thank you kindly, again, for your time and effort.
Title: foo_cwb_hooks
Post by: Stuart60611 on 2006-10-04 16:10:52
Request:

%cwb_playinglist_index% so as to allow one to display the playlist number of the track that is playing on a given playlist, like %list_index%.
Title: foo_cwb_hooks
Post by: spex04 on 2006-10-10 04:49:15
A few ideas..
Title: foo_cwb_hooks
Post by: saberrider on 2006-10-10 19:09:07
I've experienced an issue I'd like to report. I use the option "Playback follows cursor" and the variables cwb_next_*. I've got a playlist called "Library View" which is created by the albumlist panel. When I select a song in this playlist it works fine until I change for example the artist in the albumlist panel while a song is playing. The "Library View" playlist switches, I select (not playing, only selecting) a song but the cwb_next_* variables will not be updated until I really play a song from the newly created playlist. Same with the the playlist created by quicksearch component.

So whenever a playlist is modified by a component while a track is playing, the cwb_next_* variables won't change by only selecting a song from this playlist though "Playback follows cursor" is turned on.

I hope you understand, it sounds kinda complicated, but it happens all the time because I navigate a lot with the albumlist component.

I'd also like to thank you for your amazing work, great component!
Title: foo_cwb_hooks
Post by: odyssey on 2006-10-16 15:41:31
I have a small request:

Could you add a function that converts a date into "seconds since date", and a function that could complete a part of a date?

I would use this to add tags to tracks, that would usually be played in a specific time. This could be:

* Tracks that should be played in the morning
* Tracks that should be played in the evening
* Christmas songs (obviously)
* Summer songs
* Other holiday songs.

Then I assume I can use this hook with foo_skip and/or foo_autoplaylist ? 

Suppose you tagged your files with <prefdatestart> = ????-12-01 00:00:00 and <prefdateend> ????-12-25 00:00:00, it could complete the dates with the current year appended. Then a function could convert the date into seconds since, say 01-01-2000, which you could easily evaluate. Take the following pseudo code:

Code: [Select]
$puts(prefdatestart,$cwb_convertdate($cwb_completedate(%prefdatestart%)))
$puts(prefdateend,$cwb_convertdate($cwb_completedate(%prefdateend%)))
$puts(currentdate,$cwb_convertdate(%cwb_systemdatetime%))


My brain is not clear right now, i need something like $ifinbetween(), but I guess it can be accomplished by a series of $ifgreater() to evaluate whether the songs should be added or not.
Title: foo_cwb_hooks
Post by: metal_termite on 2006-10-17 02:57:57
@cwbowron
I don't know if this is a bug with $cwb_datediff or I'm misunderstanding its function.

Code: [Select]
System Date: %cwb_systemdatetime% $char(10)
Last played: %last_played% $char(10)
Date diff: $cwb_datediff(%cwb_systemdatetime%,%last_played%)

Renders this:
(http://i9.tinypic.com/2cxu4ba.png)

Shouldn't the date difference be 1 rather than 0?
Title: foo_cwb_hooks
Post by: Yotsuya on 2006-10-17 03:00:13
My brain is not clear right now, i need something like $ifinbetween(), but I guess it can be accomplished by a series of $ifgreater() to evaluate whether the songs should be added or not.


Something like this?:
Code: [Select]
$ifgreater($ifgreater(%tag%,LOWER LIMIT,%tag%,),UPPER LIMIT,,%tag%)


*untested
Title: foo_cwb_hooks
Post by: thuan on 2006-10-17 04:23:13
metal_termite is it less then one day from your last_played field. I think it's a logical result.
Title: foo_cwb_hooks
Post by: metal_termite on 2006-10-17 05:23:19
Yeah. I realized after I posted that I should have used %cwb_systemdate% instead, and truncated the time from the %last_played% tag before finding the difference in days.
Title: foo_cwb_hooks
Post by: odyssey on 2006-10-17 07:45:18
My brain is not clear right now, i need something like $ifinbetween(), but I guess it can be accomplished by a series of $ifgreater() to evaluate whether the songs should be added or not.
Something like this?:
Code: [Select]
$ifgreater($ifgreater(%tag%,LOWER LIMIT,%tag%,),UPPER LIMIT,,%tag%)
Exactly  Thanks
Title: foo_cwb_hooks
Post by: Chronial on 2006-10-17 16:14:15
You don't need any other functions for that - that is possible right now.
Title: foo_cwb_hooks
Post by: odyssey on 2006-10-17 22:08:53
You don't need any other functions for that - that is possible right now.
me??
Title: foo_cwb_hooks
Post by: Chronial on 2006-10-17 22:19:53
yes
just use a string like:
Code: [Select]
$if($and($greater(%cwb_systemdatetime%,%play_after%),$greater(%play_before%,%cwb_systemdatetime%),PLAY,Donot play)


But you will have to remove the year part first if you want it to work every year
Title: foo_cwb_hooks
Post by: odyssey on 2006-10-19 11:51:13
just use a string like:
Code: [Select]
$if($and($greater(%cwb_systemdatetime%,%play_after%),$greater(%play_before%,%cwb_systemdatetime%),PLAY,Donot play)


But you will have to remove the year part first if you want it to work every year
Are you sure it works with dates and not just integers?

Edit: It appearently does:
Code: [Select]
Compares two integers, tests if X>Y, intended for use with $if() and logical operators.

Anyway, I still have a problem replacing the chars. I'm missing a $for function to evaluate every char or something like that... Actually a weekday function could be nice too
Title: foo_cwb_hooks
Post by: LXtreme on 2006-10-21 23:17:19
a mix of request and feasibility-question:

would it be possible to "collect" tag-data from a couple of tracks depending on a certain criteria, e.g. same %album% or %directory%???

i am asking because we face f2k limitations with a good idea (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=47810&view=findpost&p=442984) (from my point of view).

in this case it would be great if one could $add the %rating% based on different %track%s out of the same %album%, e.g. "cwb_compare(%tag%)"

there may be a thousand better ways to implement this than "cwb_compare(%tag%)" but as i am not that much into programming i won't post all my ideas of how one could use the outcome.

just hope the idea is easy to understand!
Title: foo_cwb_hooks
Post by: mazy on 2006-10-21 23:36:57
that's probably not going to happen, LXtreme. it would be too much stress to do that everytime. things like this need other mechanism with caching the results custom_info's sort of way.
Title: foo_cwb_hooks
Post by: LXtreme on 2006-10-21 23:46:02
that's probably not going to happen, LXtreme. it would be too much stress to do that everytime. things like this need other mechanism with caching the results custom_info's sort of way.

Title: foo_cwb_hooks
Post by: ...Just Elliott on 2006-10-22 09:27:49
Personally I'd like to do $cwb_samealbumtag(tracknumber,tag), and it'd only do it on demand.
Title: foo_cwb_hooks
Post by: mazy on 2006-10-22 15:45:14
things like this make sense in single column playlist plugin. for other uses we would need some sort of additional data structure to provide quick link from albums to album tracks with some hash table, consistency update mechanism etc ---> bug peter about this to think about it for new foobar versions in the future.
Title: foo_cwb_hooks
Post by: carmenm on 2006-10-27 08:15:02
is it normal that %cwb_next_title% doesnt work in shuffle mode? It doesnt give me the good next song.
Title: foo_cwb_hooks
Post by: mazy on 2006-10-27 22:26:26
yes, cwb_next_* doesn't (and is not intended to) work in anything else but default.
Title: foo_cwb_hooks
Post by: sune on 2006-10-28 23:38:40
Hi. I'm trying to show in the track info panel the playback order. It works ok, but when I first start foobar, %cwb_playback_order% returns nothing. when i start playing then it does work.

Is this a bug? or not possible to retrieve that information at startup?

sune
Title: foo_cwb_hooks
Post by: cwbowron on 2006-11-01 19:04:51
Release 1.0.14

    * update cwb_next_* variables when another playlist is activated
    * fixed missing update and notification of cwb_activelist_* on playlist changes
    * cwb_playing_index (1 based)
    * $cwb_fileexists() - returns whether a file exists. useful for determining whether albumart file exists. example: $cwb_fileexists($replace(%_path%,%_filename_ext%,)folder.jpg)
Title: foo_cwb_hooks
Post by: carmenm on 2006-11-01 19:12:07
Excellent upgrade. Thanks a lot cwbowron
Title: foo_cwb_hooks
Post by: crazysnailboy on 2006-11-02 20:14:48
Chris,

Thanks for a very useful plugin. I have one question though. I've just upgraded from v1.0.13 to v1.0.14, and while the %cwb_activelist_count% variable does now update when the contents of the playlist changes, it shows zero doesn't have a value when no track is playing. Is this deliberate? I'd like to be able to see the total number of tracks in the active playlist even when I'm not playing one.

Thanks,

Chris
Title: foo_cwb_hooks
Post by: aliendesaster on 2006-11-03 11:46:49
Could you consider adding this (http://www.hydrogenaudio.org/forums/index.php?showtopic=49833&hl=)?

Basically I'd like REGEXP support in $str_replace (you'd probably call it $cwb_str_replace then) or a function to to exclude all non-readable characters but linebreaks, tabs and spaces.

Displaying tags which are automatically downloaded is often a mess and if for example using %lyrics% tag in trackinfo_panel_mod I'd like it as clean as possible without validating every filetag.
Title: foo_cwb_hooks
Post by: Squeller on 2006-11-03 12:12:17
Thanks for the update. Is %cwb_index% (for selected, eventually not playing track) possible?
Title: foo_cwb_hooks
Post by: Chronial on 2006-11-03 12:12:32
could be easily implemntable via PCRE http://www.pcre.org/ (http://www.pcre.org/).
But is for sure way to big to be part of cwb_hooks

maybe someone wants to do foo_pcre?
Title: foo_cwb_hooks
Post by: 2Pacalypse on 2006-11-03 14:23:14
am i doing something wrong?

$cwb_fileexists($replace(%_path%,%_filename_ext%,)folder.jpg)

displays unknown function

i just want to check for album art
Title: foo_cwb_hooks
Post by: Melomane on 2006-11-03 17:53:22
am i doing something wrong?
$cwb_fileexists($replace(%_path%,%_filename_ext%,)folder.jpg)
displays unknown function
i just want to check for album art


your string $cwb_fileexists($replace(%_path%,%_filename_ext%,)folder.jpg)
work here ( display 1 if file exist else nothing)
Title: foo_cwb_hooks
Post by: alphaex32 on 2006-11-03 18:09:25
am i doing something wrong?

$cwb_fileexists($replace(%_path%,%_filename_ext%,)folder.jpg)

displays unknown function

i just want to check for album art
try this: $cwb_fileexists($replace(%path%,%filename_ext%,folder.jpg))
Title: foo_cwb_hooks
Post by: Birk on 2006-11-04 11:50:57
could you add a "$cwb_readfile()" ?
that would be very great for artist bio or album descriptions.
Title: foo_cwb_hooks
Post by: 2Pacalypse on 2006-11-04 12:11:43
sorry didnt have latest version.

Is there a way to get foo_run to execute cover downloader automatically if an album art doesnt exist?
Title: foo_cwb_hooks
Post by: shakey_snake on 2006-11-12 03:52:50
In columnsUI there is the statusbar option to:
"Show selected tracks total length, accurate to X decimal places"

What about a %cwb_playinglist_length% and a %cwb_activelist_length% that do similar things for the entire playlist?
Title: foo_cwb_hooks
Post by: alkasar on 2006-11-16 14:11:53
Excellent plugin. Really a must. Thx a lot.

Would it be possible to also have
%cwb_activelist_size% - size in bytes of the active list

for convenience, it could be useful to add also the pending %cwb_playinglist_size%

useful when exporting lists to external devices such as mp3 players.
Title: foo_cwb_hooks
Post by: alphaex32 on 2006-11-16 15:40:44
Could you add a way to get information for the currently playing track (even if it is not selected)? This would allow us, for example, to highlight all of the tracks of a currently playing album. Maybe like %cwb_playing_album% or
%cwb_playing_custom%.
Title: foo_cwb_hooks
Post by: 2Pacalypse on 2006-12-01 17:29:06
would it be possible to implement %foobar_path%  or even a %drive_installed% i want to be able to retrieve the drive letter
Title: foo_cwb_hooks
Post by: cwbowron on 2006-12-01 18:42:46
I added some features that are a bit outside the scope of the title formatting hooks, but i dont want to create a whole new component for it so its going to be a part of CWB hooks.

Quote
= Release 1.1.0beta =
* added timestamp action for tagging (example usage, add a ADDED timestamp when you add new files)
* added new file tagger tool - allows you to run any context menu item on files added to library.  useful with above scripting action for adding timestamp to new files (Preferences/Tools/New Files Tagger)
Title: foo_cwb_hooks
Post by: mazy on 2006-12-04 23:16:28
this is great (especially that you can simply select any context menu item for it)! i guess i could use this together with custom info, right?
Title: foo_cwb_hooks
Post by: nightfishing on 2006-12-05 02:34:47
thanks for the update!

a bit off topic, but....

Using the New File tagger to add "Added" to files added to the db the format (on my foo) is YYYYMMDD. But, on single digit days (like today) I get 2006124 instead of 20061204.

Is there a way to fix this?
Title: foo_cwb_hooks
Post by: gob on 2006-12-05 03:25:54
if it isn't too much of a pain in the ass, would it also be possible to have another $systemdate() function that works with Win32 filetime (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/filetime_str.asp)?
Title: foo_cwb_hooks
Post by: Squeller on 2006-12-05 11:04:13
Thanks for the update!

I try again: %list_index% is not accessible though panels. Can you please make this accessible?

%cwb_list_index% - Index of currently selected track
Title: foo_cwb_hooks
Post by: lav-chan on 2006-12-05 14:19:11
thanks for the update!

a bit off topic, but....

Using the New File tagger to add "Added" to files added to the db the format (on my foo) is YYYYMMDD. But, on single digit days (like today) I get 2006124 instead of 20061204.

Is there a way to fix this?

Er. That's not happening to me. I have the the New File Tagger thing set to do:

Tagging/Scripts/set added date

and then the actions that script is set to do are:

Time Stamp: ADDED
Format "ADDED" using "$left(%added%,10)"


I've used this probably on a half-dozen albums since i updated, and they all show up perfectly the way they should. '2006-12-03', '2006-12-04', that kind of thing.

Are you doing something different?

edit:
Maybe it depends on your regional settings? Try going into Control Panel > Regional and Language Options, and then make sure the 'Short date' is set to show MM and dd instead of M and d.
Title: foo_cwb_hooks
Post by: nightfishing on 2006-12-06 02:34:05
Er. That's not happening to me. I have the the New File Tagger thing set to do:

Tagging/Scripts/set added date

and then the actions that script is set to do are:

Time Stamp: ADDED
Format "ADDED" using "$left(%added%,10)"


I've used this probably on a half-dozen albums since i updated, and they all show up perfectly the way they should. '2006-12-03', '2006-12-04', that kind of thing.

Are you doing something different?

edit:
Maybe it depends on your regional settings? Try going into Control Panel > Regional and Language Options, and then make sure the 'Short date' is set to show MM and dd instead of M and d.


http://www.halfbakedschemes.com/added.jpg (http://www.halfbakedschemes.com/added.jpg)

using Custom Info

EDIT: I added your script and it works as advertised YYYY-MM-DD, but is there a way to change the script to drop the "-" i.e. YYYYMMDD?
Title: foo_cwb_hooks
Post by: Chronial on 2006-12-06 03:13:39
Why would you want that?
The foobar format for timestamps contains the "-", see for example http://wiki.hydrogenaudio.org/index.php?ti...d_Tag_Standards (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Encouraged_Tag_Standards)
Title: foo_cwb_hooks
Post by: nightfishing on 2006-12-06 03:36:06
Why would you want that?
The foobar format for timestamps contains the "-", see for example http://wiki.hydrogenaudio.org/index.php?ti...d_Tag_Standards (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Encouraged_Tag_Standards)


Because my entire library has been stamped YYYYMMDD and I wouldn't want to have to change them all.
Title: foo_cwb_hooks
Post by: lav-chan on 2006-12-06 14:15:39
EDIT: I added your script and it works as advertised YYYY-MM-DD, but is there a way to change the script to drop the "-" i.e. YYYYMMDD?

Yeah, add an extra step to that masstagger script:

Format "ADDED" using "$replace(%added%,'-',)"
Title: foo_cwb_hooks
Post by: thzxcyl on 2006-12-08 21:34:14
I notice that the wiki page says not to request any new features along the lines of %cwb_next_*%, but since %cwb_next_title%, etc. are in existence, is it possible to have any kind of "previous" function? Or there is already a way to do it that I'm not aware of?
Title: foo_cwb_hooks
Post by: hiscores on 2006-12-09 17:30:02
This is a really stupid question, but now that I've set up foo_custominfo with a DATE ADDED field, how do I actually get Foobar to update my music and populate it with that information?
Title: foo_cwb_hooks
Post by: hiscores on 2006-12-12 00:50:54
bump
Title: foo_cwb_hooks
Post by: q-stankovic on 2006-12-12 12:10:52
bump


Preferences -> Tools -> New File Tagger.  Check the box and choose the command you have created with foo_custom_info.
Title: foo_cwb_hooks
Post by: kockroach on 2006-12-15 21:47:49
Hey cwbowron,

Do you have an idea when the created date function will become available?

Thanks!
Title: foo_cwb_hooks
Post by: amiti on 2006-12-16 18:25:36
Hello , a beginner question : where can I use the plugin functions and variables?
I tried using them in global variables in ui_columns and in foo_playlist_tree with no luck.


Edit: I got it to work in playlist_tree but what about ui_columns? Is it possible to use it in globals?
Title: foo_cwb_hooks
Post by: nebula on 2007-01-09 19:10:44
I notice that the wiki page says not to request any new features along the lines of %cwb_next_*%, but since %cwb_next_title%, etc. are in existence, is it possible to have any kind of "previous" function? Or there is already a way to do it that I'm not aware of?


second!  cwb_previous_artist/album would be nice!

also, is there a way to have cwb_next_* apply individual playlist entries, not just whats currently playing?
Title: foo_cwb_hooks
Post by: sergeymen on 2007-01-15 01:57:30
Hi, cwbowron!

Would it be possible for you to make available for download the last release of foo_cwb_hooks that was compatible with foobar v0.8.3? Or was there ever one?

I can't switch to v0.9.x because a crucial plug-in does not support it ( foo_dsp_continuator ). But I really, really would like to be able to access the status of "stop after current" for title formatting.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-01-15 13:28:49
Would it be possible for you to make available for download the last release of foo_cwb_hooks that was compatible with foobar v0.8.3? Or was there ever one?


foo_cwb_hooks was new for 0.9
Title: foo_cwb_hooks
Post by: alphaex32 on 2007-01-16 19:35:39
Should all of the functions from cwb_hooks work with Autoplaylist formatting?
Title: foo_cwb_hooks
Post by: Decuman on 2007-01-17 01:07:25
great plugin!

just a couple of quick questions:

- is it simple to implement a function like %_filesize% but for all currently selected tracks (%cwb_activelist_filesize% and %cwb_selection_filesize% ). Would be nice to see the overall size before sending the files to DAP devices. + analogue of %cwb_playinglist_count% but for selected items %cwb_selection_count% would be nice as well.

- any chance to have another function for querying the queued stack to get artist/album/track for each particular queued item etc.

Thanks in advance!
Title: foo_cwb_hooks
Post by: crazymad on 2007-01-25 23:04:44
I would love to have a variable like %playback_start% that contains the date and time of when I started listening to the song.

also all date and time functions should be available in pure seconds, like convert 2007.26.1 23:55 in a timestamp in seconds, with which I can do arihmatic operations on. that would also be nice to have.

thx
Title: foo_cwb_hooks
Post by: cwbowron on 2007-01-26 13:27:36
I would love to have a variable like %playback_start% that contains the date and time of when I started listening to the song.


I could do that, but based on your other posts, what you really want is when the track was scrobbled... Why not ask the author of the scrobble plugin to just make a way to tag the music when it was last scrobbled, rather than have me implement something that you have to half-ass to get to do what you really want?
Title: foo_cwb_hooks
Post by: crazymad on 2007-01-29 13:39:27
its just the heck and fun of doing it yourself
anyway, I still think it still is useful information, others might be happy to have...
anyway, yeah, why not ask in the audioscrobbler topic, its sure the easiest but also the most lame xD
Title: foo_cwb_hooks
Post by: saberrider on 2007-01-29 15:51:20
i second the request of crazymad! I'd love to add the the information to my progressbar so I could see when the track started playing but also when it will be finished...

something like
Code: [Select]
============--------------------
09:23:11                09:26:43


That way I wouldn't forget time that fast or the pizza in my oven
Title: foo_cwb_hooks
Post by: crazymad on 2007-01-30 22:05:55
heres another request, hope I am not a brag ^^ :

you implemented two user definable variables for the next track in the playlist. could you do the same for the previous track? that would be sweet!
thx

EDIT: I just played around with %cwb_next_user1% variable assigning it to %album% (as been done by default) and cant seem to get it to work right with Columns UI (in 'Playlist View' -> Globals), to color and group all songs belonging to the same album:

I though it could start with the first entry in the playlist, checking %cwb_next_user1% and compare it to the %album% of the current entry to see if the next song still belongs to the same album.
but it updates the information %cwb_next_user1% on a specific entry only when this entry has been played. if it hasnt been played before, it has the same information stored in %cwb_next_user1% as the current playing song, when this particular song has been added to the playlist, and keeps it, unil it has been played.
I hope this is understandable...
Title: foo_cwb_hooks
Post by: Purple Monkey on 2007-01-31 15:01:38
No, %cwb_next_*% gets the next track to be played.

As for colouring each album differently then I use this.
Code: [Select]
$set_global(album_colour,$hsl($mod($div($crc32($if3(%musicbrainz_albumid%,%musicbrainz album id%,%live%,%album%,'1')),240),220),160,100)
)

$set_global(album_colour2,$hsl($mod($add($mod($div($crc32($if3(%musicbrainz_albumid%,%musicbrainz album id%,%live%,%album%,'1')),240),220 ),128),256),150,120)
)
It changes the hue of the colour depending on the album or '1' if no album is present. (The numbers are more or less 'magic'.)


i second the request of crazymad! I'd love to add the the information to my progressbar so I could see when the track started playing but also when it will be finished...

something like
Code: [Select]
============--------------------
09:23:11                09:26:43


That way I wouldn't forget time that fast or the pizza in my oven

If there was an $date_add and $date_sub then you could do this using %cwb_systemdate%.
Title: foo_cwb_hooks
Post by: crazymad on 2007-01-31 15:59:11
Quote
No, %cwb_next_*% gets the next track to be played.

I see the problem.
I also thought UI Columns would go through the entries in the playlist like a loop, and I would be able to alter global variables for later uses in different entries of the playlist. but all this isnt the case...

since I wanted to colour the background of the album, your script is going to create a very colorfull foobar appearance. I was thinking more of two colors alternating.

and since all this loop thinking of mine is incorrect, I guess %cwb_prev_*% is useless, too...
Title: foo_cwb_hooks
Post by: Infernus on 2007-02-14 09:38:56
cwbowron can you modify the $cwb_fileexists method this way that it allows using wildcards?

Thats what I want to do with it:

if  ( Fileexists in same folder: *.cue AND Subsongindex = 0 AND Length > 20min)
Then    Skip
Else    Play


edit: I have tested this condition with foo_skip and it works: $ifgreater(%length_seconds%,3600,1,0)
but until I cannot test if a cue is present in folder it skips also live-mixes without cues.
Title: foo_cwb_hooks
Post by: jonpb on 2007-02-22 04:33:29
How do I use the %cwb_queueindex%. I would like to highlight the tracks currently in the queue in a browser playlist which is not the currently playing playlist.

As a simple test I tried this in the Item Display code of a SCPL

Code: [Select]
$ifequal($mod(%_playlist_number%,2),0,
$drawrect(0,0,0,0,brushcolor-$if(%_selected%,64-64-64 pencolor-60-60-60,33-33-33 pencolor-27-27-27))
,
$drawrect(0,0,0,0,brushcolor-$if(%_selected%,74-74-74,40-40-40) pencolor-null)
)

$if(%cwb_queueindex%,$drawrect(0,0,0,0,brushcolor-255-255-255 pencolor-null),)


This code does not work if the browser playlist is active, nor if the playing playlist is active. The SCPLs are panels in a PanelsUI layout.
Title: foo_cwb_hooks
Post by: pIv on 2007-02-22 07:19:12
Hi, cwbowron!


It is possible add function to compare dates as in cwb_datediff() function, but arguments format is equal format of tag "last_played_timestamp".

Or add function to convert "last_played_timestamp" to "yyyy-mm-dd hh:mm:ss".
Title: foo_cwb_hooks
Post by: jonpb on 2007-02-23 07:11:37
How do I use the %cwb_queueindex%.


Using 1.1beta [Dec 1 2006 - 13:47:34] I am now pretty sure that this variable is not working with this version. It does not act as a boolean to $drawrect(), nor does it display anything under any circumstances. Is anyone using this variable? If it works for you, which version of cwb_hooks are you using, and are there any prerequisites for it to work?
Title: foo_cwb_hooks
Post by: thuan on 2007-02-24 04:12:18
Works fine for me, same component version with foobar 0.9.4.2. It has been working since as long as I can remember so don't know if there is any prerequisite and I don't think so only foobar 0.9 is needed.
Title: foo_cwb_hooks
Post by: jonpb on 2007-02-24 07:23:26
Works fine for me, same component version with foobar 0.9.4.2.


Thanks for the reply, can you possibly give me a titleformatting snippet that demonstrates that it works? I am currently in the process of investigating the SDK to figure out how to extend titleformatting which is proving a little more painstaking then I hoped.
Title: foo_cwb_hooks
Post by: thuan on 2007-02-24 08:25:06
This is what I'm using
Code: [Select]
$ifgreater(%cwb_queuelength%,1,
'['%cwb_queueindexes%/%cwb_queuelength%']',
'['%cwb_queueindex%']'))
Title: foo_cwb_hooks
Post by: jonpb on 2007-02-24 08:51:59
This is what I'm using
Code: [Select]
$ifgreater(%cwb_queuelength%,1,
'['%cwb_queueindexes%/%cwb_queuelength%']',
'['%cwb_queueindex%']'))

It's the strangest thing, first there is one extra ) in the code snippet, but in any case, all I get is "[]" as output. I have no idea, back to the drawing board.
Title: foo_cwb_hooks
Post by: thuan on 2007-02-24 10:09:03
Yeah I copied the code out from my foobar and accidentally leave it with an extra bracket. Anyway I think you should post your entire foobar setup (version and components, you should use the copy button in the components preferences page of foobar) so I and other ppl could help you out.
Title: foo_cwb_hooks
Post by: Purple Monkey on 2007-02-24 18:31:16
It's the strangest thing, first there is one extra ) in the code snippet, but in any case, all I get is "[]" as output. I have no idea, back to the drawing board.


try:
Code: [Select]
$ifgreater(%cwb_queuelength%,1,
'['%cwb_queueindexes%/%cwb_queuelength%']',
['['%cwb_queueindex%']'])


If you hadn't enqueued a file it still tried to out put %cwb_queueindex% and would fail as it's empty.
Title: foo_cwb_hooks
Post by: jonpb on 2007-02-24 21:44:53
If you hadn't enqueued a file it still tried to out put %cwb_queueindex% and would fail as it's empty.

Ok, that's the problem, I have to "Add to playback queue". I misunderstood how the queue works. I don't use the queue because it doesn't function the way I like. I find I have more control over the playback by using a dedicated playing playlist. I guess I'll try either tweaking one of my custom context menus or try to figure out how to extend titleformatting. Thanks for the response.
Title: foo_cwb_hooks
Post by: FofR on 2007-03-16 00:08:43
Any chance of getting something to return the number of items selected? %cwb_selection_duration% already exists so I imagine something like %cwb_selection_number% shouldn't be too difficult.

In my code I am wanting to show the selection duration but only when more than one track is selected.
Title: foo_cwb_hooks
Post by: wraithdu on 2007-03-16 04:32:01
Any chance of getting something to return the number of items selected? %cwb_selection_duration% already exists so I imagine something like %cwb_selection_number% shouldn't be too difficult.

In my code I am wanting to show the selection duration but only when more than one track is selected.

I just did something like this.  Even if you have one item selected, selection duration will still be the length of that one item, so it's basically the same thing.  You have to do some *things* to get the formatting right, but it's not too hard.
Title: foo_cwb_hooks
Post by: FofR on 2007-03-16 08:23:26
I have worked out a way of getting around the problem but I feel this item would still be of some use and not too hard to implement.
Title: foo_cwb_hooks
Post by: Love Machine on 2007-03-23 03:32:01
Hi all,

Sorry if this is a terribly idiotic, noobish question but I'm having trouble getting hold of the foo_cwb_hooks .zip file.  When I click on the link (http://foobar.bowron.us/foo_cwb_hooks.zip) I get the following error:


Forbidden
You don't have permission to access /foo_cwb_hooks.zip on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.



And when I try right-clicking and downloading the file is only 1k and WinZip says the archive is corrupted.

Is anyone able to help me out with this?  It'd be much appreciated.

Thanks!
Title: foo_cwb_hooks
Post by: NiLbReTh on 2007-03-23 11:17:29
i have the same problem above, so if someone else could upload it again...
Title: foo_cwb_hooks
Post by: cwbowron on 2007-03-23 12:30:59
There was a glitch on my web hosting.  Everything should be back to normal.
Title: foo_cwb_hooks
Post by: NiLbReTh on 2007-03-23 12:38:10
There was a glitch on my web hosting.  Everything should be back to normal.


Thx, it's now fixed!
Title: foo_cwb_hooks
Post by: Love Machine on 2007-03-23 13:34:03
There was a glitch on my web hosting.  Everything should be back to normal.


Excellent, thx!
Title: foo_cwb_hooks
Post by: Tordek on 2007-03-25 16:56:09
Sorry to say this, but it's not working again

Code: [Select]
Forbidden
You don't have permission to access /foo_cwb_hooks.zip on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-03-25 17:18:03
Temporary backup:

http://msu.edu/~bowronch/foobar/foo_cwb_hooks.zip (http://msu.edu/~bowronch/foobar/foo_cwb_hooks.zip)
Title: foo_cwb_hooks
Post by: Tordek on 2007-03-25 17:28:17
Wow, tnx for the quick reply!

FofR Configuration v0.6 is working like it should now...

Tnx again...
Title: foo_cwb_hooks
Post by: metal_termite on 2007-03-29 02:40:43
I am having some problems with this component and the masstagger.

I have the new file tagger setup to add a timestamp to a tag named ADDED. I often rename files though so they get re-tagged with a newer timestamp -- I don't want that to happen.

So I thought I could prevent that by modifying the masstagger script using format value from other fields with the following titleformatting $if(%added%,%cwb_systemdatetime%,%added%), but it seems %cwb_systemdatetime% does not work with the masstagger. Am I doing something wrong, is there another way to accomplish this?
Title: foo_cwb_hooks
Post by: Dave_Scream on 2007-04-05 22:20:56
I am having some problems with this component and the masstagger.

I have the new file tagger setup to add a timestamp to a tag named ADDED. I often rename files though so they get re-tagged with a newer timestamp -- I don't want that to happen.

So I thought I could prevent that by modifying the masstagger script using format value from other fields with the following titleformatting $if(%added%,%cwb_systemdatetime%,%added%), but it seems %cwb_systemdatetime% does not work with the masstagger. Am I doing something wrong, is there another way to accomplish this?


+1 +1 +1 !!

i we got the same problem!

---
oh i understand.. u wrote it in 1rst post of this thread...  masstager dont understand CWB values (

---
UPD.
i think i understand how mass tagger can use ADDED date...

1. ADD TIMESTAMP - ADDED_temp
2. guess value - $if(%ADDED%,%ADDED%,%ADDED_temp%)
3. delete tag - ADDED_temp

and all works fine
Title: foo_cwb_hooks
Post by: 4nt1 on 2007-04-23 05:24:47
Hi I have since run in to the same problem - can you please confirm the settings for guess value

for guess value:
- the top box should be ADDED
- the second box should be $if(%ADDED%,%ADDED%,%ADDED_temp%)

is this correct?

ok this seems to work perfectly - thanks guys
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-04-27 00:41:16
I don't know if it's this plugin or Panels UI.

I'm trying to detect if a file exists, but it doesn't work.

User Globals:
Code: [Select]
$puts(coverPath,$replace(%path%,%filename_ext%,cover.jpg))
$puts(cover,$cwb_fileexists($get(coverPath)))


Track Display:
Code: [Select]
$if($get(cover),$get(coverPath),/images/Cover/nc.png)


If I try call $get(cover) I just get [UNKNOWN FUNCTION]
Title: foo_cwb_hooks
Post by: CepiPerez on 2007-04-27 01:18:59
I don't know if it's this plugin or Panels UI.

I'm trying to detect if a file exists, but it doesn't work.

User Globals:
Code: [Select]
$puts(coverPath,$replace(%path%,%filename_ext%,cover.jpg))
$puts(cover,$cwb_fileexists($get(coverPath)))


Track Display:
Code: [Select]
$if($get(cover),$get(coverPath),/images/Cover/nc.png)


If I try call $get(cover) I just get [UNKNOWN FUNCTION]

Why don't you use $if($fileexists... directly in PanelsUI?
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-04-27 01:33:39
Thanks, will try that, didn't know that function.


Here's my code, may be useful to someone.

Users Globals
Code: [Select]
$puts(path,$replace(%path%,%filename_ext%,))
$puts(path1,$get(path)cover.*)
$puts(path2,$get(path)*front*jpg)
$puts(path3,$get(path)*cover*jpg)
$puts(path4,$get(path)*.jpg)

Track Display
Code: [Select]
$puts(cover,
  $if($fileexists($get(path1)),$get(path1),
  $if($fileexists($get(path2)),$get(path2),
  $if($fileexists($get(path3)),$get(path3),
  $if($fileexists($get(path4)),$get(path4),/images/cover/nc.png))))
)

Then you can use it in an $imageabs2()
Code: [Select]
$imageabs2(175,175,,,175,,,,$get(cover),nokeepaspect)


Thanks again.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-04 17:52:21
I just uploaded a new version, that includes a way to tag skipped files.

Under preferences -> Tools -> CWB Hooks, you can check the "Perform Action on Skipped Files" box, then select the action to perform.

I setup a masstagger script called "Increase Skip Count" that will add or increase the skip count tag on files that I manually skip over.

Action: "Format Values From Other Fields"

Destination Field: SKIP_COUNT
Formatting pattern: $if(%skip_count%,$add(%skip_count%,1),1)

You can grab it here:
http://www.msu.edu/~bowronch/foobar/foo_cwb_hooks.zip (http://www.msu.edu/~bowronch/foobar/foo_cwb_hooks.zip)

I got the idea from an blog posting about sorting by skip count in iTunes.

My wiki is down for the moment.
Title: foo_cwb_hooks
Post by: buktore on 2007-05-04 19:26:57
Thanks for the new version and new feature cwbowron.

"Perform Action on Skipped Files" is only activate when i hit "next" am i right?

I rarely use "next" command for skipping. I use "Random" and something else (doubble click). so i can't use your idea about "skip count" thing.

But i find it's very useful to use it to add "SKIP" tag to file.(so Foo_skip will skip them next time) Now when i want to skip some songs i use random. and if i don't want to hear current songs again and want to play the next. I just hit "next" to do that. and it's work ike a charm 

I can see some another use as well. Great job man
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-04 21:33:48
Thanks for the new version and new feature cwbowron.

"Perform Action on Skipped Files" is only activate when i hit "next" am i right?

I rarely use "next" command for skipping. I use "Random" and something else (doubble click). so i can't use your idea about "skip count" thing.


Yeah, that's how it works.  In the next release I'll make it so that if press random while a track is playing, it will also perform the action, because that's essentially a skip too...
Title: foo_cwb_hooks
Post by: buktore on 2007-05-04 21:58:51
Quote
I'll make it so that if press random while a track is playing, it will also perform the action, because that's essentially a skip too...


Can you make a seperate action to perform for Next and Random?

So i can make "Random" tag skip_count  and "Next" to do some thing else.(more flexibility)

Nevermind if you don't. Just a little request. 

Cause i kind a like the way it's work now

Thanks
Title: foo_cwb_hooks
Post by: Squeller on 2007-05-05 11:26:32
Thanks, cwb, for the continous development!
Title: foo_cwb_hooks
Post by: hanimei on 2007-05-05 11:35:06
foobar2000-crash on vista32:
-metadb_handle leaks: 1 object
-unhandled exception: bad alloc
-runtime error: program = foobar2000.exe, R6025, -pure virtual function call

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   foobar2000.exe
  Application Version:   0.9.4.3
  Application Timestamp:   46291641
  Fault Module Name:   foo_cwb_hooks.dll
  Fault Module Version:   0.0.0.0
  Fault Module Timestamp:   463b6334
  Exception Code:   40000015
  Exception Offset:   0001e180
  OS Version:   6.0.6000.2.0.0.256.1
  Locale ID:   2055
  Additional Information 1:   d6d9
  Additional Information 2:   8563d272cdf1b650d60258ca0f7d7bdc
  Additional Information 3:   7da4
  Additional Information 4:   220bc55dcc4400b2b33061cf930117fa
Title: foo_cwb_hooks
Post by: gregory on 2007-05-16 01:10:45
great stuff cwb,

was wondering if %cwb_selection_count% -is, could, might, won't -be added?
or maybe this is already possible with existing title formatting?
Title: foo_cwb_hooks
Post by: Leech on 2007-05-23 19:44:40
I want to add this Masstagger script to New File Tagger, and it works, but instead of add current datetime it insert the string %cwb_systemdate% in all files.

(http://apollo.divshare.com/files/2007/05/23/717782/sshot-2.png) (http://www.divshare.com/download/717782-53a)

Look:
(http://apollo.divshare.com/files/2007/05/23/717876/sshot-3.png) (http://www.divshare.com/download/717876-54a)
Title: foo_cwb_hooks
Post by: sPeziFisH on 2007-05-23 20:00:14
I want to add this Masstagger script to New File Tagger, and it works, but instead of add current datetime it insert the string %cwb_systemdate% in all files.

you have to use 'Format value from other fields...'  as action type, ADDED as 'destination field name' and %cwb_systemdate% as 'formatting pattern'
Title: foo_cwb_hooks
Post by: kanak on 2007-05-23 20:39:06
I want to add this Masstagger script to New File Tagger, and it works, but instead of add current datetime it insert the string %cwb_systemdate% in all files.

you have to use 'Format value from other fields...'  as action type, ADDED as 'destination field name' and %cwb_systemdate% as 'formatting pattern'



or you can use the "Stamp current date and time" and select "added" as the destination field.
Title: foo_cwb_hooks
Post by: FofR on 2007-05-24 15:46:00
Any chance of getting these three things included (like the action when skip):

a) action when songs starts playing
b) action when % of song completed
c) action when song ends

I mean, we have lots of components that do something like this when they update the playcount or submit to last.fm. It'd be nice to be define any action to occur, or a combination of them.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-24 15:59:11
Any chance of getting these three things included (like the action when skip):

a) action when songs starts playing
b) action when % of song completed
c) action when song ends

I mean, we have lots of components that do something like this when they update the playcount or submit to last.fm. It'd be nice to be define any action to occur, or a combination of them.


I'll add it to the feature requests.  I might get it in there.
Title: foo_cwb_hooks
Post by: Leech on 2007-05-24 16:02:07
I want to add this Masstagger script to New File Tagger, and it works, but instead of add current datetime it insert the string %cwb_systemdate% in all files.

you have to use 'Format value from other fields...'  as action type, ADDED as 'destination field name' and %cwb_systemdate% as 'formatting pattern'




I want to add this Masstagger script to New File Tagger, and it works, but instead of add current datetime it insert the string %cwb_systemdate% in all files.

you have to use 'Format value from other fields...'  as action type, ADDED as 'destination field name' and %cwb_systemdate% as 'formatting pattern'



or you can use the "Stamp current date and time" and select "added" as the destination field.



Thank you both of you!! I'll try both solutions.
Title: foo_cwb_hooks
Post by: Lucky Luciano on 2007-05-24 20:22:35
I'm having problems understanding how to use CONTEXT-SELECTED. I made some buttons in the main panelsUI layout, outside the SCPL. With one of them I want to to run tag& rename. Problem is: it takes as parameter the playing file instead of the selected file(in the SCPL). This doesn't happen if I press the Hotkey I created for the Tag & rename service.

The button code is like this
Code: [Select]
$button(260,30,0,0,34,24,/images\LL Dark Blue\tag.png,/images\LL Dark Blue\tag g.png,Tag & Rename,CONTEXT-SELECTED)


Is this not possible?
Title: foo_cwb_hooks
Post by: shakey_snake on 2007-05-25 00:44:37
I'm having problems understanding how to use CONTEXT-SELECTED. I made some buttons in the main panelsUI layout, outside the SCPL. With one of them I want to to run tag& rename. Problem is: it takes as parameter the playing file instead of the selected file(in the SCPL). This doesn't happen if I press the Hotkey I created for the Tag & rename service.

The button code is like this
Code: [Select]
$button(260,30,0,0,34,24,/images\LL Dark Blue\tag.png,/images\LL Dark Blue\tag g.png,Tag & Rename,CONTEXT-SELECTED)


Is this not possible?
this has absolutely nothing to do with  cwb_hooks.
$button() is a PanelsUI command.
Title: foo_cwb_hooks
Post by: carmenm on 2007-05-27 18:31:21
cwbowron : i was wondering if it was possible for $cwb_fileexists to work with things like *.jpg. Currently it doesnt and it would surely be helpful.
Thanks
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-29 15:38:46
I just uploaded a new beta version of cwb hook's that includes a new feature.    It really should be its own component, but for now its going to be included in cwb hooks.

Its a columns UI panel for adding flickr/del.icio.us/etc style tagging to files.

Keep in mind this is a beta release.  Use at your own risk.  It will modify your files.  By default it uses a generic TAG metadata field, but this is configurable in the preferences.

Download at: http://foobar.bazquux.com/downloads/foo_cwb_hooks.zip (http://foobar.bazquux.com/downloads/foo_cwb_hooks.zip)

(http://foobar.bazquux.com/images/tagger.png)

Tags can be selected by the checkboxes or you can type new ones in the edit box (space separates)
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-05-29 15:42:01
Seems to crash when I start.

Code: [Select]
entry=>app_mainloop=>main_thread_callback::callback_run=>on_playback_new_track
Crash location: "foo_cwb_hooks", loaded at 01620000h - 01665000h


Can post full if you want.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-29 15:56:16
Seems to crash when I start.

Code: [Select]
entry=>app_mainloop=>main_thread_callback::callback_run=>on_playback_new_track
Crash location: "foo_cwb_hooks", loaded at 01620000h - 01665000h


Can post full if you want.


Thanks.  I uploaded another version that I think will fix that.  Sorry.
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-05-29 16:26:28
The start seems to work now.

I get this if I tag it direct after startup. If I switch to another song it works.
Code: [Select]
Call path: entry=>app_mainloop
Crash location: "foo_cwb_hooks", loaded at 01600000h - 01645000h
Title: foo_cwb_hooks
Post by: buktore on 2007-05-29 16:36:53
Crash when i hit "Apply" or "Revert" button.

Code: [Select]
Illegal operation:
Code: C0000005h, flags: 00000000h, address: 00DF71E5h
Access violation, operation: read, address: 00000000h
Call path:
entry=>app_mainloop
This is the first crash logged by this instance.
Code bytes (00DF71E5h):
00DF71A5h:  E1 00 64 A1 00 00 00 00 50 81 EC 30 02 00 00 A1
00DF71B5h:  E0 29 E2 00 33 C4 89 84 24 28 02 00 00 53 55 56
00DF71C5h:  57 A1 E0 29 E2 00 33 C4 50 8D 84 24 44 02 00 00
00DF71D5h:  64 A3 00 00 00 00 8B AC 24 54 02 00 00 8B 4D 0C
00DF71E5h:  8B 01 8B 50 14 8D 75 0C 89 74 24 28 FF D2 8D 44
00DF71F5h:  24 74 E8 34 70 00 00 33 FF 89 BC 24 4C 02 00 00
00DF7205h:  8B 0E 8B 01 8B 40 24 8D 54 24 74 52 FF D0 8B 15
00DF7215h:  B8 5A E2 00 8B 42 04 B9 B8 5A E2 00 FF D0 8B 54
Stack (0012F47Ch):
0012F45Ch:  00F9DCDC 7C9C93C0 77F643DD 7C9C93C0
0012F46Ch:  00000004 00000000 00F9D1E8 00000000
0012F47Ch:  5AF28B03 0012F7B8 00DF6C50 0012F750
0012F48Ch:  00000000 00DF6C50 77D484FC 77D485A4
0012F49Ch:  003A0312 0012F4BC 001AC408 0012F5B0
0012F4ACh:  77F53020 0012F4E4 00150000 7C910732
0012F4BCh:  00000003 00150718 00150000 05FB1770
0012F4CCh:  0012F500 00350000 7C910732 00000003
0012F4DCh:  00350718 00350000 0503A220 0012F4D8
0012F4ECh:  0012F518 0012F71C 7C90EE18 7C910738
0012F4FCh:  FFFFFFFF 7C910732 7C9106AB 7C9106EB
0012F50Ch:  0055036E 00000010 00000000 0012F588
0012F51Ch:  77D4EEE5 2F01058F 0012F534 05FB1770
0012F52Ch:  2F01058F 00000000 0000000D 0000000B
0012F53Ch:  00000002 00000002 00000000 00000005
0012F54Ch:  00000015 00000190 77F160BB 7FFD90C4
0012F55Ch:  7FFDF000 00000000 00000000 05029678
0012F56Ch:  00000175 00000126 0012F730 05029678
0012F57Ch:  00000175 00000126 0012F730 00000020
0012F58Ch:  00000000 0000000E 00000000 05041BB8
Registers:
EAX: 0012F6C0, EBX: 00000000, ECX: 00000000, EDX: 7C90EB94
ESI: 00DF6C50, EDI: 0012F7B8, EBP: 00E44FB8, ESP: 0012F47C
Crash location: "foo_cwb_hooks", loaded at 00DF0000h - 00E30000h
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-29 16:44:03
Crash when i hit "Apply" or "Revert" button.


Did you hit it before something started playing?
Title: foo_cwb_hooks
Post by: buktore on 2007-05-29 16:50:27
It crash whenever i hit it. before playing, when playing, or playing and stop.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-29 17:03:31
Ok, I made a few changes so it should not allow you to press Apply or Revert when no song has been loaded, but I'm still not sure why Buktore was getting a crash when pressing it after a song had begun.
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-05-29 17:13:19
Now it seems it won't work at all. It won't read nor enable the buttons.
Title: foo_cwb_hooks
Post by: FofR on 2007-05-29 17:35:42
Excellent idea, now all I need is some way of automating this with the most popular last.fm tags for the same track.
Title: foo_cwb_hooks
Post by: buktore on 2007-05-29 17:45:26
Quote
foo_cwb_hooks.dll (2007-05-29 10:55:14)
    cwbowron's title format hooks 1.2.beta0b [May 29 2007 - 10:54:59]


No matter how much i downloaded. i got this version.

Is this the correct version? I suspect that this maybe my fault.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-29 18:08:33
The version on the website is 1.2.beta0c.

Here's how it should work.

Once you start playing a song, it should show the tags for that song.  Then you can check or uncheck the boxes, or add tags using the edit field.  Once you have made some changes the apply and revert buttons should enable.  Pressing Apply will make the changes to the files, revert will revert back to whats in the file.  After pressing Apply or revert the buttons will disable until you make another change.
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-05-29 18:15:11
Mine won't read the tags or enable the buttons, still.

foo_cwb_hooks.dll v1.2.beta0c [May 29 2007 - 12:01:33] [29 May 2007] - cwbowron's title format hooks
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-29 18:20:15
Mine won't read the tags or enable the buttons, still.

foo_cwb_hooks.dll v1.2.beta0c [May 29 2007 - 12:01:33] [29 May 2007] - cwbowron's title format hooks


Did you make any changes to the preferences? 

If you start playing a song, then type something in the edit box, the apply and revert do not get enabled?
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-05-29 18:30:32
I changed the tag name and the tags. They worked on the previous versions when the buttons were enabled by default.
Title: foo_cwb_hooks
Post by: buktore on 2007-05-29 18:36:32
Can someone upload latest version on http://savefile.com (http://savefile.com) ?

I can't download 1.2beta0c with the link cwbowron provide. all i got is 1.2beta0b no matter how i try. 

Thanks in advance.
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-05-29 18:38:58
Have you tried empty your browser's cache?
Title: foo_cwb_hooks
Post by: buktore on 2007-05-29 18:46:01
Yes i already try that.(3 times actually & reset too) I don't really know why i still got the old version.
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-05-29 18:52:22
If you use IE then maybe try Firefox/Opera.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-29 19:11:37
I changed the tag name and the tags. They worked on the previous versions when the buttons were enabled by default.


What UI are you using?
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-05-29 19:19:22
Columns UI 0.2.0 alpha 1
Panels UI 0.13.5 beta

Main interface is Columns UI, only using Panels UI for SCPL Track Display and Library Filter.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-30 13:41:08
Columns UI 0.2.0 alpha 1
Panels UI 0.13.5 beta

Main interface is Columns UI, only using Panels UI for SCPL Track Display and Library Filter.


Ok, I found the problem.

Columns UI 0.2 was working a little differently than 0.1.x, but I have the issue fixed and uploaded a newer version to the website.  (1.2.beta0d).
Title: foo_cwb_hooks
Post by: buktore on 2007-05-30 15:44:55
So far... It's working right now.
Title: foo_cwb_hooks
Post by: Andreasvb on 2007-05-30 16:32:22
Same here, just minor glitching when resizing.
Title: foo_cwb_hooks
Post by: fabiospark on 2007-05-30 20:39:41
to cwbowron:

I regularly backup all my 14k tracks because I put a lot of work in tagging them.

Recently, I had to temporarily point the FB media library to my backup drive and this ended up in retagging all the tracks in the drive.
Would it possible for you to add a warning dialog when a new drive or directory are added to the media library to make people aware they still have the "new files tagger" on?
Maybe with a question if they would like to tag or not the incoming "new files"?

Thanks.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-05-30 20:50:18
to cwbowron:

I regularly backup all my 14k tracks because I put a lot of work in tagging them.

Recently, I had to temporarily point the FB media library to my backup drive and this ended up in retagging all the tracks in the drive.
Would it possible for you to add a warning dialog when a new drive or directory are added to the media library to make people aware they still have the "new files tagger" on?
Maybe with a question if they would like to tag or not the incoming "new files"?


Its probably not going to happen, but there is a checkbox under Preferences->New File Tagger that you can turn on and off as to whether you want files tagged or not.

I just uploaded another beta release with the tagger window:

= Release 1.2.beta1 =
* added rating radio buttons to tagger window
* added filename display to top of tagger window
Title: foo_cwb_hooks
Post by: fabiospark on 2007-05-30 20:55:54

to cwbowron:

I regularly backup all my 14k tracks because I put a lot of work in tagging them.

Recently, I had to temporarily point the FB media library to my backup drive and this ended up in retagging all the tracks in the drive.
Would it possible for you to add a warning dialog when a new drive or directory are added to the media library to make people aware they still have the "new files tagger" on?
Maybe with a question if they would like to tag or not the incoming "new files"?


Its probably not going to happen, but there is a checkbox under Preferences->New File Tagger that you can turn on and off as to whether you want files tagged or not.

I just uploaded another beta release with the tagger window:

= Release 1.2.beta1 =
* added rating radio buttons to tagger window
* added filename display to top of tagger window


Yes, I know, but unfortunately I didn't even remember I had the nft on.
Honestly, I think I wouldn't have realized the plugin was going to consider my old backupped tracks as "new" even if I did remember it was there and on. This is why I'm asking you that warning dialog.

Thanks.
Title: foo_cwb_hooks
Post by: buktore on 2007-05-31 13:04:08
I think this is a bug.

in Column UI 0.2.0 If i put tagger window in tabbed panel stack. Changed layout to another. and then change back. tagger window will gone.    and sometime when i add it to my tabbed panel. close preference. and still tagger window will not show up.

If i not put it in tabbed panel and to somewhere else. and change layout then change back. tagger window is still show in column ui layout page in preference. but it's not show up in my UI.

cwb hook version 1.2.beta1
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-01 13:54:14
= Release 1.2.beta2 =
* tagger window: work with multiple files
* tagger window: work on the contents of the active playlist selection or now playing (whichever action happend last)
* tagger window: when adding tags to the list box, also add them to the stored list of tags
* tagger window: bug fixes - tested to work with foo_uie_tabs
Title: foo_cwb_hooks
Post by: carmenm on 2007-06-01 13:56:17
cwbowron: Do you think it would be possible to make $cwb_fileexists work with something like *.bmp ? (i know i already asked but i was not sure you saw it)
Title: foo_cwb_hooks
Post by: buktore on 2007-06-01 14:15:19
The bugs i report are now gone    Great job cwbowron.

I noticed that now there is a "grey" checkbox. what does it do?
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-01 14:20:13
The bugs i report are now gone    Great job cwbowron.

I noticed that now there is a "grey" checkbox. what does it do?


the grey checkbox means leave as is... It will show up when the tag is in some, but not all of the selected tracks.  If you don't change it to the regular checkbox or a non-checkbox it won't modify that tag.
Title: foo_cwb_hooks
Post by: elenhil on 2007-06-01 17:47:50
Please, include "hotness" meta-rating in cwb_hooks! That would be very useful for other plugins like playlist_tree.
Title: foo_cwb_hooks
Post by: bit4bit on 2007-06-04 12:24:00
great stuff cwb,

was wondering if %cwb_selection_count% -is, could, might, won't -be added?
or maybe this is already possible with existing title formatting?


I have the same request for %cwb_selection_count%. If there is another solution please let me know.
Title: foo_cwb_hooks
Post by: metal_termite on 2007-06-04 13:34:53
cwbowron, the Tagger Window is a nice addition (I guess I can ditch the keyword tagger I made for PUI).

The UI needs some work though.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-04 13:48:07
The UI needs some work though.


Any suggestions?
Title: foo_cwb_hooks
Post by: metal_termite on 2007-06-04 14:16:45
(http://i11.tinypic.com/5ybofm8.png)

Maybe something like that? The tabs at the top represent more than one tag field that users could specify in settings. That might be a lot of work (what's in that concept) and maybe even warrant its on tagger window component?

I made a mistake though in the concept. If tag values are to be clickable (for searches), I should have made them look like hotlinks (underlined with Windows' default hotlink color).
Title: foo_cwb_hooks
Post by: buktore on 2007-06-04 15:31:13
  I also thinking that to have multiple tag window&tag name would be great. But not think far enough to have them tabbed together. Nice!

May i also add some request? i think it's nothing fancy or something new but certainly be very useful.

Ability to change background&font color and change font. 

Thanks. 
Title: foo_cwb_hooks
Post by: sylla on 2007-06-04 23:59:34
I agree with the two previous posters, this tagger panel is a great addon. I also agrees 100 % on all their requests< hiding ratings, tabbed tag fields, clickable tag values, and ability to change the colors and fonts

Great idea this however!
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-05 20:29:53
Just uploaded a new version.  Tagger is still included in the foo_cwb_hooks.dll, but I will be doing independent version numbers for it.  I may at some point break it into its own component dll.

Release 1.2.4 (hooks) / 1.0.beta 3 (tagger)

    * independant version number for tagger_window
    * tagger_window: double click a tag creates a playlist of files with that tag
    * tagger_window: Show Ratings Buttons option ( ON by default )
    * tagger_window: allow multiple instances, each with own properties (right click on panel to get to options)
Title: foo_cwb_hooks
Post by: FofR on 2007-06-05 21:05:55
Any thoughts on applying weights to tags? For relevance?
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-05 21:07:43
Any thoughts on applying weights to tags? For relevance?


Probably not.  Seems like a fringe use case.
Title: foo_cwb_hooks
Post by: metal_termite on 2007-06-06 14:38:08
Hmm. The tag window gets buggy when reading tag values that have spaces in them. It splits the values at each space character. For instance if I set the metadata field to GENRE and I play a track that has "industrial metal" as one of its values, the component processes the value as two different values altogether, such as "industrial" and "metal" rather than "industrial metal."

This also represents a problem in the tag window options if someone wishes to have a single tag value that contains more than one word. I think rather than separating tags using spaces, perhaps using a semi-colon would be better.

Do you have any intention of implementing a tabbed ui to support more than metadata field, as well as custom font properties? Just wondering, no pressure.

Also, could you make it optional to remove the displaying of the track location? Or better, yet as well as being optional, allow the user to define how the current track information appears using titleformatting.

One final comment. I like how the tag values wrap adjacent to other tag values when the tagger window has limited vertical space.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-06 14:56:57
Do you have any intention of implementing a tabbed ui to support more than metadata field, as well as custom font properties? Just wondering, no pressure.


Probably Not...

You can do multiple field using multiple instances of the panel, each with their own properties, and use foo_uie_tabs to make them tabbed.
Title: foo_cwb_hooks
Post by: plysch on 2007-06-06 22:25:26

great stuff cwb,

was wondering if %cwb_selection_count% -is, could, might, won't -be added?
or maybe this is already possible with existing title formatting?


I have the same request for %cwb_selection_count%. If there is another solution please let me know.


Despite some serious Googling, I have not found a good solution to this problem (want to add selection_count to Status Bar or trackinfo). Ergo, I would very much appreciate a %cwb_selection_count%.
Title: foo_cwb_hooks
Post by: odyssey on 2007-06-07 00:42:37
I've been waiting for the tagger window, how could I miss it an entire WEEK??? Thanks CWB!  Seems that my previous request wasn't that useless after all

The only improvement I could think of is the ability to write tags immediately instead of applying everytime.

I think this could be considered a bug: When you set tags, the selection in the playlist (at least columns) is lost 

Edit: Another annoyance: When you want to disable a tag for a single file, the box turns grey instead of blank (makes no sense, since the tag does not apply on any of the selected files).

And it would be nice to be able to disable the playlist creation on double click

Also I don't see the need for displaying the file being edited (it should match the selection in the playlist, and only takes up valuable space in the layout)
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-07 03:22:52
Also I don't see the need for displaying the file being edited (it should match the selection in the playlist, and only takes up valuable space in the layout)


If you select a file, and then a new track starts playing, the new track will be the one being edited, not the playlist selection.  That's why its displayed there to make it very clear which file its tagging.

The other option is to have follow cursor or follow playing song, but I don't think I want to go that route, this way seems more flexible.
Title: foo_cwb_hooks
Post by: odyssey on 2007-06-07 07:43:28
this way seems more flexible.

...confusing, i would say 

You *are* able to tag multiple files at a time, right?
Title: foo_cwb_hooks
Post by: buktore on 2007-06-07 08:10:11
Quote
You *are* able to tag multiple files at a time, right?


Yes. 


Quote
...confusing, i would say


It's maybe a bit confusing at first. But i found the indicater that tell which files will be edit solve the ploblem. And now i find it very convenience.
Title: foo_cwb_hooks
Post by: metal_termite on 2007-06-07 13:30:11
I've grown to like the display of the track too, but it would still be convenient to change the way the track is displayed with titleformatting. Then, if users like odyssey wish to hide that display they could always just leave the titleformatting blank.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-07 15:36:58
Release 1.2.5 / 1.0.beta4 (Tagger)

    * %cwb_selection_count% (by popular demand)
    * tagger_window: Users can only toggle between off/on... indeterminate state can only be entered into automatically based on file tags
    * tagger_window: Only double clicking on label will create playlist now (before you could dbl click on checkbox too)
    * tagger_window: semi-colon is now the delimiter so you can have spaces in your tags... (should convert your old setup correctly)
Title: foo_cwb_hooks
Post by: metal_termite on 2007-06-07 16:19:55
It works flawlessly now from what I can tell
Thank you cwbowron, this is going to be a very useful component.

The component is pretty solid as is, the only other suggestions I can think of are:

* when a tag value is right clicked, a context menu that contains:
.... options (this is already there)
.... remove tag from list (more efficient than removing it via options if there is an abundance of tag values to sift through)

* cosmetic change for the text entry form. make the the border around it solid gray as it is around the tag value list (because at least for me on vista, with the white background you can only see the gray border on the top side, so it looks inconsistent/incomplete).

* allowing a carriage return in the text entry form to have the same effect as clicking "apply."

* custom font properties (for static/hover/highlighted fonts).
Title: foo_cwb_hooks
Post by: bit4bit on 2007-06-07 17:01:42
Release 1.2.5 / 1.0.beta4 (Tagger)

    * %cwb_selection_count% (by popular demand)


Thanks a lot for %cwb_selection_count% 
Title: foo_cwb_hooks
Post by: gregory on 2007-06-07 22:10:23
Release 1.2.5 / 1.0.beta4 (Tagger)

    * %cwb_selection_count% (by popular demand)


many thanks to you sir
Title: foo_cwb_hooks
Post by: Keikonium on 2007-06-07 23:29:12
Release 1.2.5 / 1.0.beta4 (Tagger)

    * %cwb_selection_count% (by popular demand)


Great! Already put it to good use toggling between my entire playlist songs when only 1 song is selected, and my selection when two or more songs are selected .
Title: foo_cwb_hooks
Post by: odyssey on 2007-06-08 07:39:22
I've grown to like the display of the track too, but it would still be convenient to change the way the track is displayed with titleformatting. Then, if users like odyssey wish to hide that display they could always just leave the titleformatting blank.

I'm not asking for it to be blank - It takes up useful layout space.

The concept of this component is great, and I've wanted something like this forever!

However, It seriously needs a more proffessional and logical UI and workflow, to match the standard of other foobar components!

1. Why was this panel incorporated in a component with another purpose, instead of a seperate component?

2. Instead of using a list of standard tags, it should gather a list of the values from the media library - Just like foo_browser! (The custom list, still could be a nice feature, for tags that may not already be tagged on files)

3. I would never want any component to reset my track selection in my playlist! Since it does trigger the files selected, it's logical to KEEP the selection.

4. Because it allows to tag more than one file, the track-string above the tags, are useless and ugly incorporated! (If people really want it, you could create a variable or function, which people could use in a track display)

5. When you deselect a tag from a file, the checkbox status should match the selection instead of just showing grey (as if multiple files were selected, and some of them contained the tag).

6. The rating boxes are ugly incorporated, and if they should be there, they should be customizable. And really they should be horizontal instead of vertical - Better yet: Give them a seperate panel!

7. The GUI could need some rework. There seems to be some pixels padding in the sides, and it needs the typical options for changing fonts, colors, border etc. - All this is just nice-to-have. I prefer better functionality over nice graphics.
Title: foo_cwb_hooks
Post by: buktore on 2007-06-08 08:30:09
Quote
6. The rating boxes are ugly incorporated, and if they should be there, they should be customizable.


You can remove it.
Title: foo_cwb_hooks
Post by: odyssey on 2007-06-08 08:46:43
Quote
6. The rating boxes are ugly incorporated, and if they should be there, they should be customizable.


You can remove it.

I'm well aware of that, I still don't think they are implemented for logical use.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-08 13:42:21
1. Why was this panel incorporated in a component with another purpose, instead of a seperate component?


I distribute 6 plugins.  Each additional plugin I distribute creates more work for me.  I have limited time available for this.  I can either spend my time doing grunt work to create new stuff as separate components or I can add it to an existing component and have more time for adding new functionality.  I'd rather spend my time coding.

Quote
3. I would never want any component to reset my track selection in my playlist! Since it does trigger the files selected, it's logical to KEEP the selection.


I've never seen this happen.

Quote
4. Because it allows to tag more than one file, the track-string above the tags, are useless and ugly incorporated!


I disagree, I think its very functional.

Quote
5. When you deselect a tag from a file, the checkbox status should match the selection instead of just showing grey (as if multiple files were selected, and some of them contained the tag).


That's what i does now.

Quote
6. The rating boxes are ugly incorporated, and if they should be there, they should be customizable. And really they should be horizontal instead of vertical - Better yet: Give them a seperate panel!


Horizontal rating buttons are my list of possibilities...
Title: foo_cwb_hooks
Post by: odyssey on 2007-06-08 14:12:11
Quote
3. I would never want any component to reset my track selection in my playlist! Since it does trigger the files selected, it's logical to KEEP the selection.
I've never seen this happen.

That's a bug report then  I don't know if it does not happen with SCPL, but it does with Columns Playlist (with ColumnsUI 2.0)

Quote
4. Because it allows to tag more than one file, the track-string above the tags, are useless and ugly incorporated!
I disagree, I think its very functional.

Could you then please make an option to remove it?

Quote
5. When you deselect a tag from a file, the checkbox status should match the selection instead of just showing grey (as if multiple files were selected, and some of them contained the tag).
That's what i does now.

That would be another bug.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-08 14:38:03
Quote
3. I would never want any component to reset my track selection in my playlist! Since it does trigger the files selected, it's logical to KEEP the selection.
I've never seen this happen.

That's a bug report then  I don't know if it does not happen with SCPL, but it does with Columns Playlist (with ColumnsUI 2.0)


What steps do you take to make this happen?

What are you settings for cursor follows playback?
Title: foo_cwb_hooks
Post by: odyssey on 2007-06-08 15:46:37

Quote
3. I would never want any component to reset my track selection in my playlist! Since it does trigger the files selected, it's logical to KEEP the selection.
I've never seen this happen.

That's a bug report then  I don't know if it does not happen with SCPL, but it does with Columns Playlist (with ColumnsUI 2.0)
What steps do you take to make this happen?

Apologies. The selection is not lost, I had just accidentally made the inactive selection background same color as the playlist background

I just checked with other panels - Generally if you make some kind of selection in a panel, the focus are not taken off the playlist (which triggers the inactive selection background color).
Title: foo_cwb_hooks
Post by: buktore on 2007-06-08 15:48:03
Damn.. i post to quick.

sorry.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-06-12 20:15:51
= Release 1.2.5 / 1.0.5 (Tagger) =
* "Tag in Tagger Window" context menu item
* Tagger Window: Show files option
* Tagger Window: Scan library for more tags option
* Tagger Window: Pressing enter in the tag edit box will apply the changes...
Title: foo_cwb_hooks
Post by: metal_termite on 2007-06-15 01:16:49
= Release 1.2.5 / 1.0.5 (Tagger) =
* "Tag in Tagger Window" context menu item
* Tagger Window: Show files option
* Tagger Window: Scan library for more tags option
* Tagger Window: Pressing enter in the tag edit box will apply the changes...

I have a pop-up Panel's UI window containing a foo_uie_tabs panel that has 5 of these tagger windows in it. I noticed that when I open the pop-up window now it loads instantaneously whereas before it lagged a little. Whatever you did, good job.
Title: foo_cwb_hooks
Post by: shakey_snake on 2007-06-15 01:30:48
You got foo_uie_tabs to works with panelsUI?
Title: foo_cwb_hooks
Post by: metal_termite on 2007-06-15 02:15:56
You got foo_uie_tabs to works with panelsUI?

Yeah. The only limitation I've found so far is the $panel function doesn't work inside a Track Display tab.
Title: foo_cwb_hooks
Post by: Spirit_of_the_ocean on 2007-06-15 22:05:18

You got foo_uie_tabs to works with panelsUI?

Yeah. The only limitation I've found so far is the $panel function doesn't work inside a Track Display tab.

Could you write a small tutorial?
I read in the wiki you can use the uie_tabs but I didn't understand how to get this working.A lots of people say that tabs won't work so I am a bit confused.
Title: foo_cwb_hooks
Post by: metal_termite on 2007-06-15 22:52:29
Could you write a small tutorial?
I read in the wiki you can use the uie_tabs but I didn't understand how to get this working.A lots of people say that tabs won't work so I am a bit confused.

Sure, it's actually quite easy.

1. To make the pop-up "Tagger Window" button.
$button2(DstX,DstY,X,Y,W,H,TEXT,HOVER TEXT,POPUP:Tagger Window,)

2. Now that you have pop-up "Tagger Window" delete all the default code from the new pop-up "Tagger Window" so it's a blank slate and put this:

Code: [Select]
// Global

// Background
$settitle(Tagger)
$drawrect(0,0,0,0,brushcolor-SYSCOL-15 pencolor-NULL)

// PerTrack
$panel(Tagger Tabs,Tabbed panel stack mod,5,5,$eval(%_width%-10),$eval(%_height%-10),)
$panel(Cosmetic Line,Track Display,0,27,%_width%,2,)


That will make a foo_uie_tabs panel inside the window.

3. For the "Cosmetic Line" Track Display panel,  enter this (it makes the tabs look better):

Code: [Select]
// Background
$drawrect(0,0,%_width%,1,pencolor-137-140-149 brushcolor-137-140-149)
$drawrect(0,1,%_width%,2,pencolor-255-255-255 brushcolor-255-255-255)


You might have to adjust the color of those $drawrect functions so they match your windows theme. Mine is set to match Vista's Aero Glass.

Then the rest is pretty straightforward, you just right click the foo_uie_tabs component to add components as tabs.
Title: foo_cwb_hooks
Post by: shakey_snake on 2007-06-21 06:13:44
You seem to have quite a few Variables for indicating the basic settings of things:
%cwb_playback_order%
%cwb_stopaftercurrent%
%cwb_followcursor%

Would it maybe make sense to have one function to handle those (and more)?
Code: [Select]
$cwb_checkmarkcheck(foo)
...could return a 1 or a 0 depending on whether or not the main menu item foo has a checkmark next to it (as shows in the menu) or not.

Failing that, %cwb_followsplayback% and %cwb_stopafterqueue% (a foo_uie_queuemanager function) would be nice.
Title: foo_cwb_hooks
Post by: metal_termite on 2007-06-22 03:18:57
Re: Tagger Window

If it is not too much trouble, when you have time could you please add a "Remove tag" option to the context menu when right clicking a tag? It would be much easier then going into the options dialog, finding the tag you want to remove and deleting it.

I initially sync my files with AMG data using Mp3tag. It doesn't do "multi-value" tags so my STYLE tag looks like one long string of styles separated by commas. When I open the files in foobar2000, the tagger window picks it up and adds it to the list of tags before I get a chance to run my Masstagger script on it to format the tag into a multi-value tag. So I always have to end up deleting the preformatted tags in the Tagger Window.
Title: foo_cwb_hooks
Post by: masterrossi on 2007-06-27 22:38:41
Maybe a really stupid question, but can you please explain in easy words what this cwb hooks does?

I needed to install it for some UI i am using, but now it gives me all these extra functions I don't get. For example, does it write info in my tags (something i don't want, because i sometimes upload things with torrents and if the tags change the torrents don't work anymore)

And what's the purpose of this all. I just don't seem to get it, not even after reading some pages in this topic and your website.

Thanks for the explenation in advance.
Title: foo_cwb_hooks
Post by: kanak on 2007-06-28 00:13:18
Maybe a really stupid question, but can you please explain in easy words what this cwb hooks does?

I needed to install it for some UI i am using, but now it gives me all these extra functions I don't get. For example, does it write info in my tags (something i don't want, because i sometimes upload things with torrents and if the tags change the torrents don't work anymore)

And what's the purpose of this all. I just don't seem to get it, not even after reading some pages in this topic and your website.

Thanks for the explenation in advance.


There are two different components rolled into one: first is the "cwb_hooks" which provides convenient functions like $cwb_datediff to calculate the difference in time between two dates (useful for making last played stuff like "Played X days ago") and then there's the tagger window which is useful for well adding tags to your files. The Tagger window is reallly useful if for instance, if you want to tag your music library with "genre". you enter all the genres you need, and then select files, click on tagger to tag files... saves a lot of headache.

Check out the wiki for more detailed (and useful) description of the component.
Title: foo_cwb_hooks
Post by: masterrossi on 2007-06-28 10:51:35
Ok, I think I get it a little now, I am going to play with it some more.
Title: foo_cwb_hooks
Post by: metal_termite on 2007-06-28 11:43:26
You may find the unofficial foo_cwb_hooks wiki (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/Cwbowron%27s_Title_formating_%28foo_cwb_hooks%29) useful as well. I tried to provide a more detailed explanation of the functions and variables than in the official wiki.
Title: foo_cwb_hooks
Post by: masterrossi on 2007-06-28 13:33:32
Thanks, now even found out how to change somethings in my layout in a way I want it to be.

Title: foo_cwb_hooks
Post by: odyssey on 2007-06-29 11:57:01
cwbowron: Could you add a function to call main menu items? This is already possible with PanelsUI's $button, but requires user interaction. I would like to change the state of items based on various settings/tags.

Edit: Eventually also a function to check if a menuitem has a checkmark.
Title: foo_cwb_hooks
Post by: Keikonium on 2007-07-14 00:10:12
With this component, is it possible to change an image based on the volume status? I am trying to use this (and it shows up) but doesn't function correctly:


Code: [Select]
$imageabs2(0,17,0,0,15,15,0,0,$if3($ifgreater(%cwb_volume%,25,$get(dir1)sound_high.png,$get(dir1)sound_low.png),),)


Basicly, I want to display "sound_high.png" if the volume is above 25, and display "sound_low.png" if it is below 25.

Is this possible?
Title: foo_cwb_hooks
Post by: topdownjimmy on 2007-07-14 02:07:20
With this component, is it possible to change an image based on the volume status? I am trying to use this (and it shows up) but doesn't function correctly:


Code: [Select]
$imageabs2(0,17,0,0,15,15,0,0,$if3($ifgreater(%cwb_volume%,25,$get(dir1)sound_high.png,$get(dir1)sound_low.png),),)


Basicly, I want to display "sound_high.png" if the volume is above 25, and display "sound_low.png" if it is below 25.

Is this possible?

%cwb_volume% values are negative

you'll want to change 25 to -75
Title: foo_cwb_hooks
Post by: Keikonium on 2007-07-14 04:13:58
Changing it to -75 still doesn't do anything (except it makes the image go from the LOW to the HIGH one when it was only 20). I basically want to move the volume slider up and down, and have the image update. I have put the code under the // PerSecond header, but still nothing happens.

Could the code be incorrect for what I am trying to do perhaps?
Title: foo_cwb_hooks
Post by: Birk on 2007-07-15 16:29:50
hey, can you please change the tagger window so that its tags/select the selected item, if I select another playlist? Because I've so often tagged wrong files (like a full playlist...) before I saw that the selected item wasn't "selected" by the tagger window.
but its really great for fast tagging, thanks!
Title: foo_cwb_hooks
Post by: odyssey on 2007-07-23 18:59:09
Bug report for Tagger Window: When you manually enter a value it shows up as marked, but the "Apply" button is inactive although it has not been tagged yet. The button should stay active, so the marked tags could be written.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-07-23 19:10:52
Bug report for Tagger Window: When you manually enter a value it shows up as marked, but the "Apply" button is inactive although it has not been tagged yet. The button should stay active, so the marked tags could be written.


If you enter a value manually, then press enter, the tag IS ADDED to the file, then it will show up in the list with a mark on it... It's already been added to the file... so then the Apply button disables...
Title: foo_cwb_hooks
Post by: odyssey on 2007-07-23 19:14:58
Bug report for Tagger Window: When you manually enter a value it shows up as marked, but the "Apply" button is inactive although it has not been tagged yet. The button should stay active, so the marked tags could be written.


If you enter a value manually, then press enter, the tag IS ADDED to the file

False. Just checked.
, then it will show up in the list with a mark on it...

True  That's why it's a bug

(Edit) Another bug: The scrollbar displays as if there was data in the column after the last. It should only display if there were data.
Title: foo_cwb_hooks
Post by: cwbowron on 2007-07-23 19:21:46
True  That's why it's a bug


i'm still not seeing a bug... Here's a video of what I did:

http://www.screencast.com/t/dd2E1kDQrqF (http://www.screencast.com/t/dd2E1kDQrqF)

I looked at the properties, no Tags... I type in Cool, then hit enter... the tag "Cool" shows up in the properties of the file and the tagger window, then i uncheck it and apply it and it gets removed...

Are you experiencing different behavior than this?
Title: foo_cwb_hooks
Post by: odyssey on 2007-07-23 19:33:28
True  That's why it's a bug


i'm still not seeing a bug... Here's a video of what I did:

http://www.screencast.com/t/dd2E1kDQrqF (http://www.screencast.com/t/dd2E1kDQrqF)

I looked at the properties, no Tags... I type in Cool, then hit enter... the tag "Cool" shows up in the properties of the file and the tagger window, then i uncheck it and apply it and it gets removed...

Are you experiencing different behavior than this?

I was, but now when I retry I can't reproduce it. Have to investigate further to find the real cause why it would not work in the first place.
Title: foo_cwb_hooks
Post by: odyssey on 2007-07-25 17:16:05
I have a feature request

PanelsUI allows to create buttons by titleformatting functions that accesses menu items. It would open a world of new possebilities if a function could be created to access menu items without user interaction.

Uses could be:
Automatically enable/disable crossfading or other DSPs between tracks depending on certain rules.
Automatically select ReplayGain method depending on certain rules.
Title: foo_cwb_hooks
Post by: Kiteroa on 2007-07-30 12:58:14
Feature request:

Would you consider implementing some cwb_previous_ functions which give title/artist/user specified strings from the track before the current one in the playing playlist. I want to show these on buttons.

I would just save them in variables but the last played track is often not the one before the current one being played, when, say, I start playing in the middle of a playlist.
Title: foo_cwb_hooks
Post by: Nemphael on 2007-08-05 13:42:24
Feature request:

Is it possible to include a command for calculating a folder's size? I'd like to use this for various things, but furthermost to see how much space there's left on my iPod.
Title: foo_cwb_hooks
Post by: radecke on 2007-08-21 15:11:48
when i use $cwb_datediff(d1,d2) in my config it shows me an unknown function error.

my code:
$cwb_datediff(%cwb_systemdatetime%,%first_played%)
Title: foo_cwb_hooks
Post by: dRsrb on 2007-09-01 15:42:59
Hi!

Does %cwb_followcursor% return anything?
If I put it in my code, it doesn't return a string or a value (like %cwb_playback_order% or %cwb_playback_state% does).
Is it possible to force it, or how can I compare if %cwb_followcursor% is true or false?

bye
Title: foo_cwb_hooks
Post by: Purple Monkey on 2007-09-01 17:19:56
No it does not return a string only a boolean value. Use it like this:
Code: [Select]
$if(%cwb_followcursor%,'true','false')
Title: foo_cwb_hooks
Post by: dRsrb on 2007-09-01 19:12:52
No it does not return a string only a boolean value. Use it like this:
Code: [Select]
$if(%cwb_followcursor%,'true','false')

Thank you!
This works, the only problem is, that it doesn't update immediately after playback information has changed!

bye
Title: foo_cwb_hooks
Post by: metal_termite on 2007-09-28 19:38:56
This is a request for three new additions to the playlist information specific variables (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/Cwbowron%27s_Title_formating_%28foo_cwb_hooks%29#Playlist_information).

Why would this be useful? One example: I am trying to emulate the iTunes status bar that shows the number of tracks in a playlist or selected, the duration of the said tracks, and file size of the said tracks. With the currently available variables all but the cumulative file size can be calculated.

Any reply on the acceptance or rejection of this request by the developer would be appreciated. Thanks
Title: foo_cwb_hooks
Post by: q-stankovic on 2007-10-05 21:25:58
Hello Chris!

Sometimes it seems to me that people would like to have everything as panel. However, i don't really know there to put the tagger window in my layout and i also think that a panel is in that sense a bad place for it like it would be for the properties window. I would like to ask if you can make an option to use tagger window as normal window (like properties...). And if the SDK allows to create an own page in the properties window, so... 
Title: foo_cwb_hooks
Post by: cwbowron on 2007-10-05 21:33:29
Sometimes it seems to me that people would like to have everything as panel. However, i don't really know there to put the tagger window in my layout and i also think that a panel is in that sense a bad place for it like it would be for the properties window. I would like to ask if you can make an option to use tagger window as normal window (like properties...). And if the SDK allows to create an own page in the properties window, so... 


You might take a look at my dockable panels plugin.

http://www.bazquux.com/wiki/Foobar2000:Dock (http://www.bazquux.com/wiki/Foobar2000%3a%44ock)
Title: foo_cwb_hooks
Post by: q-stankovic on 2007-10-05 21:41:47
I know Dockable Panels but there are following reasons i wouldn't like to use for it:

1. When i close the tagger window as dockable panel i would have to create a new one

2. It is not very convenient first to call dockable panel tagger window and then to send files to them. I just would like to select tracks and then send them to tagger window by context menu, hotkey or ColumnsUi button
Title: foo_cwb_hooks
Post by: amiti on 2007-10-13 04:22:42
Hello cwbowron ,
1.Would it be possible to leave out the apply button in the tagger window? ie as soon as you toggle the tags they will be added or removed from file .

2.Can you make the tagger window to work with the custom info plugin database ie to store the tags in its external database?

Thank you.
Title: foo_cwb_hooks
Post by: YoPen on 2007-10-13 10:34:27
This is a request for three new additions to the playlist information specific variables (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/Cwbowron%27s_Title_formating_%28foo_cwb_hooks%29#Playlist_information).
  • %cwb_activelist_filesize% - Would return the cumulative file size in bytes of the active playlist
  • %cwb_selection_filesize% - Would return the cumulative file size in bytes of the selected tracks
  • %cwb_playinglist_filesize% - Would return the cumulative file size in bytes of the playlist list

+1

good request!
Title: foo_cwb_hooks
Post by: gregory on 2007-10-17 08:20:53
when using $cwb_hms(n) on a time value of 0, "0" is displayed, might this be changed to "00" for consistency?

perhaps this is present in other functions as well


*edit

on second look there seems to be other times when only a single digit gets displayed, such as when there are single digit seconds and single digit hours, just was thinking that always having double digits for each interval(hours, minutes, seconds) would be a more consistent look
Title: foo_cwb_hooks
Post by: q-stankovic on 2007-10-17 19:45:47
2. It is not very convenient first to call dockable panel tagger window and then to send files to them. I just would like to select tracks and then send them to tagger window by context menu, hotkey or ColumnsUi button


Sure, that only happens when using "tag in tagger window" outside of playlists.

I hope that you can understand that i don't like to install a whole plugin just to have a simple window wich even isn't one. 
Title: foo_cwb_hooks
Post by: sankukaai on 2007-10-18 20:51:23
Hi all, i have a question:


Using cwb_hooks, i'd like to have a config in which i dont see the artist and the album on each line if i am playing full albums, but i want to see them when i make a custom playlist (e.g. search->*(for rated songs)->add to playlist.

It tried to use it like this

%ifequal(%tracknumber%,1,%artist%,$if(%cwb_next_artist%=%artist%,,%artist))

It works very fine for full albums, but for custom playlists it will only show artists for songs that are first on the CD in the first place. I understood from this that %cwb_next_artist% was referring to the next artist in database and not in the active playlist. Please tell me if I'm wrong.

Is there a way to do that?

thks a lot.
Title: foo_cwb_hooks
Post by: HiFiRE on 2007-10-22 23:59:04
foo_cwb_hooks seems to add an item to the playlist right click menu that doesn't do anything ("tag in tagger window") in the new foobar beta. Just a heads up.
Title: foo_cwb_hooks
Post by: nightfishing on 2007-10-23 00:16:19
foo_cwb_hooks seems to add an item to the playlist right click menu that doesn't do anything ("tag in tagger window") in the new foobar beta. Just a heads up.


It is a leftover function from 0.9.4 (where it activated a panel)
Title: foo_cwb_hooks
Post by: gregory on 2007-10-24 10:35:24
another request 

when using a variable from cwb_hooks that involves time, such as %cwb_selection_duration%...
and when using a variable from foobar such as %length%...
it becomes obvious that the time is being rounded differently

i may have a song that returns 4:45 when using %length%
but a cwb_hooks variable might return 4:44
i'd say this affects 1/2 of all my tracks

is this a known way of being, is it this way for a reason? might it be changed?

thanks
Title: foo_cwb_hooks
Post by: The81x on 2007-10-25 16:56:01

This is a request for three new additions to the playlist information specific variables (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/Cwbowron%27s_Title_formating_%28foo_cwb_hooks%29#Playlist_information).
  • %cwb_activelist_filesize% - Would return the cumulative file size in bytes of the active playlist
  • %cwb_selection_filesize% - Would return the cumulative file size in bytes of the selected tracks
  • %cwb_playinglist_filesize% - Would return the cumulative file size in bytes of the playlist list

+1

good request!


+1

Would also find this useful.

Thanks
Title: foo_cwb_hooks
Post by: eejadx on 2007-10-30 18:48:15
I have a question/request for the New File Tagger.

Is it possible add a timestamp to a new file only when there is no tag entry? That could be useful to prevent overwriting when the database is lost or, like in my case, when several computers shares the same library.

Something like this:
$if($meta_test(added),,<timestamp script>)

Thanks
Title: foo_cwb_hooks
Post by: Sleepy on 2007-10-30 22:04:42
Quote
Is it possible add a timestamp to a new file only when there is no tag entry? That could be useful to prevent overwriting when the database is lost or, like in my case, when several computers shares the same library.

Something like this:
$if($meta_test(added),,<timestamp script>)


This approach doesn't work - if the ADDED tag is present, it will be deleted.

See this post for an idea of how to do this:  http://www.hydrogenaudio.org/forums/index....st&p=483397 (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=43606&view=findpost&p=483397)
Title: foo_cwb_hooks
Post by: eejadx on 2007-10-31 01:21:41
Marvelous!
Title: foo_cwb_hooks
Post by: gob on 2007-11-02 09:20:53
hey cwbowron, are there any plans to add %cwb_selection_count%? %cwb_selection_duration% has been available for a while and the count could probably be added pretty quickly if the code is already using it to calculate the duration.
Title: foo_cwb_hooks
Post by: metal_termite on 2007-11-02 09:47:01
hey cwbowron, are there any plans to add %cwb_selection_count%? %cwb_selection_duration% has been available for a while and the count could probably be added pretty quickly if the code is already using it to calculate the duration.


It's already there. (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/Cwbowron%27s_Title_formating_%28foo_cwb_hooks%29#.25cwb_selection_count.25)
Title: foo_cwb_hooks
Post by: plukin on 2007-11-02 10:01:32
Is it possible add a timestamp to a new file only when there is no tag entry? That could be useful to prevent overwriting when the database is lost or, like in my case, when several computers shares the same library.


yes, its possibly. i've found it somewhre in this forum, i think.

manage your script as fellowing:
1. Time Stamp: Added_temp
2. Format: "Added" using "$if(%Added%,%Added%,%Added_temp%)"
3 Remove: Added_temp

works well for me!
bye
Title: foo_cwb_hooks
Post by: gob on 2007-11-03 08:05:48
hey cwbowron, are there any plans to add %cwb_selection_count%? %cwb_selection_duration% has been available for a while and the count could probably be added pretty quickly if the code is already using it to calculate the duration.


oh geez.. thats what i get for not checking for the newest version. i also checked the official hooks (http://www.bazquux.com/wiki/Foobar2000:Hooks) page so i assumed it wasn't included. perhaps these 2 pages could somehow be merged to prevent confusion.

thanks for the info, i was able to pull a few neat tricks with this string.
Title: foo_cwb_hooks
Post by: metal_termite on 2007-11-03 10:35:54
I just noticed %cwb_selection_count% and %cwb_selection_duration% don't work for me anymore after the recent ColumnsUI or FB2K updates (I didn't notice when it stopped working). Did it break for anyone else or is it just me? For instance, %cwb_selection_count% always returns 1 when more than 1 track is selected.
Title: foo_cwb_hooks
Post by: thuan on 2007-11-03 10:42:01
Works fine for me in foobar 0.9.5 beta 2 with DUI.
Title: foo_cwb_hooks
Post by: vader897 on 2007-11-03 10:50:52
Actually, cwbowron is still considering putting hotness into one of his components, something like $tdj_hotness()



I was just wondering if this was still under consideration.  It would be mighty fine to have.

Thanks cwbowron
Title: foo_cwb_hooks
Post by: Mans on 2007-11-03 12:35:01
why %cwb_next_title% does not work correctly in foo_osd. when  song starting play, show the same song that is playing now. Correctly beginning to show after some time.
script
$rgb(0,255,0,0,0,0)Now: [%artist% - ]$if(%title%,['['%album%[ #[%disc%/]$num(%tracknumber%,2)]'] ']%title%,%_filename%)[ '['%_length%']']$if(%_ispaused%,' [paused]')
[$char(10)$rgb(35,169,207,16,43,75)Next: %cwb_next_title%]

Same result if i uncheck playback follow cursor and cursor follow playback
Title: foo_cwb_hooks
Post by: 4nt1 on 2007-11-03 22:24:30
Is it possible add a timestamp to a new file only when there is no tag entry? That could be useful to prevent overwriting when the database is lost or, like in my case, when several computers shares the same library.


yes, its possibly. i've found it somewhre in this forum, i think.

manage your script as fellowing:
1. Time Stamp: Added_temp
2. Format: "Added" using "$if(%Added%,%Added%,%Added_temp%)"
3 Remove: Added_temp

works well for me!
bye


This does work very well but with foobar 9.5 they are steering away from the masstager component so we should come up with another solution  otherwise we are using an obsolete component
Title: foo_cwb_hooks
Post by: MacStew on 2007-11-16 01:15:21
there is a way to show the albums duration?
Title: foo_cwb_hooks
Post by: Keikonium on 2007-11-16 01:43:37
there is a way to show the albums duration?


Currently no, I don't think so. I have a way to find it out and display it in SCPL, but thats it. No where else unfortunatly. If you want to display it in SCPL, use this:

Code: [Select]
$puts(length.seconds,$mod($meta_sum(length),60))
$puts(length.minutes,$eval({$meta_sum(length) - $get(length.seconds)}/60))
$puts(length.string,$get(length.minutes):$num($get(length.seconds),2))

$get(length.string)


Of course, you will need to tag your files with the correct time in seconds to have it displayed. For that, you can masstag your collection with the following script:

Format Value
Field Name: LENGTH
Pattern: %length_seconds%

That should do it for you. Its not 100% accurate (sometimes off by a few seconds) but it works pretty good for me.
Title: foo_cwb_hooks
Post by: Kiteroa on 2007-12-04 05:46:59
Feature request:

Could you please consider adding mute status (i.e. whether or not the volume has been muted) and the  unmuted volume level as variables to a future version of cwb_hooks?

Foobar shows a -100 volume level when muted but it definitely stores what the volume was because it restores it to that level when it is un-muted.
Title: foo_cwb_hooks
Post by: azazel100 on 2007-12-07 21:25:20
Tagger panel is really a neat idea!

I have some feature suggestions, some of which were mentioned earlier. All of theme are aimed at reducing amount of clicks/actions while tagging.
Once again, great idea and time saver!
Title: foo_cwb_hooks
Post by: Jose Hidalgo on 2007-12-24 04:05:21
Hi cwbowron, thanks for this great component.

I have a request regarding the $cwb_ltrim function. Could you create a $cwb_ltrim_2 function (EDIT - or simply modify the $cwb_ltrim function  ) in order to optionally add the trimmed part of the string (minus the space if it exists) at the end ?

Example :
$cwb_ltrim(%album artist%,The ,Le ,Les ,L'',La ,Las ,Los )
If I apply this to "The Alan Parsons Project" I get "Alan Parsons Project".
If I apply this to "Los Lobos", I get "Lobos"
If I apply this to "L'Affaire Louis Trio", I get "Affaire Louis Trio"

BUT what if I want to display "Alan Parsons Project (The)", "Lobos (Los)" and "Affaire Louis Trio (L')" ?
In the first case, the trimmed part is "The " (space to remove), in the second it's "Los " (here also space to remove) and in the third it's "L'" (here there's NO space to remove)

With my proposed function, I would only need to type this :
$cwb_ltrim_2(%album artist%,The ,Le ,Les ,L'',La ,Las ,Los , (,))

Notice that the last two arguments are the characters around the trimmed part. For instance if I wanted to display "Alan Parsons Project [The], I would only need to type this :
$cwb_ltrim_2(%album artist%,The ,Le ,Les ,L'',La ,Las ,Los , [,])

And if I wanted to display "Alan Parsons Project, The", I would only need to type this :
$cwb_ltrim_2(%album artist%,The ,Le ,Les ,L'',La ,Las ,Los ,', ',)

What do you think ?  Thanks in advance !

Jose

EDIT - I have just realized that you could simply modify the existing $cwb_trim function : if none of the two last arguments are present, then it doesn't add the trimmed part of the string at the end. Otherwise it does add it of course.

PS : another question, I don't know if this is already present in foobar's standard titleformatting or not. How can I get the number of bits per sample ? (16 bits, 24 bits, etc.). Thanks again.
Title: foo_cwb_hooks
Post by: cwbowron on 2008-01-02 20:53:43
New Version:

Release 1.2.6 / 1.0.6 (Tagger)

    * new function: $cwb_rand()
    * tagger window: if you select tag in tagger window with no open panels, tag in a pop up dialog.
Title: foo_cwb_hooks
Post by: Jose Hidalgo on 2008-01-02 22:54:45
Could you please tell me what you think of my above post ? Thank you.
Title: foo_cwb_hooks
Post by: Nemphael on 2008-01-02 23:04:35
New Version:
* new function: $cwb_rand()


Just wondering, but why implement this whilst we have $rand()?
Title: foo_cwb_hooks
Post by: fbuser on 2008-01-02 23:18:39
Just wondering, but why implement this whilst we have $rand()?
Not anymore. Look here (http://www.hydrogenaudio.org/forums/index.php?showtopic=59707)
Title: foo_cwb_hooks
Post by: doublethink on 2008-01-21 22:40:00
Hi cwbowron, thanks for this great component.

I have a request regarding the $cwb_ltrim function. Could you create a $cwb_ltrim_2 function (EDIT - or simply modify the $cwb_ltrim function  ) in order to optionally add the trimmed part of the string (minus the space if it exists) at the end ?

Example :
$cwb_ltrim(%album artist%,The ,Le ,Les ,L'',La ,Las ,Los )
If I apply this to "The Alan Parsons Project" I get "Alan Parsons Project".
If I apply this to "Los Lobos", I get "Lobos"
If I apply this to "L'Affaire Louis Trio", I get "Affaire Louis Trio"

BUT what if I want to display "Alan Parsons Project (The)", "Lobos (Los)" and "Affaire Louis Trio (L')" ?
In the first case, the trimmed part is "The " (space to remove), in the second it's "Los " (here also space to remove) and in the third it's "L'" (here there's NO space to remove)


I just signed up on here to ask this very same question.

When I remove a "The" from an artist, I would like it to appear on the end, after a comma. Same for "A".

Example:

$cwb_ltrim2(%artist%,The ,Le ,Les ,L )

"The Alan Parsons Project" ---->  "Alan Parsons Project, The"
"The Beatles"          -------------->"Beatles, The"
"A Jealousy Issue"          -------->"Jealousy Issue, A"

Unless there is some trick to do this currently that I am unaware of?  Some usage of the $if statement perhaps?
Title: foo_cwb_hooks
Post by: Jose Hidalgo on 2008-01-21 23:06:49
Yes, I too would appreciate if cwboron could log in and answer our request... It's been nearly a month and we still have no answer at all.  cwboron, thanks in advance for taking this into consideration. Should be quite easy to implement, and a great addition to your component.
Title: foo_cwb_hooks
Post by: Melomane on 2008-01-22 00:10:32
$cwb_ltrim(%artist%,The ,A ,La )$if($longer($replace(%artist%,$cwb_ltrim(%artist%,The ,A ,La ),),0),', '$replace(%artist%,$cwb_ltrim(%artist%,The ,A ,La ),))
Title: foo_cwb_hooks
Post by: Jose Hidalgo on 2008-01-22 13:19:13
Thanks for your help Melomane.  That surely works.

However, it would be even better if cwboron could implement this directly in his function. Example :

INPUT : $cwb_ltrim(%album artist%,The ,Le ,Les ,L'',La ,Las ,Los , [,])
OUTPUT : %album artist%(without the trimmed part) [trimmed part](without the space when there is one)

("[" and "]" being replaced by the separators of your choice like I explained in my initial post about this matter)
Title: foo_cwb_hooks
Post by: $char(9836) on 2008-01-24 08:46:38
Hello thanks for a great plugin, but I'm having a really weird problem I just can't understand.
Why doesn't this work: $if($cwb_fileexists(F:\Övrigt\Lyrics\%artist% - %title%.lrc),Lyrics,No Lyrics)
When this work: $if($cwb_fileexists(F:\Övrigt\Lyrics\%title%.lrc),Lyrics,No Lyrics)
Doesn't work when I wrap the filename in a quote either
Title: foo_cwb_hooks
Post by: buktore on 2008-02-04 22:37:54
$cwb_rand() can't limit it range of number. I remembered that the old $rand() can do something like $rand(10) to limit it only 0-10

Is this intended behavior?
Title: foo_cwb_hooks
Post by: dRsrb on 2008-02-05 14:32:36
I use modulo to avoid the problem:

$mod($cwb_rand(),10)

Bye
Title: foo_cwb_hooks
Post by: Jose Hidalgo on 2008-02-05 16:27:26
Does cwboron even read this thread ?  I'm surprised that he hasn't answered anybody (including myself) since Jan 2...
Title: foo_cwb_hooks
Post by: BuM on 2008-02-26 07:14:04
Possible addition maybe? cwb_activelist_codec to show this... MP3 (83.7%); FLAC (16.3%) , Thanks in advance cwbowron if added 
Title: foo_cwb_hooks
Post by: Jose Hidalgo on 2008-02-26 12:56:18
This topic is dead, and it will remain so until cwbowron decides to post again and answer our questions, which he hasn't done since Jan. 2.
Title: foo_cwb_hooks
Post by: cwbowron on 2008-02-26 13:52:54
This topic is dead, and it will remain so until cwbowron decides to post again and answer our questions, which he hasn't done since Jan. 2.


Just because I don't respond to every single feature request (even by people who bump them 10,000 times) doesn't mean I don't read it. 

And even if I wasn't actively reading it doesn't mean the topic is dead.  Other people read the thread too and some even respond and give help, such as the help you were given by Melomane.

So to review:

1 - don't bump your requests - it only irritates me.
2 - this thread is not dead.
Title: foo_cwb_hooks
Post by: Jose Hidalgo on 2008-02-26 14:33:09
Saying 'no' to a request (even a good one) is OK with me, simply because a dev has complete control over his piece of software. That's clear.

However, not caring to give a simple answer to a request ("yes", "no", "Thanks, I'll think about it"), especially when the request has been asked several times (with a 'bumping time' of several weeks though), is different, and for me it looks quite despising. Maybe it was not your intention, but that's how it looks IMHO.

If you have accepted to have a 16-page thread opened on your great component, then I guess you have to accept to keep giving answers (may them be positive or negative, that's not the point here) within reasonable delays.

Now what's a "reasonable" delay ? Big question. I don't know ! But I *honestly think* that two months is not reasonable at all. Besides, I'm sad to see that you obviously have the time to write a 6-line answer to say how irritated you are... but not to answer some simple questions asked by several people.

When other devs have better things to do than keeping a topic alive, they simply tell people about it ("I'm busy at the moment, back in 2-3 months, etc."). Since you haven't said anything about your schedule, it's normal that people keep assuming that you're available to take on new requests and suggestions. And it's normal that you answer them.

I have nothing against you cwbowron, and I don't want this to become some useless fight, but if requests really do irritate you, then know that reading posts like your last one irritates me too. I respect devs and I respect you, but please show a little more respect for people that use your software. Is it too much to ask ? 
Title: foo_cwb_hooks
Post by: buktore on 2008-02-26 14:34:42
cwb_bowron, If you have time. Can you look into this (http://www.hydrogenaudio.org/forums/index.php?showtopic=61143)? What cause the problem?

Thanks.
Title: foo_cwb_hooks
Post by: 4nt1 on 2008-03-07 13:28:22
anyone else noticed that for the last few foobar versions the New File Tagger has done nothing... I have it ticketed and masstagger installed...

it previously worked with 0.9.4 but doesnt work with 0.9.5.1

pls help it used to save me lots of manual processing..
Title: foo_cwb_hooks
Post by: buktore on 2008-03-07 13:52:18
Still work fine here. Foobar 0.9.5.1
Title: foo_cwb_hooks
Post by: 4nt1 on 2008-03-07 14:19:00
damnit.. its not doing anything for me > any ideas how to test it maybe?
Title: foo_cwb_hooks
Post by: buktore on 2008-03-07 14:32:22
I don't think i can come up with something you don't already knew or tried. But I will try

- Check that it is in use in "new file tagger" not in "CWB hooks" option which is different thing.

- Check that the script is still work.

- Try create new script and test.

- Check that masstagger is really install.

- Remove component, clear it's setting, reinstall and try again.

- Check your media library that it setup properly.

Sound stupid.. but I just don't know why it didn't work for you
Title: foo_cwb_hooks
Post by: verymagicfellow on 2008-03-10 14:37:56
i used to be able to use this to rename files too
i used to be able to use the "trim the word THE" from the artist name
i really miss this too
stopped working with the new foobar
so i am in the same boat
Title: foo_cwb_hooks
Post by: 4nt1 on 2008-03-12 17:13:25
my issue with having added and date
I can get my little masstager scripts to work for first time run > but if I use masstager or the new file operations system, hooks seems to re run my new file script which is overwriting previous dates to the current date.

My masstage is setup as follows

1. Time Stamp: ADDED_Temp
2. Format value: Field Name: ADDED_Temp
    Formatting Pattern: $left(%added_temp%,10)
3. Guess value from other fields
    Source Format: %ADDED_Temp%
    Guessing Pattern: $if(%ADDED%,%ADDED%,%ADDED_temp%)
4. Remove Tag: %ADDED_Temp%

so this will add the date correctly to the files the first time around, but then if I rerun the script to simulate then the script will overwrite previous dates every time... anyway able to advise what I am doing wrong...

I basically need it to compare the 2 tags added and added_temp
if they are both in existance then do nothing
if added does not exist then do not do anything - just delete the added_temp tag

appreciate any help
Title: foo_cwb_hooks
Post by: Purple Monkey on 2008-03-12 21:34:11
3 should be
Code: [Select]
3. Format value from other fields
Destination Field: %ADDED%
Pattern: $if(%ADDED%,%ADDED%,%ADDED_temp%)

This way it sets %ADDED% to %ADDED% if it exits otherwise it sets it to %ADDED_temp%,
Title: foo_cwb_hooks
Post by: 4nt1 on 2008-03-13 01:56:05
ok so i tried yoru suggestion but then when new files get added with no current added tag then the script sets the added field to ? rather then the date
Title: foo_cwb_hooks
Post by: buktore on 2008-03-13 03:59:45
http://www.hydrogenaudio.org/forums/index....c=57236&hl= (http://www.hydrogenaudio.org/forums/index.php?showtopic=57236&hl=)
Title: foo_cwb_hooks
Post by: Kiteroa on 2008-03-16 04:19:42
Feature request:


Any chance of adding a variable to give the name of the selected playlist-tree and playlist tree node, sometime?

I'd like to get playlist tree headings showing up in panelsui!
Title: foo_cwb_hooks
Post by: antar3s on 2008-03-26 23:38:54
Possible Bug: After starting foobar %cwb_activelist% is undefined until i play a song.
Can't believe i'm the first to come across this, but I couldn't find a post regarding this problem.
Title: foo_cwb_hooks
Post by: Jose Hidalgo on 2008-03-26 23:50:53
I believe your problem has something to do with this :

Quote
Known Bugs

    * playlist order not available until a song is played

Source : http://www.bazquux.com/wiki/Foobar2000:Hooks (http://www.bazquux.com/wiki/Foobar2000:Hooks)

Title: foo_cwb_hooks
Post by: antar3s on 2008-03-27 00:04:59
I read that too, but I thought playlist order refers to playback order, cause that is also not working. Playlist order probably refers to both problems 
Title: foo_cwb_hooks
Post by: Keikonium on 2008-03-27 00:17:20
Feature Request:

Would it be possible for you to add some variables to grab information from the properties dialog when you have multiple songs selected?

For example:
?
Title: foo_cwb_hooks
Post by: Lucky Luciano on 2008-03-28 19:23:39
Would it be possible to return the free space on a certain partition?
Title: foo_cwb_hooks
Post by: randmdood on 2008-05-03 09:35:02
found a way to get system time in seconds (sort of)
for people using it in scripts etc (if you want to do somehting every so often)
however this has no advantage over using playing time since foobar only calculates it when it's playing a song

(couldn't believe i didn't think of replace before )
Code: [Select]
$replace($replace(%cwb_systemdatetime%,%cwb_systemdate% ,,),:,,)
Title: foo_cwb_hooks
Post by: apoc_metal on 2008-05-08 22:23:16
Website Down? I'm getting a 404 error when I try to access the page: http://wiki.bowron.us/index.php/Foobar2000 (http://wiki.bowron.us/index.php/Foobar2000)
That is, once I turn off firefox's security setting to block "suspected attack sites" (http://www.stopbadware.org/reports/container?source=Firefox&version=3.0b5&reportname=http://wiki.bowron.us/index.php/Foobar2000), which, apparently, includes yours.
Title: foo_cwb_hooks
Post by: cwbowron on 2008-05-09 01:22:44
Website Down? I'm getting a 404 error when I try to access the page: http://wiki.bowron.us/index.php/Foobar2000 (http://wiki.bowron.us/index.php/Foobar2000)
That is, once I turn off firefox's security setting to block "suspected attack sites" (http://www.stopbadware.org/reports/container?source=Firefox&version=3.0b5&reportname=http://wiki.bowron.us/index.php/Foobar2000), which, apparently, includes yours.


I moved my foobar2000 components to a different server.  I forgot to update the first post in this thread.  The correct location is http://www.bazquux.com/wiki/Foobar2000:Hooks (http://www.bazquux.com/wiki/Foobar2000:Hooks).
Title: foo_cwb_hooks
Post by: ExUser on 2008-05-09 01:49:17
Quote
As of May 2008, I will no longer be developing foobar2000 components.

I no longer wish to contribute my time to a closed source, single platform app.

Also, certain actions by the foobar2000 developers have lead to my no longer wishing to contribute.  These include removing features utilized by developers and users because they dislike they way they are  being used and allowing only an elite few access to new API features.


Sorry to see you go. I see some misconceptions in that statement, but I don't think that any amount of typing on my behalf will change those misconceptions one iota.
Title: foo_cwb_hooks
Post by: Chipicui on 2008-05-09 16:27:35
What a sad thing to read!!! 
No offence to anybody here please... but I tend to adhere with you in respect to a bit of a tiny elitist feeling floating somewhere around the house...
And I'm talking just from a user's perspective... I can imagine what someone might feel after having spent thousands of hours contributing to a project just to be left aside...
Thanks a lot cwbowron for all your hard work!!!... without you, our foobar experience would be lots less enjoyable...   
Title: foo_cwb_hooks
Post by: carpman on 2008-05-09 17:36:49
@ Chipicui

Totally agree.

C.
Title: foo_cwb_hooks
Post by: Xezzy on 2008-05-09 18:03:33
C'est la vie 
Title: foo_cwb_hooks
Post by: dRsrb on 2008-05-09 19:20:32
This is a horrible message!

I wish you good luck and I hope that you still will remain.

Thank you very much for a lot of components! Especially for foo_cwb_hooks!!!
Title: foo_cwb_hooks
Post by: DocBeard on 2008-05-09 21:20:34
Well, this is certainly unfortunate news. Thanks for all your hard work; I get a lot of use out of cwb_hooks and Playlist Tree, and hope to for some time to come. (Which I suppose means that, at some point, I'll have to stop updating my foobar installation.)
Title: foo_cwb_hooks
Post by: Kiteroa on 2008-05-10 02:34:21
Sorry to see you go, unfortunately I think you are absolutely right. Many thanks for all your efforts to date, they have allowed me to make foobar do what I need it to.

I think many current users will be wandering off to alternatives over the next few months and open source seems very attractive!

Thanks again.
Title: foo_cwb_hooks
Post by: carpman on 2008-05-10 03:27:52
Yeah, I'd like to thank Peter for 9.4 (best audio player to date IMO) and cwbowron for help making it so.

C.
Title: foo_cwb_hooks
Post by: Chipicui on 2008-05-10 18:37:01
a pity that they can't work together 
Title: foo_cwb_hooks
Post by: servimo on 2008-05-19 17:40:32
Maybe is not the place for asking but how to get info (via formating string) about the size of the file on disc in Kb or Mb?
Title: foo_cwb_hooks
Post by: thuan on 2008-05-19 17:53:56
It's not the place yes, but here you go:
Code: [Select]
$if(%filesize%,
$ifgreater(%filesize%,1048575,
$div(%filesize%,1048576).
$left($num($muldiv($mod(%filesize%,1048576),100,1048576),2),2) MB,
$ifgreater(%filesize%,1023,
$div(%filesize%,1024).$left($num($muldiv($mod(%filesize%,1024),100,1024),2),2) KB,
%_filesize% B)))
Title: foo_cwb_hooks
Post by: desired log in username on 2008-07-08 03:33:58
I refuse to upgrade past 9.5.2 until this gets updated!  Greatest component ever!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

(http://crohotarius.files.wordpress.com/2008/03/you_rock_you_rule.jpg)

Moderation edit: removed needlessly oversized text.
Title: foo_cwb_hooks
Post by: kanak on 2008-07-08 04:01:24
Since the component developer has announced his intentions to stop developing, it looks like you'll be refusing things for a VERY long time.
Title: foo_cwb_hooks
Post by: odyssey on 2008-07-08 08:06:52
I refuse to upgrade past 9.5.2 until this gets updated!
This component can't be updated due to changes in the foobar2000 core.

I have a question that I hope someone can solve for me. I'd like an instance of foobar2000 0.9.5.2 that allows autoplaylists and this component to be able to create an autoplaylist based on directory content. More specifically, I want an autoplaylist containing all my albums that has no cover "front.jpg" present in %directory_name%. Unfortunately I failed trying to create this - Maybe it's not possible at all?

I'm not using this as my primary foobar2000 instance, but it will help me alot converting my lossless albums to lossy for import in itunes that gets me nice covers.

Edit: It doesn't necessarily have to be an autoplaylist - Something with playlist tree or anything else would do fine.
Title: foo_cwb_hooks
Post by: desired log in username on 2008-07-08 13:53:03
Since the component developer has announced his intentions to stop developing, it looks like you'll be refusing things for a VERY long time.


So be it!  It should be part of the core.  I'm sticking with XP for the time being, too. 
Title: foo_cwb_hooks
Post by: chub on 2008-07-11 23:29:34
I have a question that I hope someone can solve for me. I'd like an instance of foobar2000 0.9.5.2 that allows autoplaylists and this component to be able to create an autoplaylist based on directory content. More specifically, I want an autoplaylist containing all my albums that has no cover "front.jpg" present in %directory_name%. Unfortunately I failed trying to create this - Maybe it's not possible at all?


perhaps not a foobar solution, but a solution:

you will need python (http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi) to run this script

Code: [Select]
import os
fd = open("nofront.m3u", "w") #open destination playlist
for dirs in os.listdir("."): #list curent directory
    if not os.path.isfile(dirs + "/front.jpg"): #look for font.jpg
        for files in os.listdir(dirs): #list files in the directory
            if files[-3:] == "mp3" or files[-3:] == "wav":  #look for mp3 and wav
                fd.write(dirs + "/" + files + "\r\n") #write to the playlist
fd.close() #close playlist file
Title: foo_cwb_hooks
Post by: ladiko on 2008-07-12 13:34:30
another possibility would be:
Masstagger -> Forma value from other fields ->
Destination field name: ALBUM_ART
Formatting pattern: $if($fileexists($replace(%path%,%filename_ext%,)\front.jpg),Yes,No)

and then an Autoplaylist:
%album_art% IS "No"

but you have to rerun the masstager for all new files or add it to the new files tagger menu

another question:
is there a replacement for %cwb_systemdate% cause cbw_hooks is outdated?
Title: foo_cwb_hooks
Post by: DocBeard on 2008-07-13 13:54:39
another question:
is there a replacement for %cwb_systemdate% cause cbw_hooks is outdated?


No, and Peter's indicated that there are various technical reasons (which I am not presently awake enough to find a link to) why there won't be.

As of 9.5.3, you can execute search queries (and thus create autoplaylists) based off a relationship between a date field and the current date, though, for example, %last_played% DURING LAST 2 WEEKS. Also, I'm pretty sure that Columns UI also has some ability to make the system date available in the playlist view, at least.
Title: foo_cwb_hooks
Post by: ladiko on 2008-07-13 15:45:09
ahh ok thank you! i didnt know this :-)

thats great and its enough for me to dont need %cwb_systemdate% but what about the new files tagger - is there an replacement for the nft?
Title: foo_cwb_hooks
Post by: DocBeard on 2008-07-13 16:06:27
I don't believe so, no. Quick Tagger (I believe it's on the official components page) does some of what that did, but not everything. However, the New File Tagger *should* still work; you'll get the incompatible component warning for cwb_hooks, of course, but I don't think any of the features of the New File Tagger are affected by that incompatibility. (I don't use it myself though, so I could well be wrong.)
Title: foo_cwb_hooks
Post by: TheChipstar on 2008-08-16 02:46:29
Can I please request a "$cwb_removethe2" that will only remove the "The" and not the "A".
Cheers.
Title: foo_cwb_hooks
Post by: sune on 2008-08-16 02:55:26
as far as I know this component is discontinued, so your request won't do much

use regular titleformat for that:

$stripprefix(x) - Removes A and The prefixes from x.
$stripprefix(x,prefix1,prefix2,...) - Removes the specified prefixes from x.
$swapprefix(x) - Moves A and The prefixes to the end of x.
$swapprefix(x,prefix1,prefix2,...) - Moves the specified prefixes to the end of x
Title: foo_cwb_hooks
Post by: TheChipstar on 2008-08-17 02:04:02
Can I please ask for these to be added? It would be really handy!

Displayed Track
Automatic (%_Automatic%)
Playing item (%_NowPlaying%)
Active playlist item (%_SelectedItem%)
(Like in Columns UI 'Artwork view')

These would be really handy to refer to. Or is there already a way to do this that I'm missing?


Sorry, just read above post...
Title: foo_cwb_hooks
Post by: foo_peter on 2008-10-19 11:46:20
just as it does me too

I thought it was great for text-expressive tools selected as cover with the following command:

Selected Song's:
<p align="right"> $ cwb_hms (% cwb_selection_duration%) </ div>

really a pity and therefore I am stopped on foobar 0.9.5.2