Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add startDownloadNexusFileForGame #164

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/idownloadmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ class QDLLEXPORT IDownloadManager : public QObject
*/
virtual int startDownloadNexusFile(int modID, int fileID) = 0;

/**
* @brief download a file from www.nexusmods.com/<gameName>.
* @param gameName 'short' name of the game the mod is for
* @param modID id of the mod for which to download a file
* @param fileID id of the file to download
* @return an id by which the download will be identified
*/
virtual int startDownloadNexusFileForGame(const QString& gameName, int modID,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the game ID instead of the game name, I think those are less likely to be changed in the future (if I remember correctly, Nexus has changed the game short names a few times in the past which was kind of annoying for MO2).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internally, the function uses the game name anyway (QString("nxm://%1/mods/%2/files/%3").arg(gameName).arg(modID).arg(fileID))), so there's no way around that unfortunately. I think Nexus is now more careful with these kind of changes though, at least in ModOrganizer2/modorganizer#2138 we were notified in advance.

int fileID) = 0;

/**
* @brief get the (absolute) file path of the specified download.
* @param id id of the download as returned by the download... functions
Expand Down
Loading