Python Interpreter Development "Python Inside"
#31
any chance we could get a function in xbmc that starts an xbmc picture slideshow (with random as an option, or an alternate function)? i don't think it can be done with the playlists, and it's another function already built into xbmc that would be awesome to be able to trigger with a script.

let me know.
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply
#32
request: let us cast the starting coords for xbmcgui.controlimage as negative numbers.

please! pretty, pretty please add this feature! i'm begging you!

i know it will be very crazy difficult to write. i know you're all shaking your heads and saying, no, no, that's impossible....

but it would be so helpful to me! i have no other argument (and that's not a good one), but i am emphatic, anyway! that's gotta be worth something!

currently we can draw pictures starting off the screen to the right and bottom (that is, positive numbers larger than the screen's width and height), but if you give it any negative numbers for x and y, it just doesn't draw the picture at all (whereas, i want it to draw the pixels that would be on-screen).

that's all. just...begging. that's all.

alexpoet.

(oh, and getfocus, too. and emulating = false in xbmcgui. but all of those are secondary! negative-value off-screen coords first!Wink
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply
#33
darkie,
we seriously need a way in python to interrupt the current media.

specifically a way to play an audio, video, or image file from a python script without losing position in xbmc's currently playing media.

this could either include an automatic pause of xbmc's media (if xbmc can't handle two different media streams at the same time), or you could just overlay the python media and leave it up to the python scripters when to player.pause() and when to leave it running.

this could be useful for timed audio alarms (you're watching "gross pointe blank" and thirty minutes in a buzzer reminds you you're supposed to go to work), for weather warnings (a monitor script could be checking the government weather site and pop up a warning letting you know if a tornado's on the way), or maybe even for something like picture-in-picture.

those would all be uses of the dual simultaneous streams, and if that's not possible i understand (i know it's been requested before). but for at least the first two examples, it would be nice to be able to interrupt whatever is playing without losing your spot.

i can already stop a music playlist to play a buzzer sound, but that buzzer sound replaces the current playlist. and if i relaunch the previous playlist, it starts over from 0.

just some thoughts. let me know what you think.
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply
#34
how hard would it be to make id3 information about a song available to python scripts? i've been wanting to write a particular script for ages, but kept it on the shelf because i knew i didn't have access to that info.

but i just read a thread on xbox scene by a guy wanting to do something that would be a simple script, if he had that same info. so i thought i'd make it a semi-official feature request. could you provide a function in xbmc that'll python can call to get the id3 information for the currently playing media?

would be very cool.

alexpoet
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply
#35
Quote:we seriously need a way in python to interrupt the current media.

specifically a way to play an audio, video, or image file from a python script without losing position in xbmc's currently playing media.

this could either include an automatic pause of xbmc's media (if xbmc can't handle two different media streams at the same time), or you could just overlay the python media and leave it up to the python scripters when to player.pause() and when to leave it running.
not possible
we can have only one song playing or pausing mplayer. the only way to make your audio alarm is to stop the current file, play the alarm, and start playing the file again. only problem is you can't continue from where the movie stopted, you have to watch it all over again Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#36
check current cvs
it has support for id3 tags and imdb.com information (but only if it's available in xbmc's movie database)
and you can recieve events when xbmc starts and stops playing a song + a lot more
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#37
hi there !
i need to get informations about the file i am planning to play inside xbmc. this file is a stream file so the only thing i know is the url. but as you may know, some of the stream files are not working yet with xbmc, or some are soooo long to open. some others are so bad because of low bitrate or for 'little' connections, some streams may hang because too much high bitrate...
so as you can figure, many differents possibility for a stream file.
my question is, will it be possible to get infos about the stream but before playing it ? when starting, the popup show tons of informations, but it is not possible to re-use it ! can you make an output with file informations
(player.infos(url) -> bitrate, codec, mimetype, length, title,... ... ... ...)
thanks in advance.
alexsolex
nb: i am one of the http://xbmc-stream.gueux.be/ team member. you are welcome to visit us if you like streaming (pc or xbox). i am developping a python script that is based on our database of streams ( http://xbmc-stream.gueux.be/test/pcstream/ )
so if you like it, you should do your best to help me !
see ya
Reply
#38
i was wondering if there is a way to use the icon/big icon/detailed list controls in a python script? i have played around with xbmcgui.controllist but it is somewhat limited compared to the programs, music, and videos "list" display in xbmc.

specifically, i am wondering about how to associate an image with a list item and at the same time associate text with the item. as for the text, i'd like to have the name of the item fade (like music file names that scroll when they are too long for the list item) and i'd like to able to set the text for the second column (where the size of the music file is displayed). has this been exposed in python yet? the other piece to the puzzle is being able to associate a control to change between small icon/big icon/detail views in the list.

if this is something that can already be done, please enlighten me. if it hasn't been done, then i will rethink what i am working on because i could see this taking a while to implement and there are probably more high priority items on the list. Smile
Reply
#39
(darkie @ aug. 18 2004,08:23 Wrote:
Quote:we seriously need a way in python to interrupt the current media.

specifically a way to play an audio, video, or image file from a python script without losing position in xbmc's currently playing media.

this could either include an automatic pause of xbmc's media (if xbmc can't handle two different media streams at the same time), or you could just overlay the python media and leave it up to the python scripters when to player.pause() and when to leave it running.
not possible
we can have only one song playing or pausing mplayer. the only way to make your audio alarm is to stop the current file, play the alarm, and start playing the file again. only problem is you can't continue from where the movie stopted, you have to watch it all over again Smile
darkie: if iplayer::gettime() and iplayer:Confusedeektime() were exposed to python, would it be possible for a python script to query the currently playing media for its position and reset the position respectively or am i misunderstanding what those methods do?
Reply
#40
i have some questions on this code that i was playing around with...

Quote:import os
import string
import time
import xbmc
import xbmcgui

def getcwd():
d = string.replace( os.getcwd(), ";", "" )
return d

class player( xbmc.player ):
def ( self ):
xbmc.player.( self )

def onplaybackstarted( self ):
xbmcgui.dialog().ok( "info", "started" )
fh = file( getcwd() + os.sep + "playback.start", 'w' )
for i in range(0,3):
str = "playback started %d\n"%i
xbmc.output( str )
fh.write( str )
time.sleep( 3.0 )
fh.close()

def onplaybackended( self ):
fh = file( getcwd() + os.sep + "playback.end", 'w' )
fh.write( "playback ended\n" )
fh.close()
xbmcgui.dialog().ok( "info", "done" )

p = player()
p.play( "smb://banshee/mythtv/1002_20050209210000_20050209220000.nuv" )
while p.isplaying():
pass
time.sleep( 3.0 )
xbmcgui.dialog().ok( "info", "quitting" )

when this runs, it starts playing the media file and immediately afterwards i get a dialog saying "started". also, the file is created on disk. when i hit stop, it pauses for around 3 seconds then i get a dialog saying "quitting". i was expecting to get a dialog saying "done", then a dialog saying "quitting". now if i fast forward to the end of the video, i get a pause for 3 seconds, then a dialog saying "done", then a dialog saying "quitting". is the onplaybackended() method only meant to be called when the player() finishes playing without user intervention?

i was hoping to use the onplaybackended() method to do some cleanup. instead, i may have to do something like:

Quote:p.play( filepath )
while p.isplaying():
time.sleep(1.0 )
# cleanup code

it might be worth while to have onplaybackended() be passed a boolean parameter where true means playback was ended by user intervention and false means playback ended normally.
Reply
#41
yup, this is the current implementation of onplaybackended. i didn't realise that when i exposed onplaybackended to python.
so currently there is no way for python to check if the player stopped when someone pressed the stop button.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#42
interest in my python slideshow hack has been expressed, but i don't really have time to work on it properly now so i thought i'd just throw a patch together:

http://www.coolpowers.com/lab/data/xbmc.patch
Reply
#43
if there are any xbmc devs reading this could you pretty pretty please implement "set" methods to complement each of the "get" functions in this file:
xbmc/xbmc/xbmc/lib/libpython/xbmcmodule/infotagmusic.cpp
i would do this myself because it doesn't look like it would be very hard, but i have no way of testing, as i don't have the xdk

this will help make my xm radio script so much better.
Reply

Logout Mark Read Team Forum Stats Members Help
Python Interpreter Development "Python Inside"0