IDownloadManager
- class mobase.IDownloadManager
Bases:
object
Methods Summary
downloadPath
(id)Retrieve the (absolute) path of the specified download.
onDownloadComplete
(callback)Installs a handler to be called when a download completes.
onDownloadFailed
(callback)Installs a handler to be called when a download fails.
onDownloadPaused
(callback)Installs a handler to be called when a download is paused.
onDownloadRemoved
(callback)Installs a handler to be called when a download is removed.
startDownloadNexusFile
(mod_id, file_id)Download a file from www.nexusmods.com/<game>.
startDownloadURLs
(urls)Download a file by url.
Methods Documentation
- downloadPath(id)
Retrieve the (absolute) path of the specified download.
- Return type:
str
- Parameters:
id – ID of the download.
- Returns:
The absolute path to the file corresponding to the given download. This file
may not exist yet if the download is incomplete.
- onDownloadComplete(callback)
Installs a handler to be called when a download completes.
- Return type:
bool
- Parameters:
callback – The function to be called when a download complete. The parameter is the download ID.
- Returns:
True if the handler was installed properly (there are currently no reasons for this to fail).
- onDownloadFailed(callback)
Installs a handler to be called when a download fails.
- Return type:
bool
- Parameters:
callback – The function to be called when a download fails. The parameter is the download ID.
- Returns:
True if the handler was installed properly (there are currently no reasons for this to fail).
- onDownloadPaused(callback)
Installs a handler to be called when a download is paused.
- Return type:
bool
- Parameters:
callback – The function to be called when a download is paused. The parameter is the download ID.
- Returns:
True if the handler was installed properly (there are currently no reasons for this to fail).
- onDownloadRemoved(callback)
Installs a handler to be called when a download is removed.
- Return type:
bool
- Parameters:
callback – The function to be called when a download is removed. The parameter is the download ID.
- Returns:
True if the handler was installed properly (there are currently no reasons for this to fail).
- startDownloadNexusFile(mod_id, file_id)
Download a file from www.nexusmods.com/<game>. <game> is always the game currently being managed.
- Return type:
int
- Parameters:
mod_id – ID of the mod to download the file from.
file_id – ID of the file to download.
- Returns:
An ID identifying the download.
- startDownloadURLs(urls)
Download a file by url.
The list can contain alternative URLs to allow the download manager to switch in case of download problems
- Return type:
int
- Parameters:
urls – List of urls to download from.
- Returns:
An ID identifying the download.