kapitainsky / RcloneBrowser

Simple cross platform GUI for rclone. Supports macOS, GNU/Linux, BSD family and Windows.
https://github.com/kapitainsky/RcloneBrowser
MIT License
2.34k stars 220 forks source link

Multiselect to run multiple tasks #80

Open FoxP opened 4 years ago

FoxP commented 4 years ago

Hello, thank you very much for RcloneBrowser! :+1:

It is possible to add a way to multi-select jobs from "Task" tab then click to the "Run" button to run them one by one, from top to bottom ?

A "for each" in selected tasks. :smiley:

Thanks in advance! Best regards

kapitainsky commented 4 years ago

Nope. There is no multi select implemented.

As you probably noticed there is bare minimum done to make sure tasks can be used. They can be me massively improved - I agree - but step by step:)

On 21 Feb 2020, at 19:17, FoxP notifications@github.com wrote:

Hello, thank you very much for RcloneBrowser! πŸ‘

It is possible to add a way to multi-select jobs from "Task" tab then click to the "Run" button to run them one by one, from top to bottom ?

Thanks in advance! Best regards

β€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kapitainsky/RcloneBrowser/issues/80?email_source=notifications&email_token=ADXJHOXBMUBZ2XJE35R5DLLREASDNA5CNFSM4KZI4K3KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IPMKNEQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXJHOSRBAQ2GYXTMYBTQJ3REASDNANCNFSM4KZI4K3A.

FoxP commented 4 years ago

No problem, it was an enhancement request. :) I also did a C# GUI for rclone some months ago, but yours is far better.

image

kapitainsky commented 4 years ago

Maybe you would like to look at Rclone Browser code and improve it? Pretty much all is missing there... it would be great if tasks can be sorted, rearranged by drug and drop (this is actually one line of code - but I failed to make changes persistent). Multi run etc..

kapitainsky commented 4 years ago

I am at the moment working on better look and feel + better handling remotes when somebody has many...

Here are my test branch screenshots what is coming:

Screenshot 2020-02-21 at 20 16 41 Screenshot 2020-02-21 at 20 17 04
kapitainsky commented 4 years ago

Also it would be nice to add some sort of scheduler to tasks. You are more than welcome to help with Rclone Browser. More people get involved than better it will become

FoxP commented 4 years ago

I'm not very good at C++, my main languages are C# / Python. Nice look and feel, the testing branch looks interesting!

kapitainsky commented 4 years ago

I have implemented multiple tasks selection.. Would you be interested to try beta version?

If yes let me know what is your operating system and I will release one.

FoxP commented 4 years ago

Oh, cool! Yes, for Windows please. :+1: Do you run selected tasks in selected order ? Or from top to bottom ? If from top to bottom, is there a way to edit tasks order ? Do you run all selected tasks one by one ? Or all at once ?

I mainly use rclone for online backups so in my opinion :

kapitainsky commented 4 years ago

At the moment it is just multi select - and run all at once.

I was also thinking about adding some sort of simple queue. But it is not there yet. Maybe somebody will take on this task:)

On 1 Mar 2020, at 19:16, FoxP notifications@github.com wrote:

Oh, cool! Yes, for Windows please. πŸ‘ Do you run selected tasks in selected order ? Or from top to bottom ? If from top to bottom, is there a way to edit tasks order ? Do you run all selected tasks one by one ? Or all at once ?

I mainly use rclone for online backups so in my opinion :

running selected tasks from top to bottom is better, if you can edit tasks order running tasks one by one is better as you may want to copy some data at a specific location, then upload it somewhere else. Plus, running all tasks at once may DDOS the storage system because i guess you start them in separate threads β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kapitainsky/RcloneBrowser/issues/80?email_source=notifications&email_token=ADXJHOVW6JA6FU5O72C5VVLRFKX7ZA5CNFSM4KZI4K3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENNICEI#issuecomment-593133841, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXJHOWWOESZW4INY42VREDRFKX7ZANCNFSM4KZI4K3A.

kapitainsky commented 4 years ago

Oh, cool! Yes, for Windows please. πŸ‘ Do you run selected tasks in selected order ? Or from top to bottom ? If from top to bottom, is there a way to edit tasks order ? Do you run all selected tasks one by one ? Or all at once ?

I mainly use rclone for online backups so in my opinion :

* running selected tasks from top to bottom is better, if you can edit tasks order

tasks are now sorted alphabetically - A->Z or Z->Z, so you can control order in some way

* running tasks one by one is better as you may want to copy some data at a specific location, then upload it somewhere else. Plus, running all tasks at once may DDOS the storage system because i guess you start them in separate threads

I am thinking about "Queue" mechanism - you add tasks to the queue. newly added task are at the bottom. Queue is processed from the top.

But it is future project.

In the meantime I will release beta Windows version so you can have a look and test.

kapitainsky commented 4 years ago

Here you are: https://1drv.ms/u/s!Aq335pidOrBV3-hAchh_Oxz1IJGsLw Please let me know if you have any comments what can be improved.

FoxP commented 4 years ago

Oops. If i press Edit on a task, the app crashes. Same with File -> Preferences.

Enregist._2020_03_01_21_14_28_823.zip

kapitainsky commented 4 years ago

weird... but definitely has to be fixed

FoxP commented 4 years ago

Is there a way to generate logs to help you?

kapitainsky commented 4 years ago

I know what happened.

I build it with wrong Qt. Correct one in few mins

On 1 Mar 2020, at 20:19, FoxP notifications@github.com wrote:

Is there a way to generate logs to help you?

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kapitainsky/RcloneBrowser/issues/80?email_source=notifications&email_token=ADXJHOT7NAGNCI57RF6ITVLRFK7MBA5CNFSM4KZI4K3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENNJUXA#issuecomment-593140316, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXJHOXFADO43GF2J7GYAR3RFK7MBANCNFSM4KZI4K3A.

kapitainsky commented 4 years ago

Working one

https://1drv.ms/u/s!Aq335pidOrBV3-hBew4Haw4QybPetQ

There is bug in Qt (I've got ticket open with Qt authors) - so I use different versions in every environment. Easy to mess things up. But this time I tested:) this is working one

FoxP commented 4 years ago

Its works very well. :+1:

Some comments :

image

image

image

image

image

image

image

image

image

kapitainsky commented 4 years ago

Any feedback welcomed.

It is big work in progress atm. So some glitches are expected. Said that I only release stable code so it is definitely usable. More things live in my alpha versions but they are not ready for trying yet.

On 1 Mar 2020, at 20:39, FoxP notifications@github.com wrote:

ο»Ώ Its works very well. πŸ‘

Some comments :

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

kapitainsky commented 4 years ago

Also good that you test it on windows. I do all dev on Mac so windows testing is always behind. It is real PITA trying to keep all three platforms working consistently.

kapitainsky commented 4 years ago

Also note that things like rclone check, get tree etc are no longer blocking main window. They all run modeless windows.

FoxP commented 4 years ago

I edited my previous comment. Don't hesitate to ask for tests, will be happy to help.

FoxP commented 4 years ago

That's nice! Maybe one issue : Modeless windows, but they are still set as "topmost".

kapitainsky commented 4 years ago

Maybe one issue : Modeless windows, but they are still set as "topmost".

It is not the same on macOS and Linux where it works as intended. Another example of cross platform app dev fun:) It is simple time wise impossible to test all aspects of all environments for me so your help is really appreciated.

FoxP commented 4 years ago

Oh, shame on Qt.

kapitainsky commented 4 years ago

another beta ready - with added tasks queue processing.

https://1drv.ms/u/s!Aq335pidOrBV3-hEcyYkwUGHh1ua8Q

Let me know what you think.

FoxP commented 4 years ago

Works perfectly! Very (very) good job. Everything is so polished for a "beta". Some comments :

kapitainsky commented 4 years ago

Thx!!

Yes. It is still beta. So it has to be ironed.

your comments are great help. I just hope to make 99% bug free release. Hahaha. Maybe 90%.

More features added it is more difficult to avoid issues.

On 8 Mar 2020, at 17:50, FoxP notifications@github.com wrote:

ο»Ώ Works perfectly! Very (very) good job. Everything is so polished for a "beta". Some comments :

Rclone Browser should not blink in taskbar for each ending task from a queue (?) Queue is still running even when finished :

It is possible to add same task twice to queue, not sure if wanted After a click on the "Add" button from "Tasks" tab, task selection should (?) be cleared CTRL+A and SHIFT+selection shortcuts not possible ATM No multiselection for up, down and remove buttons in Queue tab Maybe you should also add the up and down buttons in "Tasks" tab as selection order in this tab is not kept when sent to queue Difficult to distinguish "upload" and "download" tasks since icons are very similar :

It would be great to be able to shutdown, hibernate computer, or run a user-defined command line at the end of the queue. Killer feature for me! On a 1080p screen :

"Purge" button was enabled with only one (running) task from queue. After a click on it, it is now disabled :

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

kapitainsky commented 4 years ago
* Rclone Browser should not blink in taskbar for each ending task from a queue (?)

Correct, it should not. Interestingly it does not blink for me... Taskbar changes colour when window is losing focus and then getting it back. I will check in the code if focus change is not forced somewhere by accident.

* Queue is still `running` even when finished :

It is by design. "Running" means active - so user can add new tasks and precessing will start immediately

* It is possible to add same task twice to queue, not sure if wanted

It is by design - I don't see why to prevent it. I prevent user from running the same task simultaneously but if somebody wants to run one task again and again let it be.

* After a click on the "Add" button from "Tasks" tab, task selection should (?) be cleared

Not sure which way is better - will think about it.

* `CTRL+A` and `SHIFT+selection` shortcuts not possible ATM

Can't reproduce but I run windows in virtual machine only - where both shorcuts work. The same no issues in macOS and Linux. Will check if there is anything special with these shortcuts handling on Windows.

* No multiselection for `up`, `down` and `remove` buttons in `Queue` tab

It would be nice to add - agree. Adding it to "wish list"

* Maybe you should also add the `up` and `down` buttons in "Tasks" tab as selection order in this tab is not kept when sent to queue

selection order is kept - I explicitly ensured it after your previous comments. Can you double check?

* Difficult to distinguish "upload" and "download" tasks since icons are very similar :

Any suggestion for better looking and more clear icons?

* It would be great to be able to shutdown, hibernate computer, or run a user-defined command line at the end of the queue. Killer feature for me!

another "wish list" item - I looked quickly around and it is not trivial to add - especially cross platform. When I find solution one day it will be added.

* On a 1080p screen :

I know. Does not look pretty:( But on smaller screens putting all icons in one row makes App window too wide to fit. Any idea what layout would look and work better?

* "Purge" button was enabled with only one (running) task from queue. After a click on it, it is now disabled :

Definitely a bug - even I can't reproduce it. Will make buttons status code more bullet proof - clearly there is some not captured edge case.

kapitainsky commented 4 years ago

To limit clutter I might go for something like this:

Screenshot 2020-03-09 at 12 06 39
FoxP commented 4 years ago

Correct, it should not. Interestingly it does not blink for me... Taskbar changes colour when window is losing focus and then getting it back. I will check in the code if focus change is not forced somewhere by accident.

Here is a video of this issue, on Windows. I did it with only a single task, but it blinks for each task from the queue. I guess it should only blink for last item of the queue (in my opinion) : Enregist _2020_03_09_19_37_03_119

Can't reproduce but I run windows in virtual machine only - where both shorcuts work. The same no issues in macOS and Linux. Will check if there is anything special with these shortcuts handling on Windows.

Oh, weird. It works in "Tasks" tab, but not in "Queue" tab.

selection order is kept - I explicitly ensured it after your previous comments. Can you double check?

Here is a small video. I selected item 15, then item 13. It then automatically ordered my selection alphabetically : Enregist _2020_03_09_19_43_00_640

Any suggestion for better looking and more clear icons?

Maybe these, or a different color? Hard to say if its better.

another "wish list" item - I looked quickly around and it is not trivial to add - especially cross platform. When I find solution one day it will be added.

If it can help you, for Windows, with .NET, i use following codes. It send a "shutdown" instruction in a terminal. I guess you can do something similar for Linux.

    'Hibernate computer
    Sub Hibernate(Optional ByVal timeInSeconds As Integer = 0)
        Call RunCmdCommand("Shutdown -h -t " & timeInSeconds, False)
    End Sub
    'Shutdown computer
    Sub Shutdown(Optional ByVal timeInSeconds As Integer = 0)
        Call RunCmdCommand("Shutdown -s -f -t " & timeInSeconds, False)
    End Sub
Sub RunCmdCommand(ByVal command As String, Optional ByVal isVisible As Boolean = True, Optional ByVal workingDirectoryPath As String = "",
                      Optional ByVal isWaitingForExit As Boolean = False,
                      Optional ByVal environmentVareName As String = "", Optional ByVal environmenVarValue As String = "")
        Dim p = New Process()
        If Not isVisible Then
            p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
            p.StartInfo.CreateNoWindow = True
        End If
        p.StartInfo.FileName = "cmd.exe"
        p.StartInfo.Arguments = "/K " & """" & command & " && EXIT" & """"
        p.StartInfo.UseShellExecute = False
        p.StartInfo.RedirectStandardError = True
        p.StartInfo.RedirectStandardOutput = True
        If environmentVareName <> String.Empty And environmenVarValue <> String.Empty Then
            p.StartInfo.EnvironmentVariables(environmentVareName) = environmenVarValue
        End If
        p.StartInfo.StandardErrorEncoding = Encoding.UTF8
        p.StartInfo.StandardOutputEncoding = Encoding.UTF8
        If Not workingDirectoryPath = String.Empty Then
            p.StartInfo.WorkingDirectory = workingDirectoryPath
        End If
        AddHandler p.OutputDataReceived, AddressOf InterProcOutputHandler
        AddHandler p.ErrorDataReceived, AddressOf InterProcOutputHandler
        p.Start()
        If isWaitingForExit Then
            p.BeginErrorReadLine()
            p.BeginOutputReadLine()
            p.WaitForExit()
        End If
    End Sub
FoxP commented 4 years ago

To limit clutter I might go for something like this:

Screenshot 2020-03-09 at 12 06 39

Good idea. But do people still have screen resolutions < 1080p ? Maybe you can just add these icons to the right, like this :

image

kapitainsky commented 4 years ago

Correct, it should not. Interestingly it does not blink for me... Taskbar changes colour when window is losing focus and then getting it back. I will check in the code if focus change is not forced somewhere by accident.

Here is a video of this issue, on Windows. I did it with only a single task, but it blinks for each task from the queue. I guess it should only blink for last item of the queue (in my opinion) :

OK! it has something to do with notifications settings on Windows. I am not familiar with that. In Rclone Browser try to disable notifications for finished tasks in Preferences. If enabled program triggers notification - maybe it depends on System Tray Icon enabled or not? On my Windows 10 when task finishes I have "baloon" popup

Screenshot 2020-03-09 at 19 11 15

Can't reproduce but I run windows in virtual machine only - where both shorcuts work. The same no issues in macOS and Linux. Will check if there is anything special with these shortcuts handling on Windows.

Oh, weird. It works in "Tasks" tab, but not in "Queue" tab.

Clear. It is intentional. In Queue list there are no actions for multiple items - so selection mode is "single". I might change it at some stage when I feel like dealing with moving group of tasks up and down edge cases:)

selection order is kept - I explicitly ensured it after your previous comments. Can you double check?

Here is a small video. I selected item 15, then item 13. It then automatically ordered my selection alphabetically :

Also clear now. I did it on purpose. It preserves order from the screen (A->Z or Z->A). Order based on selection order is not very predictable - works ok with CTRL but when you multiselect with SHIFT or mouse drag gesture results are a bit random. So I decided to go for something which always works. BTW this is how it was before....

kapitainsky commented 4 years ago

another "wish list" item - I looked quickly around and it is not trivial to add - especially cross platform. When I find solution one day it will be added.

If it can help you, for Windows, with .NET, i use following codes. It send a "shutdown" instruction in a terminal. I guess you can do something similar for Linux.

Thank you for that. But atm I don't want to work on any OS specific code. If somebody does it and submits PR why not to include it - but on my own I don't touch it:) What I could do is option to quit RB when queue finishes. Not sure if Windows power manager can be setup to run specific power profile when given program is running and switch to other if not... or maybe not quit but call external program user can configure - then you could run whatever after queue finishes.

FoxP commented 4 years ago

If it can help you, for Windows, with .NET, i use following codes. It send a "shutdown" instruction in a terminal. I guess you can do something similar for Linux.

Thank you for that. But atm I don't want to work on any OS specific code. If somebody does it and submits PR why not to include it - but on my own I don't touch it:) What I could do is option to quit RB when queue finishes. Not sure if Windows power manager can be setup to run specific power profile when given program is running and switch to other if not... or maybe not quit but call external program user can configure - then you could run whatever after queue finishes.

I understand. Maybe you can implement something like this? With "path_to_your_app_or_script" user-defined. :+1:

#include <cstdlib>

int main() {
   std::system("path_to_your_app_or_script");
   return 0;
}

This way, it allows to run something (a script, for instance) at the end of the queue. Should work on Linux, Windows, Mac.

kapitainsky commented 4 years ago

Definitely yes.

On 9 Mar 2020, at 20:25, FoxP notifications@github.com wrote:

If it can help you, for Windows, with .NET, i use following codes. It send a "shutdown" instruction in a terminal. I guess you can do something similar for Linux.

Thank you for that. But atm I don't want to work on any OS specific code. If somebody does it and submits PR why not to include it - but on my own I don't touch it:) What I could do is option to quit RB when queue finishes. Not sure if Windows power manager can be setup to run specific power profile when given program is running and switch to other if not... or maybe not quit but call external program user can configure - then you could run whatever after queue finishes.

I understand. Maybe you can implement something like this? With "path_to_your_app_or_script" user-defined. πŸ‘

include

int main() { std::system("path_to_your_app_or_script"); return 0; } This way, it allows to run something (a script, for instance) at the end of the queue. Should work on Linux, Windows, Mac.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kapitainsky/RcloneBrowser/issues/80?email_source=notifications&email_token=ADXJHOS7E45FTTYB4W6O2ZDRGVGCLA5CNFSM4KZI4K3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOI5WCI#issuecomment-596761353, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXJHOUJK7GPUW6ODOHO3WTRGVGCLANCNFSM4KZI4K3A.

kapitainsky commented 4 years ago

https://1drv.ms/u/s!Aq335pidOrBV3-hHS3vxvzgFhvm3-Q

now with external script trigger when queue is finished. Give it a try. Let me know if it works on Windows

FoxP commented 4 years ago

It works! Only for .exe files, but that's a very good start :

Enregist _2020_03_10_21_45_41_678

I also tried with a simple .bat script (code above), it was not started at the end of the queue :

echo "Hello World"
pause

Finally, i tried to set a .ps1 file (PowerShell script) and had following message in "Preferences" form :

image

Here is the script :

$s = "Hello World"
write-host $s
Pause

I deleted from my HDD the .exe file set in "Preferences", no crash at the end of the queue.

kapitainsky commented 4 years ago

Bat files work. But output is not sent to console. Try to redirect output to file in your bat file and you will see that file is created.

On 10 Mar 2020, at 20:55, FoxP notifications@github.com wrote:

ο»Ώ It works! Only for .exe files, but that's a very good start :

I also tried with a simple .bat script (code above), it was not started at the end of the queue :

echo "Hello World" pause Finally, i tried to set a .ps1 file (PowerShell script) and had following message in "Preferences" form :

Here is the script :

$s = "Hello World" write-host $s Pause I deleted from my HDD the .exe file set in "Preferences", no crash at the end of the queue.

β€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

kapitainsky commented 4 years ago

Another two weeks and I will release it. Would be great you use the latest β€œbeta”. And if any issues let me know.

kapitainsky commented 4 years ago

Your ps file. I relyon QT backend to decide if file is executable or not. You can always type it’s path/name by hand I think. Then nothing is checked

thanamaha2002 commented 4 years ago

I want to ask something from @FoxP, it's nothing to do with the issue but what software you use to record screen and turn to GIF?

FoxP commented 4 years ago

Bat files work. But output is not sent to console. Try to redirect output to file in your bat file and you will see that file is created.

You are right! Works perfectly.

Another two weeks and I will release it. Would be great you use the latest β€œbeta”. And if any issues let me know.

No problem, I always use your testing versions instead of latest stable release.

Your ps file. I relyon QT backend to decide if file is executable or not. You can always type it’s path/name by hand I think. Then nothing is checked

Good approach. Thanks for this.

FoxP commented 4 years ago

@thanamaha2002 : i use oCam, but ScreenToGif may be better.

FoxP commented 4 years ago

Did some additional testing : works perfectly. :+1:

kapitainsky commented 4 years ago

By any chance do you have maybe simple bat script putting Windows computer to sleep? I could include it in the next release as sample script to use

FoxP commented 4 years ago

By any chance do you have maybe simple bat script putting Windows computer to sleep? I could include it in the next release as sample script to use

You can use this .bat script to hibernate (not sleep) :

cd c:\
shutdown /h

...or use this, i had some free time : https://github.com/FoxP/RcloneBrowserLauncher

kapitainsky commented 4 years ago

Your Launcher is nice thing! I like it

kapitainsky commented 4 years ago

I keep working on new version so will share next beta soon. I am re writing completely mount feature. Now you will be able to mount to letter or folder, save mount as a task, run it every time RB starts and also run custom script so you can add things like cache warming etc.

Screenshot 2020-03-13 at 20 38 42

FoxP commented 4 years ago

Your Launcher is nice thing! I like it

Thanks!

A "Close Rclone Browser when finished" for tasks queue could be a good addition for Rclone Browser, in my opinion. I can implement it in my launcher, but it can be done easier on your side.

Also, one question : What is Rclone Browser default install path on Windows? I can't find it as the setup.exe keep my custom install path for each update.

FoxP commented 4 years ago

I keep working on new version so will share next beta soon. I am re writing completely mount feature. Now you will be able to mount to letter or folder, save mount as a task, run it every time RB starts and also run custom script so you can add things like cache warming etc.

Wow, nice addition! The "Run saved task every time Rclone Browser starts" is an EXCELLENT idea! :+1: :+1: :+1: