Пример #1
0
# make a COM object
iTunes = win32com.client.gencache.EnsureDispatch('iTunes.Application')

# find My Documents
objShell = win32com.client.Dispatch('WScript.Shell')
myDocs = objShell.SpecialFolders('MyDocuments') + '\\'
print('My Documents is located at: %s' % myDocs)

# default downloadFolder is My Documents\Aethyr
downloadFolder = myDocs + 'Aethyr\\'

# config file holding location of download folder
configFileLocation = myDocs + 'aethyr.ini'

storedLocation = Download.loadStoredDownloadFolder(configFileLocation)

if (storedLocation is not None):
	downloadFolder = storedLocation

if (not Helper.isFolderIntegrityOK(downloadFolder)):
	downloadFolder = Download.resetDefaultDownloadFolder(myDocs, configFileLocation)

totalSize = 0
totalTime = 0

# dictionary for caching libraries
alreadyLoaded = {}

# seperating elements of an array
DELIMITER = '&&&'