예제 #1
0
ControlFadeLabel = \
ControlGroup = \
ControlImage = \
ControlLabel = \
ControlList = \
ControlProgress = \
ControlRadioButton = \
ControlSlider = \
ControlSpin = \
ControlTextBox = \
DialogProgress = \
DialogProgressBG = \
Window = \
WindowDialog = \
WindowXML = \
WindowXMLDialog = mock()

Window.getResolution = lambda:5 # NTSC 16:9 (720x480)
Window.getWidth = lambda:720
Window.getHeight = lambda:480

import xbmcplugin

#class DialogProgress:

#	def create(self, heading, line1=None, line2=None, line3=None):
#		"""Create and show a progress dialog."""
#		pass

#	def update(self, percent, line1=None, line2=None, line3=None):
#		"""Update's the progress dialog."""
예제 #2
0
    def size(self):
        """returns the total number of PlayListItems in this playlist."""
        return len(self.data)

    def getposition(self):
        """returns the position of the current song in this playlist."""
        if self.index > len(self.data) - 1:
            self.index = len(self.data) - 1
        return self.index if self.index > 0 else 0


# mock everything else

from xbmcinit import mock

InfoTagMusic = InfoTagVideo = Keyboard = Monitor = RenderCapture = mock()


# xbmc/interfaces/Builtins.cpp
# http://wiki.xbmc.org/index.php?title=List_of_Built_In_Functions


def PlayMedia(media, isdir=False, preview=1, playoffset=0):
    """Play the specified media file (or playlist)"""
    # TODO: implement this properly
    Player().play(media)


def RunScript(script, *args):
    """Run the specified script"""
    cmd = [translatePath(script)]
예제 #3
0
파일: xbmc.py 프로젝트: mfya/jumpy-xbmc
    def getposition(self):
        """returns the position of the current song in this playlist."""
        if self.index > len(self.data) - 1:
            self.index = len(self.data) - 1
        return self.index if self.index > 0 else 0


# mock everything else

from xbmcinit import mock

InfoTagMusic = \
InfoTagVideo = \
Keyboard = \
Monitor = \
RenderCapture = mock()

# xbmc/interfaces/Builtins.cpp
# http://wiki.xbmc.org/index.php?title=List_of_Built_In_Functions


def PlayMedia(media, isdir=False, preview=1, playoffset=0):
    """Play the specified media file (or playlist)"""
    #TODO: implement this properly
    Player().play(media)


def RunScript(script, *args):
    """Run the specified script"""
    cmd = [translatePath(script)]
    cmd.extend(args)
예제 #4
0
파일: xbmc.py 프로젝트: mfya/jumpy-xbmc
	def getposition(self):
		"""returns the position of the current song in this playlist."""
		if self.index > len(self.data) - 1:
			self.index = len(self.data) - 1
		return self.index if self.index > 0 else 0


# mock everything else

from xbmcinit import mock

InfoTagMusic = \
InfoTagVideo = \
Keyboard = \
Monitor = \
RenderCapture = mock()



# xbmc/interfaces/Builtins.cpp
# http://wiki.xbmc.org/index.php?title=List_of_Built_In_Functions

def PlayMedia(media, isdir=False, preview=1, playoffset=0):
	"""Play the specified media file (or playlist)"""
	#TODO: implement this properly
	Player().play(media)

def RunScript(script, *args):
	"""Run the specified script"""
	cmd = [translatePath(script)]
	cmd.extend(args)
예제 #5
0
파일: xbmcgui.py 프로젝트: mfya/jumpy-xbmc
    def choose(self, type, query, list, default=0):
        try:
            _dialogs
        except:
            xbmcinit.read_dialogs()
        dlg = '%s %s %s' % (repr(query), list, _mainid)
        sel = (_dialogs[dlg] if dlg in _dialogs else default)
        print "*** dialog %s ***\n%s <<< %s" % (type, sel, dlg)
        return sel


# mock everything else, mostly

from xbmcinit import mock

DialogProgress = mock()

Window = \
WindowDialog = \
WindowXML = \
WindowXMLDialog = mock()

Window.getResolution = lambda: 5  # NTSC 16:9 (720x480)
Window.getWidth = lambda: 720
Window.getHeight = lambda: 480

Control = \
ControlButton = \
ControlCheckMark = \
ControlFadeLabel = \
ControlGroup = \
예제 #6
0
파일: xbmcgui.py 프로젝트: mfya/jumpy-xbmc
		"""Show a select dialog."""
		return self.choose('select', heading, list)

	def choose(self, type, query, list, default=0):
		try: _dialogs
		except: xbmcinit.read_dialogs()
		dlg = '%s %s %s' % (repr(query), list, _mainid)
		sel = (_dialogs[dlg] if dlg in _dialogs else default)
		print "*** dialog %s ***\n%s <<< %s" % (type, sel, dlg)
		return sel

# mock everything else, mostly

from xbmcinit import mock

DialogProgress = mock()

Window = \
WindowDialog = \
WindowXML = \
WindowXMLDialog = mock()

Window.getResolution = lambda:5 # NTSC 16:9 (720x480)
Window.getWidth = lambda:720
Window.getHeight = lambda:480

Control = \
ControlButton = \
ControlCheckMark = \
ControlFadeLabel = \
ControlGroup = \