Ejemplo n.º 1
0
    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)
Ejemplo n.º 2
0
    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)
Ejemplo n.º 3
0
    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()
Ejemplo n.º 4
0
 def deleteCurrent(self):
     vid = VideosModel.select().where(VideosModel.current_session == True)
     vid.delete_instance()
Ejemplo n.º 5
0
 def getCurrent(self):
     return VideosModel.select().where(VideosModel.current_session == True)
Ejemplo n.º 6
0
 def deleteFromList(self, list):
     q = VideosModel.delete().where(VideosModel.url << list)
     q.execute()
Ejemplo n.º 7
0
 def deleteCurrent(self):
     vid = VideosModel.select().where(VideosModel.current_session == True)
     vid.delete_instance()
Ejemplo n.º 8
0
 def getCurrent(self):
     return VideosModel.select().where(VideosModel.current_session == True)
Ejemplo n.º 9
0
 def deleteFromList(self, list):
     q = VideosModel.delete().where(VideosModel.url << list)
     q.execute()