Exemple #1
0
        private async Task <bool> SaveFolderNode(CancellationToken cancelToken)
        {
            Debug_n("Updating App node to include/exclude file nodes...", "");


            // unset the flag to enable downloads
            _foldrNode.field_currently_updating.und.Clear();
            _foldrNode.field_currently_updating.und.Add(und.Value(0));

            _foldrNode = await _client.Put(_foldrNode, cancelToken);

            if (_foldrNode.IsValidNode())
            {
                return(Debug_n("Successfully updated App node.", ""));
            }
            else
            {
                return(Warn_n("Something went wrong in updating App node.", ""));
            }
        }
Exemple #2
0
        private async Task <bool> LoadFolderNodeIfNull()
        {
            if (_foldrNode != null)
            {
                return(true);
            }

            _foldrNode = await _client.Node <SyncableFolderDto>(_foldrNid, _cancelToken);

            // set the flag to disable downloads
            _foldrNode.field_currently_updating.und.Clear();
            _foldrNode.field_currently_updating.und.Add(und.Value(1));

            _foldrNode = await _client.Put(_foldrNode, _cancelToken);

            if (_foldrNode.IsValidNode())
            {
                return(Debug_n("Flag set to temporarily disable downloads.", ""));
            }
            else
            {
                return(Warn_n("Something went wrong in updating App node.", ""));
            }
        }