Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloads tab is empty even when items are out of sync and currently downloading #293

Open
Xarishark opened this issue Nov 9, 2024 · 10 comments
Labels

Comments

@Xarishark
Copy link

Windows 11

Using the inbuilt syncthing instance

the downloads tab is always empty even if there are files currently being downloaded/synced to this PC.

@Xarishark Xarishark added the bug label Nov 9, 2024
@Martchus
Copy link
Owner

Martchus commented Nov 9, 2024

I've just tested this with the mocked config and it works - so at least the UI code looks still good. I'll try to reproduce this with a real Syncthing instance when I have time.

What version of Syncthing and Syncthing Tray are you using? Is this a regression as of a certain version of Syncthing Tray?

This is using download progress events (see https://docs.syncthing.net/events/downloadprogress.html). I noticed that these events are not emitted for every single file and especially when downloading (a lot of) small files the download progress is not well observable due to this. There's nothing I can do from the side of Syncthing Tray but the current behavior probably also makes sense because updating the UI for every single file would be quite some overhead. If you're downloading big files this shouldn't be hte case, though.

@Martchus
Copy link
Owner

Martchus commented Nov 11, 2024

I've just tested this with a real Syncthing instance tracing the events being emitted outside of Syncthing Tray via curl.

The unfiltered event stream (curl -X GET -H "Authorization: Bearer …" 'http://localhost:8080/rest/events') returned many events (e.g. ItemFinished events) as expected but no DownloadProgress events. The filtered event stream (curl -X POST -H "Authorization: Bearer …" 'http://localhost:8080/rest/events?events=DownloadProgress') returned non of those events, too.

So I can reproduce the issue but must say that it is probably simply due to Syncthing itself not emitting such events. Here I had no big files to sync are and would generally expect that each individual file can be processed in a few seconds at most.

I guess I could try this again with bigger files. You can also test this on your setup by running the mentioned curl commands (with your port and API key) alongside Syncthing when you'd expect download progress to be made.

Considering the limited usefulness it might be a good idea to hide the downloads tab by default and add an explanation with the caveats in the settings UI where one could still enable it.

Martchus added a commit that referenced this issue Nov 11, 2024
Fix computing changes in polling flags by using
`CPP_UTILITIES_FLAG_ENUM_CLASS_NO_LEGACY_AND` which unfortunately requires
many code changes where a boolean is actually needed.

Related ticket: #293
@Martchus
Copy link
Owner

Martchus commented Nov 11, 2024

I nevertheless had a look at Syncthing Tray's code/behavior and this was actually nevertheless broken also in Syncthing Tray itself. It broke when I did many connection-related changes in August (see https://forum.syncthing.net/t/yet-another-syncthing-tray/8502/215).

@Xarishark
Copy link
Author

Sorry for not answering faster as I was swamped with work.
I am using the packed version of syncthing as I dont have a separate instance installed.

image

I have sync about 1TB in the past month and I never saw the download tab working to be honest.

Is there away to convert the tab to a TRANSFER tab.
So it can show the downloading files but also the files that are being send or if transparent to your front-end at least show the devices that are currently pulling files from the local instance. I know I can see that on the devices tab but it would be much more useful to have both ways in one tab as a easy to access overall view without the need to open the web-UI. thanks in advance for your time

ZX

@Martchus
Copy link
Owner

Martchus commented Nov 14, 2024

As I said, the downloads tab was broken to a regression in Syncthing Tray until I fixed it 3 days ago. So it is no surprise that you never saw any downloads within that last month.

Out of my head I'd say no, that's not possible because Syncthing doesn't provide an API for transfers like that. Maybe I'm misunderstood what you're asking, though. So maybe you can restate what Syncthing Tray is supposed to show in terms of a Syncthing API route providing this information.

@Xarishark
Copy link
Author

What I am describing is a TRANSFER tab( same as other tabs) that shows on top the clients lets say that are pulling data and under that in a separate line the files that are downloading (current function of download app) if no client is pulling data then the top of the list will be empty. so priority of info is clients that we upload data to -> seperation line after the last client -> current data that the download tab would show.

if you wanted to see all devices in general you could still see them in the devices tab that also shows the current status (syncing etc)

@Martchus
Copy link
Owner

Ok, then I think Syncthing has no API for this. I can double-check that when I have the time, though.

Note that this would be a bit of an effort to implement in any case and I'm already busy with other things right now so don't expect me to work on it anytime soon.

@Xarishark
Copy link
Author

No expectations AT ALL! Just a suggestion. your app already does amazing stuff. If I have the knowledge I would try to help to.

@Martchus
Copy link
Owner

Note that there's an event for remote downloads: https://docs.syncthing.net/events/remotedownloadprogress.html

I don't think it necessarily means that the other device is downloading from us, though.

@Xarishark
Copy link
Author

If it indicates which device is downloading then the tab in my example can be split 3 ways. 1)downloading files to this device 2)uploading from this devices 3)(optional)transfer from device x to x(non local transfer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants