def addVideo(self, videoPaths): filteredVideoPaths = self.checkList(videoPaths) for videopath in filteredVideoPaths: video, created = VideosModel.create_or_get(url=videopath, output_url=videopath, current_session=True, status=VID_READY) if video != False: video.update(current_session=True, status=VID_READY)
def addVideo(self, videoPaths): filteredVideoPaths = self.checkList(videoPaths) for videopath in filteredVideoPaths: video, created = VideosModel.create_or_get( url=videopath, output_url=videopath, current_session=True, status=VID_READY) if video != False: video.update(current_session=True, status=VID_READY)
def __init__(self, parent=None): QtGui.QMainWindow.__init__(self, parent) self.ui = Ui_MainWindow() self.ui.setupUi(self) self._x264_location = os.path.join("tools", "x264", "x264.exe") self._x264_64_location = os.path.join("tools", "x264", "x264_64.exe") self._mp4box_location = os.path.join("tools", "mp4box", "mp4box.exe") self._mkvmerge_location = os.path.join("tools", "mkvmerge", "mkvmerge.exe") self._mkvextract_location = os.path.join("tools", "mkvmerge", "mkvextract.exe") self._avisynth_location = '' self.isWindowFullScreen = False # Class parameters self.profile_str = "* Temp Profile *" # connect database! globvar.db.connect() # setup tables ConfigModel.create_table(True) VideosModel.create_table(True) ProgModel.create_table(True) ProgModel.create_or_get( times_opened = '0', x264_location = self._x264_location, x264_64_location = self._x264_64_location, mp4box_location = self._mp4box_location, mkvmerge_location = self._mkvmerge_location, mkvextract_location = self._mkvextract_location) # set up controllers self._videosController = VideosController() self._configController = ConfigController() self._configController.createInitial() self._configController.createTempProfile() self.setupInitialConfigView()
def deleteCurrent(self): vid = VideosModel.select().where(VideosModel.current_session == True) vid.delete_instance()
def getCurrent(self): return VideosModel.select().where(VideosModel.current_session == True)
def deleteFromList(self, list): q = VideosModel.delete().where(VideosModel.url << list) q.execute()