Esempio n. 1
0
 def checkDiskSpace(self, path: str):
     # noinspection PyCallByClass
     if self.spaceWarningDelivered or not QFileInfo.exists(path):
         return
     info = QStorageInfo(path)
     available = info.bytesAvailable() / 1000 / 1000
     if available < VideoService.spaceWarningThreshold:
         warnmsg = 'There is less than {0}MB of disk space available at the target folder selected to save ' + \
                   'your media. VidCutter WILL FAIL to produce your media if you run out of space during ' + \
                   'operations.'
         QMessageBox.warning(self.parent, 'Disk space is low!', warnmsg.format(VideoService.spaceWarningThreshold))
         self.spaceWarningDelivered = True
Esempio n. 2
0
 def checkDiskSpace(self, path: str) -> None:
     # noinspection PyCallByClass
     if self.spaceWarningDelivered or not QFileInfo.exists(path):
         return
     info = QStorageInfo(path)
     available = info.bytesAvailable() / 1000 / 1000
     if available < VideoService.spaceWarningThreshold:
         warnmsg = 'There is less than {}MB of free disk space in the '.format(VideoService.spaceWarningThreshold)
         warnmsg += 'folder selected to save your media. '
         warnmsg += 'VidCutter will fail if space runs out before processing completes.'
         spacewarn = VCMessageBox('Warning', 'Disk space alert', warnmsg, self.parentWidget())
         spacewarn.addButton(VCMessageBox.Ok)
         spacewarn.exec_()
         self.spaceWarningDelivered = True