本文整理汇总了Python中Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper.getFileSize方法的典型用法代码示例。如果您正苦于以下问题:Python DMHelper.getFileSize方法的具体用法?Python DMHelper.getFileSize怎么用?Python DMHelper.getFileSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper
的用法示例。
在下文中一共展示了DMHelper.getFileSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _cmdFinished
# 需要导入模块: from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh import DMHelper [as 别名]
# 或者: from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper import getFileSize [as 别名]
def _cmdFinished(self, code, terminated=False):
printDBG("MergeDownloader._cmdFinished code[%r] terminated[%r]" % (code, terminated))
# break circular references
if None != self.console:
self.console_appClosed_conn = None
self.console_stderrAvail_conn = None
self.console = None
if terminated:
self.status = DMHelper.STS.INTERRUPTED
self._cleanUp()
return
if self.status == DMHelper.STS.POSTPROCESSING:
self.localFileSize = DMHelper.getFileSize(self.filePath)
printDBG("POSTPROCESSING_cmdFinished localFileSize[%r] code[%r]" % (self.localFileSize, code))
if self.localFileSize > 0 and code == 0:
self.remoteFileSize = self.localFileSize
self.status = DMHelper.STS.DOWNLOADED
else:
self.status = DMHelper.STS.INTERRUPTED
elif code == 0:
if (self.currIdx + 1) < len(self.multi['urls']):
self.currIdx += 1
self.doStartDownload()
return
else:
self.status = DMHelper.STS.POSTPROCESSING
self.doStartPostProcess()
return
if not terminated:
self.onFinish()
self._cleanUp()
示例2: _localFileSize
# 需要导入模块: from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh import DMHelper [as 别名]
# 或者: from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper import getFileSize [as 别名]
def _localFileSize(self, update=True):
printDBG(">>>>>>>>>>>>>>>>>>>>> _localFileSize [%r] loacalSize[%r] = %r" % (self.localFileSize, self.currIdx, self.multi['local_size']))
if self.localFileSize > 0:
return self.localFileSize
else:
if update:
self.multi['local_size'][self.currIdx] = DMHelper.getFileSize(self.multi['files'][self.currIdx])
localFileSize = 0
for item in self.multi['local_size']:
if item > 0:
localFileSize += item
return localFileSize
return 0
示例3: updateStatistic
# 需要导入模块: from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh import DMHelper [as 别名]
# 或者: from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper import getFileSize [as 别名]
def updateStatistic(self):
self.localFileSize = DMHelper.getFileSize(self.filePath)
self._updateStatistic()