foo_run 0.3.7, run external applications from foobar2000 |
![]() ![]() |
foo_run 0.3.7, run external applications from foobar2000 |
Jun 25 2012, 19:34
Post
#451
|
|
|
Group: Members Posts: 48 Joined: 23-March 12 Member No.: 98013 |
|
|
|
|
Aug 8 2012, 20:30
Post
#452
|
|
|
Group: Members Posts: 101 Joined: 21-January 12 Member No.: 96605 |
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? |
|
|
|
Aug 9 2012, 07:15
Post
#453
|
|
![]() Group: Members Posts: 607 Joined: 16-January 09 Member No.: 65630 |
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 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 -------------------- Scripts (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Oct 17 2012, 18:36
Post
#454
|
|
![]() Group: Members Posts: 123 Joined: 12-December 08 Member No.: 64396 |
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!! -------------------- our music on http://www.myspace.com/jesusmartinezquartet
|
|
|
|
Oct 18 2012, 08:32
Post
#455
|
|
|
Group: Members Posts: 12 Joined: 22-February 12 Member No.: 97334 |
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%, ,+,&,+) |
|
|
|
Oct 18 2012, 14:59
Post
#456
|
|
![]() Group: Members Posts: 123 Joined: 12-December 08 Member No.: 64396 |
Yes ,great!!thanks!
I´ve tried with a single track search with %title% but i don´t know why not always works.. -------------------- our music on http://www.myspace.com/jesusmartinezquartet
|
|
|
|
Oct 21 2012, 13:13
Post
#457
|
|
![]() Group: Members Posts: 123 Joined: 12-December 08 Member No.: 64396 |
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. -------------------- our music on http://www.myspace.com/jesusmartinezquartet
|
|
|
|
Nov 29 2012, 18:16
Post
#458
|
|
|
Group: Members Posts: 144 Joined: 11-April 09 Member No.: 68870 |
Do it is possibile to add "ambient variable" support in path ?
f.e.:%$temp% Ty. |
|
|
|
Jan 30 2013, 16:21
Post
#459
|
|
|
Group: Members Posts: 12 Joined: 25-June 11 Member No.: 91829 |
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 $replace(WHATEVER, ,'%20','&','%26',/,'%2F',?,'%3F',+,'%2B',=,'%3D','%','%25',#,'%23') instead of CODE $replace(WHATEVER, ,+) Perfect for last.fm (track page script): CODE 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 http://www.last.fm/music/$escapeUriString(%artist%)/$escapeUriString(%album%)/$escapeUriString(%title%)
|
|
|
|
Jan 31 2013, 11:40
Post
#460
|
|
![]() Group: Members Posts: 3287 Joined: 27-January 05 From: England Member No.: 19379 |
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. |
|
|
|
Feb 17 2013, 11:22
Post
#461
|
|
|
Group: Members Posts: 3 Joined: 19-January 13 Member No.: 106011 |
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 |
|
|
|
Feb 17 2013, 15:48
Post
#462
|
|
|
Group: Super Moderator Posts: 4345 Joined: 23-June 06 Member No.: 32180 |
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, This post has been edited by db1989: Feb 17 2013, 15:49 |
|
|
|
Feb 18 2013, 11:40
Post
#463
|
|
![]() Group: Members Posts: 3287 Joined: 27-January 05 From: England Member No.: 19379 |
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. |
|
|
|
Mar 17 2013, 01:29
Post
#464
|
|
|
Group: Members Posts: 36 Joined: 23-April 05 Member No.: 21649 |
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? |
|
|
|
Mar 20 2013, 15:07
Post
#465
|
|
|
Group: Members Posts: 12 Joined: 25-June 11 Member No.: 91829 |
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 cmd /C move "D:\Music\Album Art\%artist% (%year%) %album%.jpg" "D:\Music\Albums\%artist%\(%year%) %album%\folder.jpg"
This post has been edited by yeeeargh: Mar 20 2013, 15:20 |
|
|
|
Mar 24 2013, 23:47
Post
#466
|
|
|
Group: Members Posts: 36 Joined: 23-April 05 Member No.: 21649 |
Ended up using this, and it worked perfectly:
CODE 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"
|
|
|
|
Mar 29 2013, 13:56
Post
#467
|
|
|
Group: Members Posts: 141 Joined: 20-September 11 Member No.: 93842 |
Why am I unable to pipe FFmpeg decoded output to SoX and produce a spectrogram? Here's what I'm using:
CODE 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. This post has been edited by Dario: Mar 29 2013, 14:02 |
|
|
|
Apr 28 2013, 07:25
Post
#468
|
|
|
Group: Members Posts: 37 Joined: 10-August 07 From: Hawai'i Member No.: 46098 |
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. |
|
|
|
Apr 28 2013, 17:38
Post
#469
|
|
![]() Group: Members Posts: 607 Joined: 16-January 09 Member No.: 65630 |
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 -------------------- Scripts (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Apr 28 2013, 17:42
Post
#470
|
|
![]() Group: Members Posts: 3287 Joined: 27-January 05 From: England Member No.: 19379 |
i *think* the problem with the script is that the artist/track fields needs encoding before creating the api_sig.
This post has been edited by marc2003: Apr 28 2013, 17:43 |
|
|
|
Apr 28 2013, 17:55
Post
#471
|
|
![]() Group: Members Posts: 607 Joined: 16-January 09 Member No.: 65630 |
scrap this...
This post has been edited by romor: Apr 28 2013, 17:57 -------------------- Scripts (mainly foobar2000 related): http://goo.gl/yje3h
|
|
|
|
Apr 29 2013, 04:39
Post
#472
|
|
|
Group: Members Posts: 37 Joined: 10-August 07 From: Hawai'i Member No.: 46098 |
@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. |
|
|
|
Apr 29 2013, 12:24
Post
#473
|
|
![]() Group: Members Posts: 3287 Joined: 27-January 05 From: England Member No.: 19379 |
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. This post has been edited by marc2003: Apr 29 2013, 12:25 |
|
|
|
Apr 30 2013, 11:12
Post
#474
|
|
![]() Group: Members Posts: 3287 Joined: 27-January 05 From: England Member No.: 19379 |
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 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. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd May 2013 - 15:19 |