syncthing-android icon indicating copy to clipboard operation
syncthing-android copied to clipboard

Enhancement request: per-folder sync only when charging/on wifi

Open JohnCardenas opened this issue 9 years ago • 15 comments

badge

As per the title. Please consider implementing the "sync only when charging" and "sync only on wifi" options on a per-folder basis. I have some (small) data I want to sync all the time, and some larger data (pictures, video, etc.) I only want to sync when on wifi.

JohnCardenas avatar Dec 08 '15 07:12 JohnCardenas

+1

licaon-kter avatar Dec 08 '15 08:12 licaon-kter

Syncthing lacks the possibility to pause folders. So the Android wrapper would need a hacky (and possibly unreliable) way to accomplish this. Syncthing can however pause remote devices. If this would be implemented in the sync when charging / on wifi settings, one could run two instances at home / server; one for "mobile friendly" data and one for the rest.

wweich avatar Dec 08 '15 08:12 wweich

Syncthing cannot pause folders but can pause devices? That seems like a design flaw. From one perspective you could pause the connection to the device with a specific folder but that might also pause other folders you do want connected. Short of a redesign in Syncthing itself the least hacky method I presume would be to temporarily "remove" the folder (behind the scenes) and saving those details somewhere temporarily to "re-add" the folder to unpause.

Ideally, if Syncthing were to be redesigned users would have more control over the frequency with which folders could be updated/checked. For example: FolderA check every minute, FolderB check every day, FolderC check only when on wifi and device charging. This is something that has to be planned with Syncthing across desktop/other devices too not just the Android app.

Control over the frequency of update checks would benefit mobile devices two fold: battery-wise due to the app itself using wifi and wakelocks from System also using wifi/network data.

Aq32 avatar Jan 28 '16 17:01 Aq32

@Aq32 It's not a problem with Syncthing's design, it's just that no one has invested the effort to implement this functionality yet. If you want this feature, best start developing, or consider donating towards the relevant issue on Bountysource.

Nutomic avatar Jan 29 '16 16:01 Nutomic

I don't manage to find this issue on Bountysource, even though I am able to find other issues from this GitHub bug tracker on Bountysource. Could someone please give me a pointer what to do? I created a Bountysource account, but seem not to be able create/link this issue over there.

amette avatar Oct 11 '16 19:10 amette

https://www.bountysource.com/issues/28940393-enhancement-request-per-folder-sync-only-when-charging-on-wifi

wweich avatar Oct 11 '16 20:10 wweich

With https://github.com/syncthing/syncthing/issues/215 completed, can the feature be brought into android? This will really help to keep some lightweight folders on sync all the time.

Thanks!

mrbrahman avatar Mar 07 '17 13:03 mrbrahman

I've been using Automagic (alternative for Tasker, Llama, Automate, ...) for a while to enable specific folders only on Wifi.

  1. Get the currect config from https://localhost:8384/rest/system/config
  2. Set the paused state of the folders you want to pause (I use a global variable global_WifiOnlyStFolders to store the list of folder ids):
config = fromJSON(response);
for (f in config["folders"]) {
  if (containsElement(global_WifiOnlyStFolders, f["id"])) {
    f["paused"] = true; // on disconnect, or false on connect
  }
}
newConfig = toJSON(config);
  1. Post the new config back to https://localhost:8384/rest/system/config

wweich avatar May 28 '17 08:05 wweich

Sidenote: So each folder id would need to have a wifiSsidWhitelist stored along in the wrappers prefs.xml to be able to link it with the runconditionmonitor.

Catfriend1 avatar Aug 06 '18 16:08 Catfriend1

You can add this line at the top of the issue description, it will update itself

![badge](https://api.bountysource.com/badge/issue?issue_id=28940393)

and it looks like

badge

PanderMusubi avatar Aug 23 '18 08:08 PanderMusubi

Any chance for https://github.com/Catfriend1/syncthing-android/pull/66 to be merged in this repo?

Otiel avatar Nov 22 '19 14:11 Otiel

Today, I was also looking for existing issues about per-share mobile/wifi sync settings. What is the relation of this repo and the fork of @Catfriend1 ? It looks like the fork offers a few really nice features. Do the two repos follow different paths, or will some of the features eventually find their way into this repo?

sgasse avatar Jan 04 '21 20:01 sgasse

TLDR: It's a fork.

I don't think there's one github issue/forum topic that has all the info on why/how/... the forking happened. It's basically an independent app. We do accept PRs in general, and Catfriend nicely ports some fixes/improvements every now and then. It's not a hostile fork, but neither is it a planned/coordinated fork nor are there any plans at this point concerning coordination.
Everyone involved is talking to each other on https://forum.syncthing.net though, so if you want to know more I suggest you try to research some old topics and if that isn't sufficient, open a topic there (though my personal taste for discussing it is pretty low).
This issue (or any other github issue) is definitely not the place to discuss it.

imsodin avatar Jan 05 '21 10:01 imsodin

+ 1

glow12121 avatar May 13 '21 17:05 glow12121

Please, don't +1, it adds no value to the conversation thread, and sends everyone a useless email.

Use the emoticons provided.

AudriusButkevicius avatar May 13 '21 18:05 AudriusButkevicius

What is the state of this feature request?

hvhaugwitz avatar Aug 05 '23 20:08 hvhaugwitz

The general state of feature request applies, i.e. not planned: https://github.com/syncthing/syncthing-android#status-maintenance-mode---co-maintainers-welcome

imsodin avatar Aug 06 '23 12:08 imsodin