Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: foo_cwb_hooks (Read 303638 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_cwb_hooks

Reply #225
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.

foo_cwb_hooks

Reply #226
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.

foo_cwb_hooks

Reply #227
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.

foo_cwb_hooks

Reply #228
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.

foo_cwb_hooks

Reply #229
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.


foo_cwb_hooks

Reply #231
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!

foo_cwb_hooks

Reply #232
i have the same problem above, so if someone else could upload it again...

foo_cwb_hooks

Reply #233
There was a glitch on my web hosting.  Everything should be back to normal.
There used to be a link to my website here.



foo_cwb_hooks

Reply #236
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.

 

foo_cwb_hooks

Reply #238
Wow, tnx for the quick reply!

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

Tnx again...

foo_cwb_hooks

Reply #239
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?

foo_cwb_hooks

Reply #240
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

foo_cwb_hooks

Reply #241
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

foo_cwb_hooks

Reply #242
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]
Windows 10 Pro x64 // foobar2000 1.3.10

foo_cwb_hooks

Reply #243
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?

foo_cwb_hooks

Reply #244
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.
Windows 10 Pro x64 // foobar2000 1.3.10

foo_cwb_hooks

Reply #245
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

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

My wiki is down for the moment.
There used to be a link to my website here.

foo_cwb_hooks

Reply #246
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

foo_cwb_hooks

Reply #247
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...
There used to be a link to my website here.

foo_cwb_hooks

Reply #248
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

foo_cwb_hooks

Reply #249
Thanks, cwb, for the continous development!