Add setting to copy .torrent files for finished downloads (closes issue #22)

Patch edited by Christophe Dumez.
This commit is contained in:
Driim
2012-08-21 11:16:49 +04:00
committed by Christophe Dumez
parent dac0d67717
commit 23ea811095
7 changed files with 159 additions and 47 deletions

25
src/preferences/preferences.h Normal file → Executable file
View File

@@ -276,18 +276,33 @@ public:
}
bool isTorrentExportEnabled() const {
return !value(QString::fromUtf8("Preferences/Downloads/TorrentExport"), QString()).toString().isEmpty();
return !value(QString::fromUtf8("Preferences/Downloads/TorrentExportDir"), QString()).toString().isEmpty();
}
QString getExportDir() const {
return value(QString::fromUtf8("Preferences/Downloads/TorrentExport"), QString()).toString();
QString getTorrentExportDir() const {
return value(QString::fromUtf8("Preferences/Downloads/TorrentExportDir"), QString()).toString();
}
void setExportDir(QString path) {
void setTorrentExportDir(QString path) {
path = path.trimmed();
if (path.isEmpty())
path = QString();
setValue(QString::fromUtf8("Preferences/Downloads/TorrentExport"), path);
setValue(QString::fromUtf8("Preferences/Downloads/TorrentExportDir"), path);
}
bool isFinishedTorrentExportEnabled() const {
return !value(QString::fromUtf8("Preferences/Downloads/FinishedTorrentExportDir"), QString()).toString().isEmpty();
}
QString getFinishedTorrentExportDir() const {
return value(QString::fromUtf8("Preferences/Downloads/FinishedTorrentExportDir"), QString()).toString();
}
void setFinishedTorrentExportDir(QString path) {
path = path.trimmed();
if (path.isEmpty())
path = QString();
setValue(QString::fromUtf8("Preferences/Downloads/FinishedTorrentExportDir"), path);
}
bool isMailNotificationEnabled() const {