kapitainsky / RcloneBrowser

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

Next release - beta testing #93

Open kapitainsky opened 4 years ago

kapitainsky commented 4 years ago

Here it is the latest beta version with improved mounting - mostly self explanatory when you try except advanced tab - I will describe it in a moment.

@thanamaha2002 , @FoxP - I would appreciate if you try and comment.

Anybody else is welcomed to test - windows binary is here:

https://1drv.ms/u/s!Aq335pidOrBV4IJIsro8BeILdqSxwA

For Linux or macOS please compile yourself from kptsky_testing branch. Unfortunately I don't have enough time to release betas cross platform - and for linux it is trivial to build yourself - see instructions here. Final release is expected in couple of weeks and of course will be for all OS.

@thanamaha2002 - it also includes fix for #90

PS. This is BETA version - so not everything might work as expected.

kapitainsky commented 4 years ago

Advanced remote mount tab:

You can specify script to run after successful mount - original rclone mount is run with rc interface and called script receives required info how to "talk" to mount instance of rclone. Mount job contains now script output window if run with some script - so you can check its output.

At the moment scripts receives:

1 - rclone executable location 2 - RC port 3 - RC username 4 - RC password 5 - mount point

as a proof of concept you can run following script (modify for windows):

#!/bin/bash

# show received parameters
echo $1
echo $2
echo $3
echo $4
echo $5

# wait a moment just to be sure
# that mounting rclone is ready
# in more advanced version we will include some check
sleep 5

# talk to rclone mount
"$1" rc "core/quit" --rc-addr localhost:$2 --rc-user $3 --rc-pass $4

the last line is equivalent of running:

rclone rc "core/quit" --rc-addr localhost:1234 --rc-user username --rc-pass pass

this will instruct "rclone mount" to quit/unmount - you should see your mount changing status to finished.

If it works you can move on to some cool things like cache warming - this is actually where I had all idea from - https://forum.rclone.org/t/how-to-get-full-directory-tree-cached-on-first-mount/12535/5

The following example is from mentioned rclone forum thread - it is for Windows and only works when mounted to drive letter (of course people familiar with scripting can easily modify it to other OS and situations)

create new mount with following parameters (specify them by hand in extra options tab):

--vfs-cache-mode writes
--vfs-cache-poll-interval 20m
--vfs-cache-max-age 8760h
--vfs-cache-max-size 1024G
--attr-timeout 8700h
--dir-cache-time 8760h
--poll-interval 30s
--multi-thread-streams 0

then run your mount with following script:

@echo off
echo %1
echo %2
echo %3
echo %4
echo %5

::Variables
set driveletter=%5

:: Check that the folder is valid, otherwise wait until it is
echo Waiting for %driveletter% to be ready ...

:LOOP1
vol %driveletter% >nul 2>nul
if errorlevel 1 (
    echo " "| set /p dummyName=.
    timeout /t 1 > nul
    goto LOOP1
) else (
    echo.
    echo Drive %driveletter% OK!,
)

echo.
echo Warming up cache...
echo This may take a few minutes to complete
echo You can use the cloud-drive normally while this runs
echo.

echo Awaiting completion-message from RC...
%1 rc vfs/refresh -v recursive=true --rc-addr localhost:%2 --rc-user %3 --rc-pass %4 > nul

if not %ERRORLEVEL% equ 0 (
    echo Something went wrong during precaching.
) else (
    echo Cache warmup for %driveletter% OK!
)

You can start using your mount immediately but in the background (you can check script output in jobs) rclone will be busy caching locally remote directory structure - depending on your remote after few moments browsing your mount will feel like local drive.

If you would like to understand more about cache warming concept have a look at this excellent primer from rclone forum by @thestigma:

https://forum.rclone.org/t/a-short-primer-on-pre-caching-or-pre-listing-technique/13171

In summary - it opens completely new possibilities. Cache warming is perfect example how useful it can be. I only intend to provide cache warming example scripts in the final release and leave rest for people creativity - my aim is to provide way to use it.

thanamaha2002 commented 4 years ago

It works perfectly for the #90 fix. But one thing though, when use copy command, the command is not change the variable $file_name.

kapitainsky commented 4 years ago

It works perfectly for the #90 fix. But one thing though, when use copy command, the command is not change the variable $file_name.

I am not sure I understand it?

thanamaha2002 commented 4 years ago

Run Stream and copy the command to clipboard.

01

This is what I got...

C:\test\rclone.exe cat Remote:test.mkv --config C:/test/rclone.conf | .\mpv.exe - --title="$file_name"

But it should be like this...

C:\test\rclone.exe cat Remote:test.mkv --config C:/test/rclone.conf | .\mpv.exe - --title="test.mkv"

kapitainsky commented 4 years ago

OK. Clear, will fix

kapitainsky commented 4 years ago

Updated beta version to 1.9.7.1 - download link in original post has been updated.

thanamaha2002 commented 4 years ago

Note: in the final version this should be Copyright © 2020

02
kapitainsky commented 4 years ago

hahah - yes it will be - it is on the to do list for some time now.

Would be great if you try to use mount functionality - maybe you notice something not working there.

On 18 Mar 2020, at 07:30, Thanachai Mahanakorn notifications@github.com wrote:

Note: in the final version this should be Copyright © 2020

https://user-images.githubusercontent.com/35872889/76935882-863b6500-6924-11ea-856d-e37dfaa9f73f.png — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kapitainsky/RcloneBrowser/issues/93#issuecomment-600466551, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXJHORKBKCWRBJB7FCDXLLRIBZ73ANCNFSM4LNX7SAA.

thanamaha2002 commented 4 years ago

Sure, I'll playing with it :)

kapitainsky commented 4 years ago

All day at home due to virus outside so making progress with RB - Updated beta version to 1.9.7.2 - download link in the original post has been updated.

What changed can be seen in kptsky_testing branch - nothing major - small improvements.

kapitainsky commented 4 years ago

1.9.7.5 - covering some edge cases in mounting. link in original post has been updated

kapitainsky commented 4 years ago

1.9.7.6 - fixes issue when path to scripts contains spaces + queue script execution problem in specific situations

caspertone2003 commented 4 years ago

Sweet!

Thanks a lot. Only routine mounting and task editing tests; use of mount to drive - not to mount point. Used rclone-browser-1.9.7.6-ed5e6cc-windows-64-bit with rclone-v1.51.0-124-ge569977c-beta-windows-amd64

A minor point: running rclone-browser-1.9.7.6-ed5e6cc-windows-64-bit did not ask me to select an installation directory, it just overwrote my previous working version ... uhm, easy peasy for typical users, but I dunno rclonebrowser/rclone users are typical users... better to ask if write to previous working folder or to provide a new folder?

On the other hand, I feel the new icons in tabs etc are a bit harsh than before... but of course this is a question of taste.

Finally, I feel that perhaps it is time to change in the top of the git kapitainsky / RcloneBrowser forked from DinCahill/RcloneBrowser I think already did much more RcB than DinCahill, so, would drop from the title that of forked from... (while I imagine that in the readme or alike there will be probably attribution to Mozeiko, DinCahill and so on... but not any more in page top!

Keep well Dariusz (from London?)

CT

kapitainsky commented 4 years ago

yeap. North of the river:)

Thank you for nice words and testing. Every pair of eyes helps to spot some issues.

Icons - a word why I decided to change them. Previous versions used standard ones provided by Qt. The issue was that this set is limited (no chance to find meaningful icon for check or dedupe etc.) and it differs from platform to platform. So trying to substitute missing icons and ensure that some of them don't look out of place would require splitting icons set per platform... then to make matter worse "every" Linux distro provides its own icons... Nightmare. To solve this puzzle I decided for radical move and use all custom icons. As I am "colour blind" at least this is what my friends say I went for black and white scheme. And I am not pro designer nor I have will and money to hire one:) I tried my best finding royalty free icons on internet and creating few from the scratch in gimp:)

Try dark mode - should be less harsh. Also try mode "icons only" - they are very self explanatory anyway - for some reason they then blend much better into buttons shape.

I don't mind providing alternative set (it could be easily configurable like black or white icons at the moment) if somebody gets me them. 512x512 png forrmat. There is about 80 icons to provide. Also for existing scheme if you have some better idea for any icon send me png file. We can change anything/

thanamaha2002 commented 4 years ago

About the icon though, can Qt use SVG or any kind of vector format? I using a 4K monitor with a HiDPI scale up to 150% and the icons already pixelated. I know it a low percentage of the users but in the future, more and more modern hardware coming out will be a common issue.

01
thanamaha2002 commented 4 years ago

I just realize it not about the icon size but RB don't support HiDPI awareness. 😮

kapitainsky commented 4 years ago

Yes it looks ugly. sure it can. if you provide all required svg files

kapitainsky commented 4 years ago

Also it has something to do with Windows scaling/Qt framework. On macOS icons look ok even on 4k monitor. All icons are provided as 512x512 png so there is enough leeway for OS/Qt to make good use of it. Hopefully when 4k and more monitors become more prevalent it will be addressed. As it stands now at least for Qt it is clearly most polished on macOS - with Windows and Linux falling behind. Why it is I have no idea. Probably people using macs care more about details:)

thanamaha2002 commented 4 years ago

Also it has something to do with Windows scaling/Qt framework. On macOS icons look ok even on 4k monitor. All icons are provided as 512x512 png so there is enough leeway for OS/Qt to make good use of it. Hopefully when 4k and more monitors become more prevalent it will be addressed. As it stands now at least for Qt it is clearly most polished on macOS - with Windows and Linux falling behind. Why it is I have no idea. Probably people using macs care more about details:)

Yes, I was gonna comment about it. The icon size of 512x512 px is already enough but it about the HiDPI awareness. It looks like the software need to support HiDPI awareness in the Windows side, M$ won't do anything about the legacy software anymore.

kapitainsky commented 4 years ago

This is sample of source png file:

https://raw.githubusercontent.com/wiki/kapitainsky/RcloneBrowser/samples/open_remote.png

open_remote

It should easily produce clear and sharp button image (given that they are tiny)

kapitainsky commented 4 years ago

maybe some Qt guru will advice how to handle it better. I have no solution atm - unless somebody creates svg icons - but even then not sure it will work on Windows. Would be good to test.

kapitainsky commented 4 years ago

also try to set QT_AUTO_SCREEN_SCALE_FACTOR environment variable to 1

kapitainsky commented 4 years ago

and try dark mode (which uses Fusion) as per Qt website:

"While the macOS style fully supports high-DPI, the Windows desktop style currently has some limitations with certain scale factors. In these cases, consider using the Fusion style instead, which supports high-DPI in all cases."

kapitainsky commented 4 years ago

In the meantime Windows problems with latest Qt has been fixed, so I moved build to Qt 5.14.1.

Let's see if it makes any difference - updated in latest beta 1.9.7.8 - link in the top most post.

thanamaha2002 commented 4 years ago

@kapitainsky Sadly, it has no difference.

kapitainsky commented 4 years ago

Last attempt today to try to tackle this issue. Try latest beta 1.9.7.9 where I tried to change few settings related to high DPI handling.

If still bad try without scaling (you can disable per app) - then you can adjust font/icons size in preferences.

thanamaha2002 commented 4 years ago

@kapitainsky This works! the image is soooooo sharp now.

P.S. I censored the remote name.

01 02
thanamaha2002 commented 4 years ago

I would like to have additional buttons icons size that smaller than S maybe SS? Because it support HiDPI the icons looks so large.

Only the remote icons looks so large.

kapitainsky commented 4 years ago

Sorry it is not going to happen in foreseeable future - I encourage you to look into the code and add it yourself - it is easier than people think. I am not developer myself Then we can include in some future release.

You have to look into preferences and main_window files. Adding new icons size equals to adding additional option in preferences and new scaling factor in main window part of the code.

Here are build instructions: https://github.com/kapitainsky/RcloneBrowser#windows

caspertone2003 commented 4 years ago

making your own icons... what a tour de force!

visuals help but are not essential... by the way, some are fans of white and black - https://medium.com/better-humans/how-to-make-your-iphone-black-and-white-and-why-you-should-42e70deb92c7

Perhaps a not to much effort solution would be a) to use gray also b) to smoth between black and white, making difumination with grays

caspertone2003 commented 4 years ago

and, by the way... what about

"A minor point: running rclone-browser-1.9.7.6-ed5e6cc-windows-64-bit did not ask me to select an installation directory, it just overwrote my previous working version ... uhm, easy peasy for typical users, but I dunno rclonebrowser/rclone users are typical users... better to ask if write to previous working folder or to provide a new folder?"

kapitainsky commented 4 years ago

Perhaps a not to much effort solution would be a) to use gray also b) to smoth between black and white, making difumination with grays

Maybe there is some graphic designer among user who can help. I know that my icons are a bit crude - but it is the best what I can do:)

thanamaha2002 commented 4 years ago

Sorry it is not going to happen in foreseeable future - I encourage you to look into the code and add it yourself - it is easier than people think. I am not developer myself Then we can include in some future release.

You have to look into preferences and main_window files. Adding new icons size equals to adding additional option in preferences and new scaling factor in main window part of the code.

Here are build instructions: https://github.com/kapitainsky/RcloneBrowser#windows

I see, then it's OK, at least it support HiDPI. 😁

kapitainsky commented 4 years ago

"A minor point: running rclone-browser-1.9.7.6-ed5e6cc-windows-64-bit did not ask me to select an installation directory, it just overwrote my previous working version ... uhm, easy peasy for typical users, but I dunno rclonebrowser/rclone users are typical users... better to ask if write to previous working folder or to provide a new folder?"

It is how it works. You can't have two separate instances of RB as it uses the same configuration files. If you need more instances just copy installed files and enable portable mode. Then you can have as many as you wish.

or uninstall previous one and install in new folder

kapitainsky commented 4 years ago

Here are build instructions: https://github.com/kapitainsky/RcloneBrowser#windows

I see, then it's OK, at least it support HiDPI. 😁

I try to encourage people to participate:) it is whole idea of open source and why some software can be free:)

thanamaha2002 commented 4 years ago

Here are build instructions: https://github.com/kapitainsky/RcloneBrowser#windows

I see, then it's OK, at least it support HiDPI. 😁

I try to encourage people to participate:) it is whole idea of open source and why some software can be free:)

Sadly, I'm not a programmer myself. 😅

kapitainsky commented 4 years ago

guy any comments on new mount functionality? anybody tried cache warming?

caspertone2003 commented 4 years ago

Perhaps a not to much effort solution would be a) to use gray also b) to smoth between black and white, making difumination with grays

Maybe there is some graphic designer among user who can help. I know that my icons are a bit crude - but it is the best what I can do:)

I am not, but can try with some software and see what happens. Can you provide a zip file of the images? Tks.

caspertone2003 commented 4 years ago

guy any comments on new mount functionality? anybody tried cache warming?

not seen that... will try,..

kapitainsky commented 4 years ago

Perhaps a not to much effort solution would be a) to use gray also b) to smoth between black and white, making difumination with grays

Maybe there is some graphic designer among user who can help. I know that my icons are a bit crude - but it is the best what I can do:)

I am not, but can try with some software and see what happens. Can you provide a zip file of the images? Tks.

Here you are: https://1drv.ms/u/s!Aq335pidOrBV4IJA4VCK--NoyAMi3A

caspertone2003 commented 4 years ago

My mind is probably corona-damaged... a) if I select cache full in first tab, I imagine --vfs-cache-mode writes is not needed in second tab b) I wrote the script in a file.txt (inside = @echo off echo %1 echo %2 etc) then to select the file from the third tab. I receive a message the file xyzwhantever is not executable...

How is the script put into tab three? Must be ease as well but looks I am blocked...

kapitainsky commented 4 years ago

correct - first tab id if you want it easy.

if you go for more complex setup I would say leave first empty and do all by hand - more control

you have to save script in file with extension bat e..g myscript.bat

On 22 Mar 2020, at 18:50, caspertone2003 notifications@github.com wrote:

My mind is probably corona-damaged... a) if I select cache full in first tab, I imagine --vfs-cache-mode writes is not needed in second tab b) I wrote the script in a file.txt (inside = @echo https://github.com/echo off echo %1 echo %2 etc) then to select the file from the third tab. I receive a message the file xyzwhantever is not executable...

How is the script put into tab three? Must be ease as well but looks I am blocked...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kapitainsky/RcloneBrowser/issues/93#issuecomment-602254372, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXJHOV47FKXEXAEI632PDDRIZMYTANCNFSM4LNX7SAA.

caspertone2003 commented 4 years ago

ah!

kapitainsky commented 4 years ago

this is Windows nomenclature:)

.bat is some script, the same as .jpg is some image (this is theory - haha - practice who knows)

On 22 Mar 2020, at 18:54, caspertone2003 notifications@github.com wrote:

ah!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kapitainsky/RcloneBrowser/issues/93#issuecomment-602254757, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXJHORTQA4VVVXHNKIFUFTRIZNERANCNFSM4LNX7SAA.

caspertone2003 commented 4 years ago

Ok, working. I show that it also works putting the script in the box. Perhaps an indication to the user that the script can be saved in a .bat file... but, why error if the file is txt? no need to force that... (in any case, just freckles)

I hope I will subjet it to strees testing later, when I actually use it with my usual work. Will report back.

In relation to UI, I think it would be perhaps more clear if you join in one tab tab 2 and 3, and perhaps a script file could include also the extra options. This is more compact. So, one can select the "warming script" and all is inside. Just my 2pennies

kapitainsky commented 4 years ago

I show that it also works putting the script in the box.

Perhaps an indication to the user that the script can be saved in a .bat file... but, why error if the file is txt? no need to force that... (in any case, just freckles)

This is not my idea.:) Windows designers decided that file with bat extension is script (and few others). On other OS it works different. Windows itself will try to protect you from executing txt script (try in command line). I am not going to redesign this:) The whole idea is to provide basic safety check. So users do not run unindented files . This is why I put it also in "advanced" tab. Why? Because providing simple checkbox "cache warming " is not going to work. Rclone gives you access to many cloud services - there are many caveats to consider (check - https://forum.rclone.org/t/a-short-primer-on-pre-caching-or-pre-listing-technique/13171 )

Whole idea has nothing to do with cache warming itself - it is just "framework" to allow users to do anything creative/crazy with mount. Cache warming is good example to show benefit of it.

I hope I will subjet it to strees testing later, when I actually use it with my usual work. Will report back.

In relation to UI, I think it would be perhaps more clear if you join in one tab tab 2 and 3, and perhaps a script file could include also the extra options. This is more compact. So, one can select the "warming script" and all is inside. Just my 2pennies

I see it like this tab 1 (easy approach) - mount remote. click click - done. maybe some basic options. make it read only and enable cache - done tab 2 - I want more - rclone haa many options I would like to use - maybe put cache on disk instead of memory? feel free to provide any rclone options available tab 3 - I want even more - after my mount is "rclone mount options" I can run script able to do some extra magic. maybe warm-cache? maybe do something I dont even know now what it is? It is your script. you are in charge. for good and bad:)

caspertone2003 commented 4 years ago

Being you the father, I will respect your views, that I understand.

Could you perhaps approach a bit to user usability request...

a) third tab, make bigger the box for custion script, such as the one in second tab b) add in the second taba a similar thing as for the third tab, that the extra paratemeters are taken from a file...

Besides, I was searching for the storage of the tasks, and found them in C:\Users\USER\AppData\Local\rclone-browser\rclone-browser Then,

Warming stress testing still pending...

caspertone2003 commented 4 years ago

Some ideas for the icons. First of all, most UI is ok; even, when one gets used to it, is really nice. Also, most, there are no issues with most of icons, because the icons are shown on a grayish background. The not comfortable part are remotes icons, pure black on top of pure white, sharp borders.... Some proposals for the remote icons (see attached): a) introduction of some blur to make icons less sharp - my favourite is chunker-earthsandgrays b) color... to avoid black and white. could be any, just put something to show how this could be - perhaps is not good for dark mode. on the other hand, different remotes with different colours would give visual cues to each kind of remote... In any case, it is your taste what commands ;-) Let me know if you wish me to do something further (such as blurring the other remotes icons or generating and proposing coloured icons...). images.zip CT

caspertone2003 commented 4 years ago

Stress tested. Smooth. No issues found. Thanks, CT

caspertone2003 commented 4 years ago

One additional question... Is prewarming working with the main pane of a remote, I mean, not related to mounting? If so, is there anything to configure or is it authomatic? Looks it does not, as when one clicks in a folder, it "chages" its contents. Should it be possible to precharge all tree for a remote, main pane would provide quite similar funciontality to windows explorer expansion/collapse of folders/tree directory... Thanks again, CT