Changeset 14675


Ignore:
Timestamp:
Jan 25, 2016, 10:09:49 PM (6 years ago)
Author:
mikedld
Message:

Add hidden "watch-dir-force-generic" setting handling to daemon

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/daemon.c

    r14674 r14675  
    7070static tr_session * mySession = NULL;
    7171static tr_quark key_pidfile = 0;
     72static tr_quark key_watch_dir_force_generic = 0;
    7273static struct event_base *ev_base = NULL;
    7374
     
    563564    {
    564565        const char * dir;
     566        bool force_generic;
     567
     568        if (!tr_variantDictFindBool (settings, key_watch_dir_force_generic, &force_generic))
     569          force_generic = false;
    565570
    566571        if (tr_variantDictFindStr (settings, TR_KEY_watch_dir, &dir, NULL) && dir != NULL && *dir != '\0')
    567572        {
    568573            tr_logAddInfo ("Watching \"%s\" for new .torrent files", dir);
    569             if ((watchdir = tr_watchdir_new (dir, &onFileAdded, mySession, ev_base, false)) == NULL)
     574            if ((watchdir = tr_watchdir_new (dir, &onFileAdded, mySession, ev_base, force_generic)) == NULL)
    570575                goto cleanup;
    571576        }
     
    668673    const char ** const configDir = &arg.configDir;
    669674
    670     key_pidfile = tr_quark_new ("pidfile",  7);
     675    key_pidfile = tr_quark_new ("pidfile", 7);
     676    key_watch_dir_force_generic = tr_quark_new ("watch-dir-force-generic", 23);
    671677
    672678    /* load settings from defaults + config file */
  • trunk/libtransmission/watchdir-test.c

    r14674 r14675  
    9898}
    9999
    100 tr_watchdir_t
     100static tr_watchdir_t
    101101create_watchdir (const char        * path,
    102102                 tr_watchdir_cb      callback,
Note: See TracChangeset for help on using the changeset viewer.