Skip to main content
Topic: run external program on a current song? (Read 1195 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

run external program on a current song?

I'd like to run my own program from shortcut-key,  or via context menu.

This way, i can write any "plugin" I want in any language, or via any available command line tool.

Is it possible?
Is there a plugin for executing a command line with the current playing song's filename as parameter?


For a start, I'd like to be able to add a currently playing song to a blacklist text file (for example).
I can write it as a single shell command (e.g.  run.bat: echo "$1" >> d:\blacklist.txt)

Thank you


(p.s. I couldn't use a COM-based plugin, like pyfoobar, because I use foobar as portable app, meaning it's not necessarily registered on the host computer.)

run external program on a current song?

Reply #1
found it.
exists for several years -
http://mp3tag.de/en/fb2k.html
called: "Run Services"


(i'm leaving this message here for future references)

run external program on a current song?

Reply #2
Is there a plugin for executing a command line with the current playing song's filename as parameter?


Yes, there is an option to run external program on track change (as event), which is common to any sane audio player, and it is called foo_uie_biography. For manual program execution yep, foo_run would do it.


(p.s. I couldn't use a COM-based plugin, like pyfoobar, because I use foobar as portable app, meaning it's not necessarily registered on the host computer.)


I can't see the meaning of this app, as comserver can be manipulated from Python without special apps.

run external program on a current song?

Reply #3
(p.s. I couldn't use a COM-based plugin, like pyfoobar, because I use foobar as portable app, meaning it's not necessarily registered on the host computer.)

I can't see the meaning of this app, as comserver can be manipulated from Python without special apps.


just for completeness of the thread:

i wanted to access foobar2000 from python;
but i got an error that  the app wasn't registered or something, around this line of (pyfoobar's) code:
Code: [Select]
   ProgID = "Foobar2000.Application.0.7"
   foobar_COM_object = win32com.client.Dispatch(ProgID)


i couldn't find "foobar2000.application" in my registry (obviously, because it was never properly installed, just extracted),
so, hence, i assume, for pyfoobar to work i need to run regsvr32 on a DLL or something, which i'm not going to do anyways..

 

run external program on a current song?

Reply #4
As I already mentioned, you don't need pyfoobar or any wrapper like it - it just renames comserver function and that's  all that it does.
For accessing comserver (besides comserver itself) you'll need pywin32 extensions modules and that's all.
comserver includes basic examples for automation in Python (and in other high level dialects also).

 
SimplePortal 1.0.0 RC1 © 2008-2020