def begin(movieid=None, episodeid=None, dbtype=None, selection=False, args=None): e = experience.ExperiencePlayer().create() seqPath = None if not e.hasFeatures() or selection or movieid or episodeid or dbtype: if dbtype: if not e.addDBFeature(dbtype, args[0][5:]): return showNoFeaturesDialog() elif not e.addSelectedFeature(selection=selection, movieid=movieid, episodeid=episodeid): return showNoFeaturesDialog() elif len(e.features) < 2 and kodiutil.getSetting('ignore.playlist.single', True) and e.selectionAvailable(): if not e.addSelectedFeature(selection=True): return showNoFeaturesDialog() # We shouldn't get here if not kodiutil.getSetting('hide.queue.dialog', False) or (kodiutil.getSetting('hide.queue.dialog.single', False) and len(e.features) > 1): if not args or 'nodialog' not in args: e.features, seqPath = featureComfirmationDialog(e.features) if not e.features: return if seqPath: kodiutil.DEBUG_LOG('Loading selected sequence: {0}'.format(repr(seqPath))) else: seqPath = cvutil.getSequencePath(for_3D=e.has3D) kodiutil.DEBUG_LOG('Loading sequence for {0}: {1}'.format(e.has3D and '3D' or '2D', repr(seqPath))) if xbmc.getCondVisibility('Window.IsVisible(MovieInformation)'): xbmc.executebuiltin('Dialog.Close(MovieInformation)') e.start(seqPath)
def test(self): import experience savePath = os.path.join(kodiutil.PROFILE_PATH, 'temp.cvseq') self._save(savePath, temp=True) e = experience.ExperiencePlayer().create(from_editor=True) e.start(savePath)
def begin(movieid=None, episodeid=None, dbtype=None, selection=False, args=None): e = experience.ExperiencePlayer().create() seqPath = None feature = None if 'intercept' in args and len(args) >= 3: if args[1] == 'movie': feature = e.featureFromId(movieid=args[2]) elif args[1] == 'episode': feature = e.featureFromId(episodeid=args[2]) if feature is not None: if len(e.features) > 0: e.features[0] = feature else: e.features.append(feature) if not e.hasFeatures() or selection or movieid or episodeid or dbtype: if dbtype: if not e.addDBFeature(dbtype, args[0][5:]): return showNoFeaturesDialog() elif not e.addSelectedFeature( selection=selection, movieid=movieid, episodeid=episodeid): return showNoFeaturesDialog() elif len(e.features) < 2 and kodiutil.getSetting( 'ignore.playlist.single', True) and e.selectionAvailable(): if not e.addSelectedFeature(selection=True): return showNoFeaturesDialog() # We shouldn't get here if not kodiutil.getSetting('hide.queue.dialog', False) or ( kodiutil.getSetting('hide.queue.dialog.single', False) and len(e.features) > 1): if not args or 'nodialog' not in args: e.features, seqPath = featureComfirmationDialog(e.features, args) if not e.features: return if seqPath: kodiutil.DEBUG_LOG('Loading selected sequence: {0}'.format( repr(seqPath))) else: if feature is None: feature = e.features[0] seqData = cvutil.getMatchedSequence(feature) seqPath = seqData['path'] kodiutil.DEBUG_LOG('Loading sequence for {0}: {1}'.format( feature.is3D and '3D' or '2D', repr(seqPath))) if xbmc.getCondVisibility('Window.IsVisible(MovieInformation)'): xbmc.executebuiltin('Dialog.Close(MovieInformation)') e.start(seqPath)