I'm terrible at python and need your help with two questions
#42
I have it working...

Here's your modified script.

PHP Code:
# Import the XBMC/XBMCGUI modules.
import xbmcxbmcguitimeurllibxbmcvfsxbmcaddonossysurlparse
__addon__   
xbmcaddon.Addon()
__addonid__ __addon__.getAddonInfo('id')

params urlparse.parse_qs('&'.join(sys.argv[1:]))
title params['title'][0]
url params['url'][0]


path xbmc.translatePath('special://profile/addon_data/%s' __addonid__)
if 
not xbmcvfs.exists(path):
    
xbmcvfs.mkdir(path)
imagefile os.path.join(path'bell.jpg')


class 
CamView(xbmcgui.WindowDialog):

   
def __init__(selfurltitle):
        
#set the initial image before the window is shown
        
urllib.urlretrieve(urlimagefile)
        
self.image xbmcgui.ControlImage(870383380253"")
        
self.addControl(self.image)

viewer CamView(urltitle)
viewer.show()
start_time time.time()
firstimage True
while(time.time() - start_time <= 14):
    
urllib.urlretrieve(urlimagefile)
    
viewer.image.setImage("")
    
viewer.image.setImage(imagefile)
    
curr_time round(time.time() - start_time0)
    if 
firstimage:
        
nowtime=time.strftime("%I:%M %p")
        
xoptions="Notification(%(x)s, %(y)s, 13800, special://masterprofile/media/bell1.png)" % {"x" title"y" : (nowtime)}
        
xbmc.executebuiltin(xoptions)
        
viewer.image.setAnimations([('conditional''effect=fade start=0 end=90 time=250 delay=125 condition=true',), ('conditional''effect=slide start=0,400 end=0,0 time=250 condition=true',)])
        
firstimage False
    elif curr_time 
== 14:
        
viewer.image.setAnimations([('conditional''effect=fade start=90 end=90 time=0 condition=true',), ('conditional''effect=slide start=0,0 end=0,400 time=250 condition=true',)])
        print 
"catch"
    
else:
        
viewer.image.setAnimations([('conditional''effect=fade start=90 end=90 time=0 condition=true',)])
        print 
curr_time
    xbmc
.sleep(500)


viewer.close()
del viewer 
Reply


Messages In This Thread
RE: I'm terrible at python and need your help with two questions - by beardedgeek - 2013-04-02, 21:09
Logout Mark Read Team Forum Stats Members Help
I'm terrible at python and need your help with two questions0