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_run (Read 596582 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_run 0.3.7

Reply #425
I have a puzzling situation: I'm listening to an internet radio station, and I can see the artist and title information in the status bar area and in the main window area, and artist bio in the biography component.  These areas all reference %artist%, and the status bar and main window also reference %title% in my configuration.  So the radio station is passing on artist and track title information that Foobar2000 successfully understands.  So far so good.

But when I right-click on the playing track and select "run services" and select "google artist". which also references %artist% in its command string (http://www.google.com/search?q=$replace(%artist%, ,+)&ie=utf-8), the google search looks for "?".  This tells me that the google search is not reading the %artist% information that is simultaneously being read by the main window and status bar areas.  This google search string for this service works perfectly when I'm playing something in my local library.

Interestingly, when I look at the track's properties, the artist area is blank and the track title the name of the internet radio station - both incorrect and different than what the status pane and main window show - and even though these properties are also referencing %artist% and %title% in my configuration.  At this point, I'm puzzled as how the status and main window area can show what they show, which appears accurate from listening to the actual music playing.

Any ideas of what I need to change to get the google search to sucessfully read the %artist% information or whatever the radio station is providing that the status pane and main window areas can somehow read?  thanks

foo_run 0.3.7

Reply #426
Hi!

@ Godrick : same prob here   



All run services like 'Google artist', 'AllMusic artist' or 'MusicBrainz artist'
search instead for the streamed artist only for a '?'

All works fine with non-streamed music coming directly from my hd


foo_run 0.3.7

Reply #427
@ Florian : very cool plugin, thanks a lot

I'm not able to make the following services run for www.heavyharmonies.com

-->  'HeavyHarmonies artist'
-->  'HeavyHarmonies album'

Any help for working paths is greatly appreciated.

foo_run 0.3.7

Reply #428
Would it be possible to refine a search for this site? Ya know a command to search for %artist% without having to type it in there. Help appreciated thanks.

foo_run 0.3.7

Reply #429
@ Florian : very cool plugin, thanks a lot

I'm not able to make the following services run for www.heavyharmonies.com

-->  'HeavyHarmonies artist'
-->  'HeavyHarmonies album'

Any help for working paths is greatly appreciated.


You can do as I did: just name your service Search Heavy Harmonies and use the search page (in this case the main page):
Code: [Select]
http://www.heavyharmonies.com


or:
1. Search for the band's first letter:
Code: [Select]
http://www.heavyharmonies.com/cgi-bin/gletter.cgi?Letter=$cut(%artist%,1)


2. Use Google:
Code: [Select]
http://www.google.com/search?q=$replace(%artist%, ,+)&sitesearch=heavyharmonies.com


Code: [Select]
http://www.google.com/search?q=$replace(%album%, ,+)&sitesearch=heavyharmonies.com

foo_run 0.3.7

Reply #430
I'd like to find out if there is a Foobar2000 command or variable that contains the files that one selects in a library or playlist view.  I've looked in the title formatting and search query areas and I did not find anything that seemed appropriate.

The context of the need:  a few of us would like to select a bunch of files and then launch Mp3tag with those files loaded into Mp3tag, using foo_run.  But the approach of using the "simulataneous runs" feature of foo_run is incompatible with Mp3tag.  Instead, it looks like we need to pass a playlist to Mp3tag containing the selected files.  I'm hoping there is some kind of variable within Foobar2000 that people use when using command lines that will work that I can insert into the Mp3tag command line, or there is something I could use via simple script that invokes Mp3tag and then call the script from foo_run.  We're looking to select files in a playlist viewer and then launch the Mp3tag service with a single click, instead of selecting files, then manually saving a temp playlist and then launching the Mp3tag service.

Moderator: Since I'm seeking advice on something that doesn't seem unique to foo_run (how to reference selected files in command lines or scripts), I though this was best posted in the general forum, but if you think this is unique enough to foo_run please move this to the third party component forum for foo_run.

The thread that relates to this in Mp3tag forms:  http://forums.mp3tag.de/index.php?showtopic=15010 

Thanks in advance for any help or suggestions.

foo_run 0.3.7

Reply #431
I'm trying to extract zip and rar archives with 7-zip from foobar with foo_run.
But I can't get it running. Can anbody help me?


foo_run 0.3.7

Reply #432
Hello Pone
I hope I have understood correctly then try the following times:

WinRAR a Info.rar  "$directory_path(%path%)"

foo_run 0.3.7

Reply #433
Hello Pone
I hope I have understood correctly then try the following times:

WinRAR a Info.rar  "$directory_path(%path%)"

I want to extract/unzip the archives. I guess you command does the add files to a archive?

I experimented a little bit and searched through the internet. This works of zip Files:
"C:\Program Files\7-Zip\7za.exe" x "$substr(%_path%,1,$sub($strrchr(%_path%,'|'),1))" "-o$directory_path($substr(%_path%,1,$sub($strrchr(%_path%,'|'),1)))"

But it seems that 7za, the command line version of 7Zip, is not abel to unpack rar files due to licence problems, whereas the Windows version ca do that. Bad luck. Maybe I will look for another tool.

I found a good tutorial for 7zip command lines here:
http://www.ojaehrling.de/Eisfair-Pakete/7zip/



EDIT:
I got it. I was thinkin I have to use 7za.exe for command lines. That was wrong. If I use 7z.exe it works also with rar files:
"C:\Program Files\7-Zip\7z.exe" x "$substr(%_path%,1,$sub($strrchr(%_path%,'|'),1))" "-o$directory_path($substr(%_path%,1,$sub($strrchr(%_path%,'|'),1)))"

foo_run 0.3.7

Reply #434
Great script, very useful. Would it be possible to get the archive to delete itself after successful extraction?

foo_run 0.3.7

Reply #435
Thank a lot Florian for the component.

I suggest those who are troubled with &, + etc. in their tags to use this filter for "bad" chars in URLs
Code: [Select]
$replace(WHATEVER, ,'%20','&','%26',/,'%2F',?,'%3F',+,'%2B',=,'%3D','%','%25',#,'%23')
instead of
Code: [Select]
$replace(WHATEVER, ,+)


Perfect for last.fm (track page script):
Code: [Select]
http://www.last.fm/music/$replace(%artist%, ,'%20','&','%26',/,'%2F',?,'%3F',+,'%2B',=,'%3D','%','%25',#,'%23')/$replace(%album%, ,'%20','&','%26',/,'%2F',?,'%3F',+,'%2B',=,'%3D','%','%25',#,'%23')/$replace(%title%, ,'%20','&','%26',/,'%2F',?,'%3F',+,'%2B',=,'%3D','%','%25',#,'%23')

foo_run 0.3.7

Reply #436
UPD. I explored that the formula is not perfect for last.fm. It fails when the slash and the space meet. Rather replace / with %252F:
Code: [Select]
http://www.last.fm/music/$replace(%artist%, ,'%20','&','%26',/,'%252F',?,'%3F',+,'%2B',=,'%3D','%','%25',#,'%23')/$replace(%album%, ,'%20','&','%26',/,'%252F',?,'%3F',+,'%2B',=,'%3D','%','%25',#,'%23')/$replace(%title%, ,'%20','&','%26',/,'%252F',?,'%3F',+,'%2B',=,'%3D','%','%25',#,'%23')

foo_run 0.3.7

Reply #437
Hello!
How do I configure this plugin in foobar2000 to be able to click on links / or run a browser, if the tags (URL of the publisher, URL, and so the performer) mp3 file has a reference type htpp: \ \ www.test.com?

foo_run 0.3.7

Reply #438
Hi guys,

This is my first post here. I'm a longtime FB user but lately I've been re-configuring the whole thing, discovered this great plugin yesterday and I would appreciate some help. Here's what I need...

I want to select an item (album) in the Album Art panel, then run a service which will open Irfanview and browse its artwork. All of the artwork images (various names) are stored inside the cover folder, which is inside the music folder. For example:

Folder C:\Music\Faith No More - Introduce Yourself (1987) contains FLACs and subfolder named cover (C:\Music\Faith No More - Introduce Yourself (1987)\cover) with files front.jpg, back.jpg, blahblah.jpg etc.
I want to select the file/folder in Album Art panel and then run a service which will make IrfanView display the first .jpg within the cover subfolder so I can browse the rest.

I've run "C:\Program Files '('x86')'\IrfanView\i_view32.exe" "$replace(%path%,%filename_ext%,) and it successfully opens IrfanView and displays any artwork which is stored inside the same folder as the FLACs, now I just need to point it to the subfolder cover instead. This must be simple. 

Many thanx!

foo_run 0.3.7

Reply #439
OK, got it...
"C:\Program Files '('x86')'\IrfanView\i_view32.exe" "$replace(%path%,%filename_ext%,)\cover\
I was sure I've tried that one already without success, but now it seem to work...

Anyway, another problem. I can run this service from Album Art Panel (right click item>Run Service), but the shortcut (toolbar button) I've made doesn't work. When I select Now Playing Item as Item Group it works, but I cannot make a button work with Album Art Panel selection. This is very important to me since I use RAM Disk plugin for playback and I need to see the artwork associated with Album Art Panel selection (FLACs on the HDD), not with the Now Playing Item (since no artwork is loaded in RAM). Any ideas?

foo_run 0.3.7

Reply #440
I've been trying to plot a spectrogram (of a FLAC/WAV file) using SoX in conjunction with foo_run, but to no avail. I have this in the foo_run menu:

"C:\SoX 14.4.0\sox.exe" "%path% -n spectrogram -d 3:00"

and it doesn't work. Does anybody know how to properly set it up?

foo_run 0.3.7

Reply #441
i don't use SOX but surely that last double quote should come after %path%?

foo_run 0.3.7

Reply #442
i don't use SOX but surely that last double quote should come after %path%?

Okay, that was a bit stupid of me. Thank you.

However, since most of my audio is encoded in TAK, and SoX does not natively support TAK input, I tried piping the decoder along with SoX, but for some reason, it doesn't work:

"D:\Audio Encoders\TAK 2.2.0\Takc.exe" -d "%path%" - |"C:\SoX 14.4.0\sox.exe" -t wav - -n spectrogram -o "C:\spectrogram.png"

However, if I were to replace %path% with a definite path, and run it in the command prompt, such as:

"D:\Audio Encoders\TAK 2.2.0\Takc.exe" -d "F:\Albums\Drudkh\[2006] ???? ? ????? ????????\4. ??????????.tak" -|"C:\SoX 14.4.0\sox.exe" -t wav - -n spectrogram -o "F:\Albums\Drudkh\[2006] ???? ? ????? ????????\4. ??????????.tak.spectrogram.png"

it'd work perfectly. Why am I unable to utilize pipes along with foo_run?

foo_run 0.3.7

Reply #443
if you add

Code: [Select]
cmd /k


to the beginning of the command, it will leave the window open and you might see an error?

foo_run 0.3.7

Reply #444
"|" is a special character for command prompt (cmd.exe). You must add "cmd /c" to the beginning of your command.

foo_run 0.3.7

Reply #445
if you add

Code: [Select]
cmd /k


to the beginning of the command, it will leave the window open and you might see an error?

This is what I get:

'D:\Audio' is not recognized as an external command… is what I get. No idea why it doesn't account for the full path ("D:\Audio Encoders\TAK 2.2.0\Takc.exe").

"|" is a special character for command prompt (cmd.exe). You must add "cmd /c" to the beginning of your command.


Excuse my ignorance (I'm still learning)—I tried the following:

cmd /c "D:\Audio Encoders\TAK 2.2.0\Takc.exe" -d "%path%" - |"C:\SoX 14.4.0\sox.exe" -t wav - -n spectrogram -o "%path%.spectrogram.png"

but to no avail.

Thank you for your assistance.

foo_run 0.3.7

Reply #446
Try:
cmd /c ""D:\Audio Encoders\TAK 2.2.0\Takc.exe" -d "%path%" - |"C:\SoX 14.4.0\sox.exe" -t wav - -n spectrogram -o "%path%.spectrogram.png""

Maybe this will help 

foo_run 0.3.7

Reply #447
Oh, yes it will! Thank you very much!

foo_run 0.3.7

Reply #448
Foo_run runs external programs only when playing foobar. If playback is stopped - not work. Of course, in the config no lines like this: $if(%isplaying% or %ispause% ..... CONTEXT:Run service/...
Why? Foobar 1.1.13, foo_run 0.3.7

foo_run 0.3.7

Reply #449
CONTEXT:Run service/


it looks like you're using panel stack splitter. try looking at the settings>script tab>titleformat mode on startup and change it to follow cursor.