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
warning if no files are shared #1698
Comments
If this gets implemented as a "popup notification" then it must be off by default (or only appear in the case of a scanning error), because messages from Leech Detectors is already bad enough for nagging, we don't want to add to that situation. Perhaps a popup would be okay in the event of "Errno 2", however using OS notifications for error messages is a very bad idea if something happens that cause the whole screen to get filled up with them (say for example, if there are many offline folders).
It would be useful if the last two entries were the other way around, or combined into one line, so that the count would stick on the Statusbar after a manual rescan, but startup scanning happens way too fast if there are 0 folders so it's wiped out by other startup messages. |
It is a valid idea, however the user is likely to wonder why it looks like they are disconnected when they are not. I think we should stick to improving the log system and what text is displayed and remains visible on the Statusbar, these are areas where improvements are less prone to introducing strange application behaviour. |
Having a clear message in the status bar sounds like a good plan indeed. |
* shares.py: Display finished count after rescan Removed: "Finished rescanning shares" message, because the "folders found" count is more useful to end with on the Status bar after a manual scan, helps with #1698 * shares.py: Remove full stop. * shares.py: "Rescan progress: " / "Rescan complete: "
Startup performance is hindered by 'Scan on startup'. When launching from terminal, the initial stage of the scan process begins on the console before the GUI window is rendered. This creates a noticeable delay with the feature enabled vs disabled. It makes me wonder if there should be an arbitrary few seconds delay to begin the scan process, this would both speed-up application launch and also ensure the "Rescan complete: nn" message is always last in sequence so it has a higher chance of sticking on the Statusbar. Pending transfers should not be allowed to begin if there is a scan pending or in progress, because the file stats might not be accurate. |
Having a slowly pulsing "0 files shared" with a red background in the status bar(at the bottom right) sounds like a warning I'd like to receive. So the background would cycle between the normal bg and dark red in various shades, let's say 6 shades. Like in this code:
|
That sounds pretty :) perhaps the progress bar widget could be made to do something similar with some style property. In the case of 0 folders perhaps it could stay visible (the widget is under-used imo), and the "Scanning Shares" label be updated with the folder count, or the number of errors. As a sidenote I have found that Scan at startup is done before login, which means stats don't get sent to the server at this point. Edit: I've drafted a couple of changes which make the progress bar stick if there is a serious scanning error or there are 0 folders... |
It would probably make sense to only allow a rescan if all the main shared folders are accessible, to prevent this issue from happening in the first place. The best way to tell the user when this happens still needs to be explored, but the easiest route would be a message dialog that lists the folders that are inaccessible. |
It's problematic in cases where the drive being unplugged wasn't intentional, or you forgot about it. The shares database is rewritten before you realize that the drive isn't mounted, requiring a rescan from scratch for all files in that folder. One option could also be to add a "force rescan" button in the dialog, in case the user still wants to rescan their shares. |
Good point, that could be long. Of course there is only one database for all the shares. Are you saying to first check to verify the presence of each shared virtual folder path on disk, and then prompt with a dialog detailing the status of missing folders? This does sound like a good idea. If so, the proposed "Force Rescan" button might be ambiguous for a "Retry" or "Refresh" function that simply performs an initial presence check again. |
Now that you mention it, perhaps create a DB per share? So in case a share is not online it doesn't get lost, it's just not available, just like the FS. |
That would be the most ideal solution in the long run, but unfortunately that is far beyond the scope of this issue. |
Exactly. This should only require a os.access() call per virtual folder path, so it should be quite fast.
This is something I've had in mind, but it requires a lot of work and rethinking how we do certain things. |
This actually does make sense, but there still might be use cases for continuing with offline shares in certain scenarios. A function for Refresh/Retry is going to be needed as well as Force Rescan, to enable the user to mount their drive on the fly.
In PR #2210 the missing folders are logged and also could be available for populating the content of a message box. Such a message dialog will be unavoidably obstructive, but it is a necessary step that will help us develop a better non-blocking solution. |
Sometimes, for whatever reason, I don't share files at startup. A share may be inaccessible, or the database may have become corrupted. And I don't notice until I download something from someone who has a leech plugin. I'd rather get a warning from nicotine+
Therefore I'd like to request showing a warning at start-up, if no files are shared.
The text was updated successfully, but these errors were encountered: