diff options
author | 2011-08-27 22:24:12 +0000 | |
---|---|---|
committer | 2011-08-27 22:24:12 +0000 | |
commit | ed3cec7420b188b85a1585479215f519a301fc37 (patch) | |
tree | 2e9cc02b7361e5f70e88f7f7809d7ff37dab0735 /src/trg-prefs.c | |
parent | 7020a3a7db7ce7e192e7b84e0f359b85584fe1a4 (diff) |
issue 58
Diffstat (limited to 'src/trg-prefs.c')
-rw-r--r-- | src/trg-prefs.c | 14 |
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; +} |