summaryrefslogtreecommitdiff
path: root/src/trg-prefs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/trg-prefs.c')
-rw-r--r--src/trg-prefs.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/trg-prefs.c b/src/trg-prefs.c
index 7f57eed..319d91e 100644
--- a/src/trg-prefs.c
+++ b/src/trg-prefs.c
@@ -24,6 +24,7 @@
#include <glib/gprintf.h>
#include "util.h"
+#include "torrent.h"
#include "trg-client.h"
#include "trg-prefs.h"
@@ -383,3 +384,16 @@ void trg_prefs_load(TrgPrefs *p) {
priv->profile = json_array_get_object_element(profiles, profile_id);
}
}
+
+guint trg_prefs_get_add_flags(TrgPrefs *p)
+{
+ guint flags = 0x00;
+
+ if (trg_prefs_get_bool(p, TRG_PREFS_KEY_START_PAUSED, TRG_PREFS_GLOBAL))
+ flags |= TORRENT_ADD_FLAG_PAUSED;
+
+ if (trg_prefs_get_bool(p, TRG_PREFS_KEY_DELETE_LOCAL_TORRENT, TRG_PREFS_GLOBAL))
+ flags |= TORRENT_ADD_FLAG_DELETE;
+
+ return flags;
+}