当前位置: 首页>>代码示例>>Python>>正文


Python DMHelper.getFileSize方法代码示例

本文整理汇总了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()
开发者ID:c0ns0le,项目名称:iptvplayer-for-e2-fork,代码行数:36,代码来源:mergedownloader.py

示例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
开发者ID:c0ns0le,项目名称:iptvplayer-for-e2-fork,代码行数:15,代码来源:mergedownloader.py

示例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()
开发者ID:samsamsam-iptvplayer,项目名称:iptvplayer-for-e2,代码行数:5,代码来源:basedownloader.py


注:本文中的Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper.getFileSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。