audio output via mms from inside a python script

Discussion about user contributed plugins

Moderator: Moderator

User avatar
frosch
Posts: 70
Joined: Mon Feb 25, 2008 2:06 pm
Location: Germany

audio output via mms from inside a python script

Postby frosch » Fri Feb 29, 2008 2:13 pm

Hi there,

yesterday, I played around with the last.fm proxy
from http://vidar.gimp.org/?page_id=50
or use

Code: Select all

apt-get install lastfmpoxy

put your username and pw in the config - then
it's very easy to play last.fm with a

Code: Select all

internet_radio  =  LAST.FM,  http://localhost:1881/...

in audio config
if the proxy is running in background...

but this is only half the fun because there is no cover,
not the right running time (shows the overall time and not the
title time) and I would like to have a green, a yellow and a
red button for "love", "skip" and "ban"...

yes Uatschitchun, I know : ...feel free to code a plugin :wink:

but I'm a Java Guy and not a C++ freak so I'm thinking about
a python script (as a matter of fact, the last.fm-proxy is in python too...)

so my question is
- can I (and how) using the standard mms way
to play the audio from inside the python script...

- can I start background tasks (the last.fm proxy)
from inside the python script

and (for other purposes) can I control mms with a python script
(starting actions wich are usally triggerd via menu) ???

thanks in advance,


frosch

Fredde
veteran
Posts: 288
Joined: Tue Dec 06, 2005 7:18 am
Location: Sweden

Re: audio output via mms from inside a python script

Postby Fredde » Sun Mar 02, 2008 9:39 pm

- can I (and how) using the standard mms way
to play the audio from inside the python script...

You can use the python plugin AudioPlayer class.

Code: Select all

mmsv2.AudioPlayer().play(path/url, name)
The AudioPlayer class uses the mms audio player engine, but doesn't add anything to the mms playlist.

- can I start background tasks (the last.fm proxy)
from inside the python script
Yes

and (for other purposes) can I control mms with a python script
(starting actions wich are usally triggerd via menu) ???
No, pls explain some more :D

User avatar
frosch
Posts: 70
Joined: Mon Feb 25, 2008 2:06 pm
Location: Germany

Re: audio output via mms from inside a python script

Postby frosch » Thu Mar 06, 2008 8:56 pm

Fredde wrote:
and (for other purposes) can I control mms with a python script
(starting actions wich are usally triggerd via menu) ???
No, pls explain some more :D


I was thinking about doing this idea:
http://forum.mymediasystem.org/viewtopic.php?t=1147
with a phyton script but I need to control some things for it:
i.e. adjusting volume, starting a radio station or playing an audio file
from inside the script...

but this is nearly covered by your other answers,
i will have a deeper look at the python classes...



frosch


Return to “user plugins”

Who is online

Users browsing this forum: No registered users and 2 guests