getTotalTime help

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
psike Offline
Fan
Posts: 356
Joined: Aug 2008
Reputation: 0
Post: #1
Once again I'm trying to learn python scripting for XBMC (I really don't get it for some reason).
My script for now just open a dialog and show the video title.
I'm trying to also show the current video time.

This is what i have:
Code:
import xbmc, xbmcgui

#get actioncodes from keymap.xml
ACTION_PREVIOUS_MENU = 10

class MyClass(xbmcgui.WindowDialog):
  def __init__(self):

            self.strActionInfo = xbmcgui.ControlTextBox(10, 250, 800, 1080, 'font13', '0xFFFFFFFF')
            self.addControl(self.strActionInfo)
            self.strActionInfo.setText("You are now wathing: " + title)

mydisplay = MyClass()
mydisplay .doModal()
del mydisplay


I've tried adding something like:
Code:
time  = xbmc.Player().getTotalTime()
but it's not working.

what am i missing?

[Image: widget]
[Image: widget]
find quote
Eldorado Offline
Posting Freak
Posts: 922
Joined: May 2009
Reputation: 11
Post: #2
See the Icefilms and 1Channel addons for ideas on doing this, both have a class wrapped around the xmbc.player and are grabbing it's properties that way
find quote