Skip to main content

Topic: foo_run 0.3.7 (Read 443175 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • onv
  • [*][*]
foo_run 0.3.7
Reply #450
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.


Thank you very much, it seems, your advice has helped

  • prateek88
  • [*][*][*]
foo_run 0.3.7
Reply #451
Need to run two commands simultaneously i.e. for file operation to copy the files to usb (have assigned ctrl+c shortcut)

and other one is to send the same file/files to a particular playlist say "usb"  for which i have assigned ctrl+alt+c.

Is it possible to bind a particular shorcut key to the above mentioned two keys using foo_run, or if some other way?

  • romor
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #452
Sharing VBS script (download link) that demonstrates authenticated request to last.fm
As example it provides track specific actions like love, unlove, ban, unban (which BTW are available in foo_softplaylist component, already)
Other services that require authentication include, library management (add/remove items), playlist creation and the like

Making foo_run action for shortcut or button is like this example:
Code: [Select]
wscript foo_lastfm_track.vbs "%artist%" "%title%" love

if script is in foobar2000 folder, otherwise full script path should be provided.
Username and password needs to be set in script for it to be usable

Authentication is granted once requested (with proper username and password), and key is written in registry string for further reuse

  • jazzy73
  • [*][*][*]
foo_run 0.3.7
Reply #453
Hi!
I´d like to know if its possible to create a run services string that executes Spotify and could search the artist,song and so on..in the spoti´s search box.
I´m able to execute spoti from runservices but not the search...

Thanks!!

  • motorhorst
  • [*]
foo_run 0.3.7
Reply #454
Hi!
I´d like to know if its possible to create a run services string that executes Spotify and could search the artist,song and so on..in the spoti´s search box.
I´m able to execute spoti from runservices but not the search...


Hi, this path works for me:
spotify:search:$replace(%artist%+%album%, ,+,&,+)

  • jazzy73
  • [*][*][*]
foo_run 0.3.7
Reply #455
Yes ,great!!thanks!
I´ve tried with a single track search with %title% but i don´t know why not always works..

  • jazzy73
  • [*][*][*]
foo_run 0.3.7
Reply #456
I´m using this path:

spotify:search:$replace(%title%, ,+,+)

to get a list of all diferent versions of the song,but i´ve noticed that not always works.you know why?

thanks.

  • Forfit
  • [*][*][*]
foo_run 0.3.7
Reply #457
Do it is possibile to add "ambient variable" support in path ?
f.e.:%$temp%
Ty.

  • yeeeargh
  • [*]
foo_run 0.3.7
Reply #458
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')


man, it would be great if there would be a string-function available which would do the mapping. It would look so much tidier if there was something like:
Code: [Select]
http://www.last.fm/music/$escapeUriString(%artist%)/$escapeUriString(%album%)/$escapeUriString(%title%)

  • marc2003
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #459
if you're using foo_run to make buttons, you could replace it with my web links script for WSH panel mod. http://db.tt/BInQ3Abm

because it's written in javascript, i use encodeURIComponent on the metadata fields.

foo_run 0.3.7
Reply #460
Hi,

I hope this question isn't asked before:
Is it possible to go to the application data path of foobar in a relative way like %appdata% instead of the full c:\users\...\appdata\roaming\foobar2000 ?
I've searched al lot, but I can't find it anywhere, so I think it is not possible, but maybe someone here has a solution?

Thanks

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
foo_run 0.3.7
Reply #461
Do you mean to quickly open that location from Windows Explorer, its Run box, and so on? If so, just create a new environment variable for it.

Also, I can’t see any real relevance to foo_run here, unless I’m missing something,
  • Last Edit: 17 February, 2013, 09:49:12 AM by db1989

  • marc2003
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #462
yes it can be relevant. you could launch an external application pointing to a file that resides in the foobar2000 config folder without having to hardcode the username into the path.

and to answer the question, it's not possible.

you could create buttons with WSH panel mod but that requires a lot more effort. it has helpful variables such as fb.ProfilePath.

  • Tvk
  • [*]
foo_run 0.3.7
Reply #463
My albums and artwork is currently sorted like this (example):

D:\Music\Album Art\Pink Floyd (1979) The Wall.jpg
D:\Music\Albums\Pink Floyd (UK)\(1979) The Wall

I basically want to move the artwork file to the appropriate album folder, and rename it folder.jpg

Is this something i can accomplish with foo_run?


  • yeeeargh
  • [*]
foo_run 0.3.7
Reply #464
My albums and artwork is currently sorted like this (example):

D:\Music\Album Art\Pink Floyd (1979) The Wall.jpg
D:\Music\Albums\Pink Floyd (UK)\(1979) The Wall

I basically want to move the artwork file to the appropriate album folder, and rename it folder.jpg

Is this something i can accomplish with foo_run?


would be quite easy if there wasn't that "(UK)" next to the artist name. do you have that somewhere in you id3-tags?
it would be something along those lines (didn't check it really):
Code: [Select]
cmd /C move "D:\Music\Album Art\%artist% (%year%) %album%.jpg" "D:\Music\Albums\%artist%\(%year%) %album%\folder.jpg"
  • Last Edit: 20 March, 2013, 10:20:35 AM by yeeeargh

  • Tvk
  • [*]
foo_run 0.3.7
Reply #465
Ended up using this, and it worked perfectly:

Code: [Select]
cmd /C move "D:\Music\Album Art\$cut($directory(%path%,2),$sub($len($directory(%path%,2)),5)) $directory(%path%,1).jpg" "D:\Music\Albums\$directory(%path%,2)\$directory(%path%,1)\folder.jpg"

  • Dario
  • [*][*][*]
foo_run 0.3.7
Reply #466
Why am I unable to pipe FFmpeg decoded output to SoX and produce a spectrogram? Here's what I'm using:

Code: [Select]
cmd /c ""D:\Audio Encoders\FFmpeg\bin\ffmpeg.exe" -i "%path%" - | "C:\SoX 14.4.0\sox.exe" -t raw -e signed -b 16 -c 2 -r 44.1k - -n spectrogram -o "%path%.spectrogram.png" -c """


All I get is an empty spectrogram.
  • Last Edit: 29 March, 2013, 09:02:41 AM by Dario

  • mapmike
  • [*]
foo_run 0.3.7
Reply #467
Sharing VBS script (download link) that demonstrates authenticated request to last.fm
As example it provides track specific actions like love, unlove, ban, unban (which BTW are available in foo_softplaylist component, already)


Very cool, thanks for this amazing contribution! I can imagine that the API methods for adding tags on lastfm would be especially useful, adding tags directly from foobar!

I gave your script a try for the "love" and "unlove" actions and it doesn't work for Japanese, Hindi, etc, but it works fine for English tags. I have no knowledge of VBS, but I skimmed the code and changed "URLEncode(artist)" to just "artist" and "URLEncode(track)" to "track", which solved that problem immediately, but I don't know what functionality is lost without using that "URLEncode" function, because I don't understand what it's doing just by casually reading the code.

  • romor
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #468
I don't remember, but I guess I made that urlencode function for artists/tracks with accented characters.

addTags/removeTag example: https://gist.github.com/c6cb670008872780c0b7

As you can check, I added input dialog and made new api signature because unlike previous action (love/ban...) there is additional parameter `tags`. Currently, if script is called properly (i.e. "<script> %artist% %title% addTags"), it asks user for tags through input dialog. You can perhaps add default values based on your track genre tags or similar, or even make it to mass tag.

If you don't know VBS at all, this is nice reference: http://www.w3schools.com/vbscript/vbscript_ref_functions.asp

  • marc2003
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #469
i *think* the problem with the script is that the artist/track fields needs encoding before creating the api_sig.
  • Last Edit: 28 April, 2013, 12:43:04 PM by marc2003

  • romor
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #470
scrap this...
  • Last Edit: 28 April, 2013, 12:57:57 PM by romor

  • mapmike
  • [*]
foo_run 0.3.7
Reply #471
@romor: Wow, thanks again. I'm gonna play around with this. I'm new to VBS, but I'm having fun learning about programming at the moment for the sake of my foobar fetishism. I think the best usage will be to input tags into foobar (normal id3v2 metadata or even custom_db) and then run batches of the lastfm tagger non-interactively. That way the tags are always safe and sound in the local database whether or not they're also sent to lastfm. I could also see making an Autohotkey script that generates an input box for tags and then adds tags to both foobar and lastfm at the same time.

@marc2003: I'm gonna do some more testing of that love/unlove script and start using it for real, but in my initial testing, it worked just fine on every string I tested in various languages with the "URLEncode" function totally excised from the script. That little "special character" stuff should be easy to tweak in any case.

  • marc2003
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #472
i thought it needed doing based on what i read here under section 4. i've not tried it myself which is why i emphasised the *think* in my post.

http://www.last.fm/api/mobileauth

but if it works without then great.
  • Last Edit: 29 April, 2013, 07:25:28 AM by marc2003

  • marc2003
  • [*][*][*][*][*]
foo_run 0.3.7
Reply #473
being a bit thick, it took me awhile to realise why the encode isn't needed. it's because it's a POST request and the setRequestHeader takes care of it. you only need to send the method as part of the URL. the rest you can send as post data. mine is a little different because i'm using javascript.

Code: [Select]
this.api_sig = hex_md5("api_key" + this.api_key + "artist" + ps.artist + "method" + method + "sk" + this.sk + "track" + ps.track + this.secret);
this.data = "api_key=" + this.api_key + "&api_sig=" + this.api_sig + "&format=json&sk=" + this.sk + "&artist=" + ps.artist + "&track=" + ps.track;

this.xmlhttp.open("POST", "https://ws.audioscrobbler.com/2.0/?method=" + method, true);
this.xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=UTF-8");
this.xmlhttp.setRequestHeader("User-Agent", this.user_agent);
this.xmlhttp.send(this.data);


thanks romor for the pointers i got from your script.

one other unrelated thing i noticed from looking at yours is that it appears to try and save the session key to the registry. that doesn't work for me using windows 7 x64 so it does the auth request on every action.

  • Forfit
  • [*][*][*]
foo_run 0.3.7
Reply #474
I use:
http://www.allmusic.com/search/all/$r...artist%+%title%, ,+)
and works with normal file.
But if i use with streaming radio i get radio name and not current file song.
I can copy current file song with "copy name" contextual command.
Do it is possible to use the command with "copy name" parameter for radio streaming?