本文整理匯總了Python中Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper.makeUnikalFileName方法的典型用法代碼示例。如果您正苦於以下問題:Python DMHelper.makeUnikalFileName方法的具體用法?Python DMHelper.makeUnikalFileName怎麽用?Python DMHelper.makeUnikalFileName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper
的用法示例。
在下文中一共展示了DMHelper.makeUnikalFileName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: runCMD
# 需要導入模塊: from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh import DMHelper [as 別名]
# 或者: from Plugins.Extensions.IPTVPlayer.iptvdm.iptvdh.DMHelper import makeUnikalFileName [as 別名]
def runCMD(self, item):
printDBG("runCMD for downloadIdx[%d]" % item.downloadIdx)
if DMHelper.DOWNLOAD_TYPE.INITIAL == item.tries:
item.fileName = DMHelper.makeUnikalFileName(item.fileName, False, False)
printDBG("Downloading started downloadIdx[%s] File[%s] URL[%s]" % (item.downloadIdx, item.fileName, item.url) )
listUDIdx = self.findIdxInQueueUD(item.downloadIdx)
self.queueUD[listUDIdx].status = DMHelper.STS.DOWNLOADING
self.queueUD[listUDIdx].fileName = item.fileName
url, downloaderParams = DMHelper.getDownloaderParamFromUrl(item.url)
self.queueUD[listUDIdx].downloader = DownloaderCreator(url)
self.queueUD[listUDIdx].callback = boundFunction(self.cmdFinished, item.downloadIdx)
self.queueUD[listUDIdx].downloader.subscribeFor_Finish( self.queueUD[listUDIdx].callback )
self.queueUD[listUDIdx].downloader.start(url, item.fileName, downloaderParams)