Esempio n. 1
0
def startDownload():
    if downloadPath == '':
        return control.infoDialog(
            'You need to set your download folder in addon settings first',
            'File Not Downloadable')

    control.execute('RunPlugin(%s?action=startDownloadThread)' % sys.argv[0])
Esempio n. 2
0
def setView(content, viewDict=None):
    for i in range(0, 200):
        if control.condVisibility('Container.Content(%s)' % content):
            try:
                skin = control.skin
                record = (skin, content)
                dbcon = database.connect(control.viewsFile)
                dbcur = dbcon.cursor()
                dbcur.execute(
                    "SELECT * FROM views WHERE skin = '%s' AND view_type = '%s'"
                    % (record[0], record[1]))
                view = dbcur.fetchone()
                view = view[2]
                if view == None: raise Exception()
                return control.execute('Container.SetViewMode(%s)' % str(view))
            except:
                try:
                    return control.execute('Container.SetViewMode(%s)' %
                                           str(viewDict[skin]))
                except:
                    return

        control.sleep(100)
Esempio n. 3
0
def endCategory():
    #control.do_block_check(False)
    if control.skin == 'skin.confluence':
        control.execute('Container.SetViewMode(500)')
    control.directory(int(sys.argv[1]), cacheToDisc=True)
Esempio n. 4
0
 def onPlayBackStarted(self):
     control.execute('Dialog.Close(all,true)')
     if not self.offset == '0': self.seekTime(float(self.offset))
     subtitles().get(self.name, self.imdb, self.season, self.episode)
     self.idleForPlayback()