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.parentWidget(), 'Disk space warning',
warnmsg.format(VideoService.spaceWarningThreshold))
self.spaceWarningDelivered = True
评论列表
文章目录