GithubHelp home page GithubHelp logo

sentaroh / smbsync2 Goto Github PK

View Code? Open in Web Editor NEW
246.0 12.0 46.0 455.28 MB

This application performs file synchronization between an Android device and a PC/NAS via wireless LAN using SMB v1/v2/v3 protocol.

License: MIT License

Java 99.96% AIDL 0.04%
zip sync android-app smb1 smb2 smb3

smbsync2's Introduction

Functions

SMBSync2 is a tool for synchronizing files via wireless LAN using SMB1,SMB2 or SMB3 protocol between the internal storage of Android terminal, SDCARD/USB-OTG and PC/NAS. Synchronization is a one-way from the master to the target. Mirror, Move, Copy and Archive modes are supported. Many storage combinations are supported (Internal storage, SDCARD, USB-OTG, SMB, ZIP) Sync can be automatically started by external applications (Tasker, AutoMagic etc) or SMBSync2 schedule. Sync occurs between two folder pairs called the Master (source folder) and the Target (destination folder). It is a one direction Sync, from the Master to the Target.

The supported Sync modes are:

  • Mirror
    The target folder is kept as an exact copy of the master. If a file is different between the master and the target, the file on the master overwrites the file on the target. Folder and files not present on the target are copied from the master. Files and folders that do not exist on the master are also deleted from the target. Only modified files (by size and/or date/time) are updated on the target.

  • Move
    If a file is different between the master and the target, the file on the master overwrites the file on the target. Once copied to the target, files and folders are deleted from the master (like move command).
    Only modified files (by size and/or date/time) are copied to the target. Identical files, based on the selected compare criteria, are deleted from the master without being copied. Files and folders on the target, not present on the master, are obviously preserved.

  • Copy
    Same as Move, but files are not deleted from the master after being copied.
    If a file is different between the master and the target, the file on the master overwrites the file on the target. Once copied to the target, files and folders are kept on the master (like a copy command).
    Only modified files (by size and/or date/time) are copied to the target. Identical files, based on the selected compare criteria, are ignored and not copied again.

  • Archive
    Move photos and videos in the master's directory to the target if they were taken before 7 days or 30 days before the archive execution date. (However, you cannot use zip to target.)
    The following file types are eligible for archiving.
    "gif", "jpg", "jpeg", "jpe", "png", "mp4", "mov".

Compare criteria: Files are considered different based on these criteria:

  1. File name exists only on master or target, not on both sides
  2. Files have different sizes
  3. Files have a different time stamp (last modification date and time)

In Advanced Options, many compare settings can be adjusted.(Here is an example)

  • Time tolerance interval can be set to ignore difference if less than 1, 3, 5 or 10 sec for compatibility with FAT/exFAT medias.
  • Ignore Daylight Saving time is supported.
  • Option to not overwrite target file if it is newer than the master or if it is larger in size.

FAQs

Please refer to the link below.

English
日本語

Documents

Please refer to the link below.

English
日本語

Download

It is the same thing as the APK published on Google Play.

How to Build

  1. Clone or download from Github.
  2. Open with AndroidStudio(Open an Existing Project).
  3. Build(Build->Rebuild project).
  4. Plase refer to "release/SMBSync2_debug.apk"

License information

  • This software includes the work that is distributed in the Apache License 2.0.
  • This software includes the work that is distributed in the GNU Lesser General Public License v2.1.
  • This software includes the work that is distributed in the MOZILLA PUBLIC LICENSE 1.1.
  • This software includes the work that is distributed in the Bouncy Castle LICENSE.
  • This software includes the work that is distributed in the BSD 3-Clause "New" or "Revised" License

smbsync2's People

Contributors

philz-cwm6 avatar sentaroh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smbsync2's Issues

Icon lining issue

Hi,

Can you move the arrow icon back to face the target/source icon ?
With new multiline layout it is facing the middle of the TextView

Before:
Screenshot_1595769742-fix

After (image editing, not coded)
Screenshot_1595769742

Best regards

New Feature: Force tablet view in landscape orientation

I have this code completely working and proper
Really nice when you have a small device and a long language like fr/ru
Once we are used to the app, the tablet mode is great on a small dpi device for daily use
I am just waiting you close the filters code and I will pull it (to avoid rebase/merge hassle)
Best regards

Screenshot_1589518199

Screenshot_1589518212

Nexus S in fr and ru
Screenshot_1589518244
Screenshot_1589518345

Long master/target path in view

I found a bug in the new branch:
Screenshot_1595707662

The Zip icon is not properly displayed here. The proper icon is displayed in the main view, but not in the Edit Sync Task view

Best regards

Schedule sync tasks list corruption bug + Next schedule notification error bug

Hi,

I recently found a bug that I couldn't fix in an easy way, so stopped looking at it. I was about to look at it again but I do not have much time. Hope you can look at it and fix it.

Here are the steps to reproduce:

  • setup 1 or 2 sync tasks
  • setup a schedule and add the sync tasks to the schedule (not Auto)
  • enable the schedule
  • delete or rename one of the sync tasks

Issues:

  1. the sync task is also deleted/renamed in the schedule without user knowledge
    It is a good feature, but should be on user decision. A prompt each time is not a good idea because you add interruptions in tasks management

    • I was planning to add a new setting (ScheduleItem.OnSyncTaskDelete for example) in the Edit Schedule dialog with a spinner:
      When a Sync Task is renamed or deleted by user: 1- rename/delete the sync task in the schedule. 2- prompt for action. 3- ignore and keep the invalid task name in the schedule (will generate a warning message)
    • I did not do because of next bug
  2. the Schedule TAB doesn't reflect the changes in the sync tasks list of the schedule items until a restart. Also, the Next Schedule warning is not shown if the sync task was deleted. After app restart, Schedule Tab sync list is updated

  3. more annoying bug: if we do not restart app after a sync task is deleted:

    • in Schedule Tab, create a new Schedule and save it
    • restart app
    • the sync task we deleted/renamed appears now as an error in the Schedule containing it. The rename/delete was not saved in the Schedule because we created a new schedule before restarting the app

Fixes to do:

  • implement a schedule item setting to "prompt"/"ignore"/"always update" the schedule sync task when a sync task is deleted/renamed (I can add it if it can help you because of time)
  • when a sync task is deleted/renamed, the Schedule Tab list should reflect the changes accordingly. If ignore is chosen by user, the next schedule warning must be updated
  • the changes should be immediately saved so that they are not lost when we create a new schedule or edit an existing one before app restart

I could not find a simple way to notify the Scheduler of the changes by reloading settings from the file automatically

Hope you can look at these issues

Best regards

Edit master/target folder while rotating

(build 73, for my follow up)
Tested the last source, thank you, looks nearly done
There are still a few unsaved views in Edit master/target folder:

  • Archive view:
    • highlighted items in image are lost/reset on rotation

Screenshot_1589520414

  • Zip view
    • password confirmation field is always filled with master pw on rotation. If you let it empty or partially filled while password field is completed: on rotation, the confirmation pw field is completed
    • select file zip is also reset: browse folders, select an existing zip, rotate and back to portrait: selection is gone, select again the target zip file, press Save, the selected file was not saved and target field is empty

confirmation password
Screenshot_1589520804

Select Zip file
Screenshot_1589521103

After rotation: it is unselected and can no longer be saved when selected
Screenshot_1589521369

After it was reselected again and save: target is empty
Screenshot_1589521133

  • Folder path not saved and reset
    • Select List Folders and browse into folders by clicking the directories
    • rotate device and back to portrait
    • press Select
    • folder shown in browser was not saved

Screenshot_1589520969

Screenshot_1589521016

  • Archived extensions view in landscape

Screenshot_1589519729

Better to put on separate line even for large devices
Look at this commit which also includes a few margins fixes and remove non adapted devider and use the ZIP_DEFAULT entries
#78

UUID List Changes Confirmation bug

How to reproduce:

  • Edit UUID list
  • instead of using the button Cancel, use the "Device Back Button"
  • No confirmation menu is displayed unlike the other menu options in the app

When using Cancel button, the prompt to confirm exit without saving changes is properly displayed

Best regards

Cannot Create Directory

Hello,
Im trying to sync my SD to a smb server in a new Samsung A51 mobile (Android 10). I'm using the Copy mode.
Appsync2 does very well the job, unless an issue; the sync crashes over and over again when the app has to create a new directory in the smb server (if I create the directory from a PC, the app just works fine).
The error message is: can't create the file when already exist (and no, the directory doesn't exist previously).

Column alignment in main view

Could you align the column Auto/SyncMode on the left if it is not too much hassle ?
Probably it will need a new layout width logic !

Screenshot_1598179041

It is currently left aligned/misaligned, depending on text length, because it is aligned to the sync icon
Screenshot_1598178954

Best regards

Auto Scroll broken

Hi,
I just noticed that one of your last commits broke the auto scroll:

  • when a sync is ongoing, Messages tab does not auto scroll any more

Can you fix it ?

Thank you and best regards

Landscape vs Large issue before API 26

Hi,
I noticed a few weeks ago that in Settings, the override built in device Land vs Large layout doesn't work properly in anything before API 26. It causes a back stack like issue you can see when:

  • Enter Settings in Portrait mode
  • Turn to landscape: pans are not shown
  • Click an entry: pan is shown

or

  • Enter Settings in Portrait mode
  • Click an entry: like UI settings
  • Turn to landscape: pans are not shown

This was not bothering

However, now, on one of my old devices I noticed it is also in Messages: the Large/Land layout is never applied

I tested in Emulator
Nexus 6 API 25 and before:
Screenshot_1592566769

Nexus 6 API 26 and later
Screenshot_1592566883

I tried to debug it a bit in Settings:
onIsMultiPane() is properly overridden and entered, but the effect is partial and provokes the back stack like issue. It is not only related to the "Force Tablet Mode" but also to the isTablet() changed based on language. Anything changing the device built in value for onIsMultiPane() causes the issue pre-API 26

Do you have an idea why it is like that ?

Pull request: complete schedule fixes

Pull request: #188

I completed my previous patch after your merge.
I am done with that part

Changes:

  • translation fr:
    • shorten some messages to fit the screen if needed because the max allowed error lines is 3 (Fr/eng)
  • remove now unused messages
  • do not show the schedule button when schedule list is empty + ensure NPE handling
  • add missing space between Edit Schedule title and Schedule name in the EditSchedule dialog
  • translate the new created schedule name
  • if all auto-generated schedule names exist (>1000), do not rely on xml layout text field but on the translated new name message: this avoids a NPE if the layout text is removed in some code maintenance
  • never modify the edited schedule name even if it is empty: do not change the schedule and throw an error message so user can rename it
  • if an edited schedule has a null name (settings file corruption), notify the error
  • add a few NPE checks also when renaming sync tasks and schedules

Thank you and best regards

Layout issues

Hi,

Here are 3 pics with the different layouts of the new main view:

Current new layout (NonWordWrap):
Screenshot_1595769742

Here's with a simple WordWrap TextView
Screenshot_1595769592

And with an ellipSize="middle"
Screenshot_1595769647

  1. NonWordWrap is really barely readable and eyes tiring for the main app GUI that user first gets on opening
  2. WordWrap paths are perfectly readable, less eye tiring but it is really less nice aesthetically than 1) and 3)
  3. Single Line with middle Ellipse: readable, main info is present (start and end) and really good aesthetically for the main App GUI facing the user. No eye tiring effect also with the text

Would you consider like you suggested in my old request to use option 3), without the dynamic size change you did not like: that is simply revert to TextView, singleLine="true" and ellipsize= "middle" in the xml ?

Note:
In Edit Sync Task, the spacing, contrast and button layout makes it readable and nice looking in NonWordWrap:
This is really ok:
Screenshot_1595770741

Show classic scroll bar at rest in History and Messages #191

Pull request: #191

Look at the details in comment and test it if you like to try
Feel free to ignore/close it and I will also revert it in my repo

I made it on the early changes to the page up/page down buttons when the ListView did not have the fast scroll bar. Also because I found many posts on stackoverflow about the lack of customisation in the Android fastScroll bar + the few cosmetic limitations. I never found a proper fix, so I wanted to try one.

Now, with the scroll buttons implemented, I do not see much the use of it except showing the classic bar when there is a scroll view at rest. It also enables the first touch to select ListView entry on the area of the scroll bar, which fastScroll bar doesn't allow. However, we can also consider that first touch on the fast scroll bar is a good feature to reach the middle of the list in one click.

Since it was in my internal code, I push to share it. But feel free to close this pull request and keep the current code as is.

Best regards

Master -> Source

If you are aware of this news:
https://www.bbc.com/news/technology-53050955

Maybe it is a good idea in SMBSync3 before its release to rename Master -> Source
For French, it is same thing: "Source" instead of "Maître"
Would make it future proof is Play also chooses to ban these in next years (many users could do also...)

Best regards

Same target/master combination

  1. Same master/target combination issues
    The last change in checkMasterTargetCombination() makes this combination possible:

Case master or target are ""
Screenshot_1589626807

  1. Note: the check wasn't perfect either before the change: case target AND master are not ""
  • with the include filter: target and master are the same

Screenshot_1589626468

  • target is included in master case: no filter selected

Screenshot_1589627122

All these combinations should be invalid

[Feature Request] "Copy" files Incrementally

I have a scenario as below:

  1. Have File-A, File-B on src folder of the phone.
  2. Then I sync this folder using "Copy" mechanism from src folder to target folder on NAS.
    Now both File-A, File-B on NAS now.
  3. Then I review the file on NAS, and delete File-A from NAS.
    Now on NAS it only has File-B.
  4. Create a new File-C on src folder.
  5. Then do the sync again using "Copy".
  6. The result is that , both File-A and File-C copied to target folder.

Expectation:
Do the backup incrementally, eg, for my case, only copy new File-C to target folder.

Thanks.

Nightly signed release (non debug apk)

Hi,
Now that filters are fixed, I am going to post it in an xda and phoneandroid threads.

What do you think about adding a release-nightly-apk, like the debug-apk, signed like in app store, for people that would like to install latest commits but di not know how to compile it ? That way it also doesn't break the Play updates like with debug.

Best regards

Zip compression alignment in large layout

There is still an alignment issue in Russian or long languages if one of the radio buttons has a 2 lines text or more.

Landscape/Large Russian Layout:
Screenshot_1589284084

In edit_sync_folder_dlg_zip.xml, replacing android:gravity="center_vertical" in RadioGroup by "Top" fixes it but less nice looking for most one line languages

I couldn't find any simple clue to fix it

Properly set the sync task error state on broken sync task names

The previous set of patches made use of mGp.syncTaskAdapter to check for duplicates and invalid chars
For invalid chars and empty sync task names, it was ok
However, for duplicates, we cannot rely on the mGp.syncTaskAdapter or the mGp.syncTaskList because they are not completely loaded on app start and on launch from SyncService

The new pull request fixes these issues and the implementation is more adequate for the duplicates.

Note: I implemented the early check in sortSyncTaskList() because it is always called on initial load of settings file + on every change to the SyncTaskList through the syncTaskAdapter.sort() call. That way, the changes are effective on the early load even without GUI and not only applied to the Adapter through GUI

I also fixed the syncTaskAdapter.sort() not called when deleting a sync task

  • Show the error message when editing a sync task with an invalid name

Screenshot_1599311632

  • **properly show error message in all cases **
    also, it immediately updates the error state (+background color) when we rename/delete the task with error

Screenshot_1599342336

color warning

Hi,
While the idea is not bad, I think the colors are not really matched / assorted for the Warning
It can be ok maybe on some serious warnings, but not for regular messages like "Exit without saving..."

Screenshot_1595797567

Screenshot_1595797197

Screenshot_1595797972

The Danger dialog is ok because it is occasional and warning. But not the regular warning dialogs with many colours in a small dialog and not well matching

Just my thoughts because the app had a rather sober and pro look which doesn't match well with the warning dialogs mixing
Maybe it is enough for most warnings to just use the classic text color ?

Thank you and best regards

Wired display in Settings Context Menu

Hi,

The last build (after the last Utilities change ?), when compiled, gives me this on my Galaxy Note 4 Android M device

Screenshot_2020-07-10-22-47-48

Problem is that I cannot reproduce it on any of my other devices and also not in the emulator. Closing + kill app did not fix it.
I uninstalled SMBSync2, reinstalled + restored my settings, the problem is gone and I can no longer reproduce it.

Just to let you know if it tells you something...

small layout issues and margins

Most path edit fields are properly Multi-line except a few, all 3 layouts are concerned

  • Path, text|textMultiLine ok

Screenshot_1589616409

  • The two Archive fields are file/dir names, no path
    One is text|textMultiLine and one is text: I think better to go MultiLine, or put the two in scroll ?

Screenshot_1589616799

  • Fields is a file name:
    should be text|textMultiLine ? or you really want to keep it non-wrap because of whole name ?

Screenshot_1589616439

  • Zip path field
    A margin is needed in the 3 layouts, but maybe better to put it also on a separate line and not a horizontal layout, like for List Directories

portrait normal
Screenshot_1589617711

Land
Screenshot_1589617811

Large
Screenshot_1589617935

Official SMBSync2 Exclude / Include filters behavior and issues #96 (Continued)

This continues the #96 issue

I hope we got a winner: pushed the patch to the current filters v2 commit
Please check attached java sample class method to quickly test the code and all the filter possibilities
Any fixes should be easier to do in the sample before adapt in main code

Whole dir prefix: match anywhere in path
- Exclude any folder named dir: `\dir`
- Exclude all `dir1/dir2`folders: `\dir1/dir2`
- Include ANY folder named dir: not allowed, the overhead is just huge and all code in SyncThread.java, Copyfile.java, archive and zip must be rewritten

Traverse Exclude filter (no sense in include filter)
dir1/dir2   -> do not traverse dir2 (empty dir2 not created)
dir1/dir2/   -> traverse dir2 (empty dir2 created)
\dir and \dir/   -> same as above to traverse or not

All other Include and Exclude filters behavior is identical between filters
The below combinations are allowed and act as expected also with Whole dir prefix `\`
cache   -> master/cache/*
/cache   -> master/cache/*
cache*   -> master/cache*/
*cache  -> master/*cache
/cache/data   -> master/cache/data/*
/cache/data/   -> master/cache/data/*
cache/data   -> master/cache/data/*
cache/data*   -> master/cache/data*

Wildcard ? matches ONE char
dir?/dir5   -> master/dirX/dir5

Wildcard * will match any char up to the next dir separator "/" char
dir*/dir2   -> master/dirxxxx/dir2
*/dir    -> master/oneDirLevel/dir
dir1/*/dir2   -> master/dir1/oneDirLevel/dir2
dir/*   -> master/dir/oneDirLevel

Attached code class sample to fully test and if needed fix the exclude matcher code: rename to .java
Old version: sample.java.txt
New version: 2 posts below

using formatted=false

Hi,
I noticed since a few months that you are adding the formatted=false to silent the lint warning when 2 %s are in the same string. exp task could not be found by schedule. task name=%s, schedule=%s

Is there a reason you do not use the proper fix which is: task could not be found by schedule. task name=%1s, schedule=%2s ?

Here's a simple explanation:
https://www.thedroidsonroids.com/blog/android-strings-xml-tips-tricks

For now, it seems that Android allows the formatter to format the string when the formatted=false is present. But this could cause issues in anytime things are fixed by google. Since it is done on runtime, this would break the app in any such updated Android version

Best regards

Feature request: Scheduler retry on failed / missed tasks

I just noticed that missed/failed sync tasks started by scheduler are not retried until next schedule
Also, if we are in Settings, the scheduled event won't start and will be delayed until next planned schedule.

This is annoying for daily SMB schedules, if NAS or Wifi were not available. It will be even worse for longer schedule plans like weekly...

I tried to look at it and started implementing the basic preferences part: https://github.com/PhilZ-cwm6/SMBSync2/tree/patch_schdeduler_preview

However, while following the code, I see that there is no return or join between the Sync Request Item when passed to Sync Thread by syncRequestQueue() and the demanding Sync Schedule Item.

I renounced to continue modifying the code as it will be important changes in your sources+ it will take me some time to follow the source and understand the code

Hope you can add an option in the Scheduler to retry these failed syncs, with a user choice: time interval in minutes + number of retries, exp. retry every 30mn for 3 times

Thank you and best regards

Warning about the Exact image mode

Hi,

The option "Maintain Target directory as an exact image of the Source (Mirror mode only)" is really valuable to get rid of temp/cache/thumb files in the target for example

I understand your choice to remove the "Image" and "(Exact Image)" GUI hacks to avoid confusion.

However, maybe it is a good idea to add a message like the "filter_select_edit_msg", in Warning theme color (yellow), when user enters the dir/file filters dialog while that option is enabled. Button Ok would be enabled, but just a text warning on top for example ?
Something like: Caution: "Maintain Target directory as an exact image of the Source option" is enabled

I let you decide and add it if you think it is good

Best regards

Path to configuration files cannot be set

Since update of context for language, the "Path to configuration files" no longer works
Screenshot_1591468221

I tested back the commits and it was working with my pull request of 31 may: #99

I quickly looked at it and did not see why. Log is not helpful. I tried a few fixes but did not work

Best regards

Fix various bugs related to the new execute schedule buttons #184

Pull request: #184

Please look at the detailed description of the pull request for a complete list of changes
This patch fixes many bugs related to the new size limit in Schedule name + the start schedule buttons
It also fixes a few bugs introduced by previous commits in the Top Sync Button for sync tasks

  • translations + bug fixes

Pictures of some of the changes:

  • Display error message properly when renaming an invalid schedule
    Before: error not displayed, regular warning in red

Screenshot_1602144761

After: properly display the error message
Screenshot_1602193087

  • Do not enable start schedule button for invalid schedules

Screenshot_1602145498

Screenshot_1602192967

  • Display error message properly when editing an invalid schedule

Screenshot_1602150244

Screenshot_1602193175

  • Detect invalid schedules because no Auto SyncTask is defined in SyncTasks Sync List

Screenshot_1602199677

Screenshot_1602199673

  • Detect schedule execution errors properly

Screenshot_1602193049

And many others as in the detailed description

Let me know please if you find more bugs

Best regards

Rotation visual only one left bug to fix

Thank you a lot, last commit fixed all functional bugs due to rotation.
I found a few more visual only bugs. Functionality is preserved, so really not a big issue in reliability of sync edit. All are fixed by my last commit except :

This one needs to save/restore the browsing path view

  • Edit master/target folder rotation: enable rotation and List Folders visual bug
    This includes the way to enable rotation in edit master/target folders
    • phone in portrait mode
    • click to edit an existing task with master as Internal Storage
    • turn phone in landscape mode
    • click master folder (1)
    • List Directories
    • select a subdirectory
    • back to portrait mode
    • the proper directory is selected (.../Android/obb/ in my example) but the folders view is always back to root of master
    • the bug is only visual because when you click Ok, the proper Android/obb folder is selected
      also, all menus are perfectly saved/restored on rotation

(1) When entering Tagert/master folders edit dialog in portrait, we can no rotate.
This exact step enables rotation into the edit master folder view

Screenshot_1589445192

Screenshot_1589445120

  • Edit master/target folder rotation in Archive mode: layout gap and file types gone visual bug

    • Archive mode
    • enable rotation in target folder edit view like in first step (1)
    • back to portrait
    • A long gap is created to access "Only files with following extensions will be archived..."
      we need to scroll down to see the options
    • the file extensions are no longer displayed (reveals bug in landscape display on small devices)
    • the bug is only visual because all menus are perfectly saved/restored on rotation

This one is fixed by this commit: #78

Screenshot_1589445837

Screenshot_1589445852

Screenshot_1589447724

bugs in sync task name and schedule name

Hi,

I pushed a patch fixing some bugs introduced by your last commit that broke some checks in Sync tasks
I also fixed that renaming sync tasks and schedules could be done using invalid chars, duplicates or empty names

Before:

  • Schedule 1 has empty name !

Screenshot_1599159955

  • Two tasks with same name possible !

Screenshot_1599160020

  • Sync task 1 has empty name !

Screenshot_1599160028

After:

  • notify of errors in sync tasks

Screenshot_1599169707

  • do not allow saving existing tasks by editing them

Screenshot_1599169995

Screenshot_1599170002

  • fix renaming of schedule and task names

Screenshot_1599173881

Screenshot_1599173892

Screenshot_1599173927

New feature: Change app language to other than system default

I am very advanced with this and I have it fully working in all windows and dialogs

Code is preview and a bit dirty mainly because Settings activity doesn't support rotation (added it in draft using recreate() which is ok in gui settings window). Also some checks about the APIs and Manifest finer adjustments

It is really great for multilingual people (like I prefer device system lang in Fr but I prefer your app in English)

Let me know if you have time and you want to look at it right away

Screenshot_1589541524

Bug: view not saved on rotation (Utilities)

Hi,

The view is not properly saved/recreated in Manage Log Files in Utilities

  • Contextual menus (3 dots) / Manage Log Files
  • Check Enable Logging
  • Warning displays
  • rotate screen from portrait to landscape
  • back to portrait orientation
  • answer Ok
  • Enable Logging options remains unchecked (while it is in reality enabled)
  • Click "Close" and Back to Manage Log Files or Rotate again the screen
  • Enable Logging Option is properly checked

Issue is same when disable
Issue is same when select logs to delete and rotate view in confirmation dialog: log file seems not deleted but it was deleted when view is recreated

Schedule button size mis-match

Hi,

Can you adjust please the schedule button like in pictures below
It is rectangular and not square like the SyncTask button

Screenshot_1602144480

In the sync tasks, it is a square and with a proper small space before the scroll bar for better GUI design
Screenshot_1602144459

Best regards

Potential issue: Language not changed in Play release APK

Please, check this thread if you have issues with switching language when you publish the APK in PLAY:
YarikSOffice/lingver#27
and
https://stackoverflow.com/questions/52731670/android-app-bundle-with-in-app-locale-change

I think the code changes in build.gradle are needed

If user has device in Russian only and app has Russian XML, it will be fixed to Russian and crash in English as I understand it. It is impossible to test since it is related to Play bundle

Close the issue if you are aware of it, I forgot to mention it when pushed the language changes

Best regards

layout errors

Landscape orientation still broken in test branch:

  • week number/long/day to fix like in large
  • margins and layout not consistent: if we change storage type (Internal vs SMB like below), display is changed and margins are not aligned once left, and once right

Screenshot_1597834857

Screenshot_1597834862

best regards

More wired issues on rotation

Just for your info if it can help you fix it: in portrait mode I enable Size Only compare while time diff compare was enabled. After rotation to landscape and back to portrait, time_diff layout is shown back

2020-05-12 22 25 20

I suspect the cause is values of settings not initialized on changes. They are only drawn to screen with show/hide layout. Maybe a 2nd buffered gui layout is needed. But it would be more proper to write edited settings to temp variables and use the temp settings to properly set the view. Just boolean and integers for all fields. This would avoid similar issues in the future caused by having the actual checked view/spinner not corresponding to the linked variable value. When ok button is pressed, temp values are used to initialize all the settings so that they match the layout

Icon Suggestion

About the new icon change:
Just a few ideas, if you plan to revert to an icon in the future (Auto text in yellow is not a great esthetic effect I find)

Screenshot_1598184093

Screenshot_1598184422

png:
smbsync_auto_task
smbsync_auto_task_light

I can provide PSP canvas if you ever need, but it is just you current ic_32_sync.png with letter A and same color as the arrow (a dark grey tint for the light)

You'll maybe have a better idea/design

Best regards

[feature request] blacklist for WiFi names

recently i stumbled across this app and it seems pretty cool! kudos!
thank you very much for making this FOSS... 👍 perhaps i can finally replace another proprietary piece of software at my phone.

the only feature which is IMHO lacking beside the several whitelist options is also a blacklist (e.g. to don't suck a friends limited data plan, if you are using his hotspot; to don't use your companies WiFi for whatever reason; etc.).

if this feature can be implemented, this app would be perfect! 👏

Various bugs related to List separator

  • Sync task list with comma in name:
    Sync task is ok, but if you add it to Schedule plan, the Scheduler cannot handle it:

Screenshot_1598480565

  • Same issue for Schedule name, if it contains ","
    The schedule name is broken and the schedule will not start

Fix possibilities

  1. use pipe char as separator for the String holding the schedule names list and the sync tasks lists:
// Constants.java
public final static String SMBSYNC2_LIST_SEPARATOR="|"; //pipe char !

//in code:
String[] stl=si.syncTaskList.split(Pattern.quote(SMBSYNC2_LIST_SEPARATOR));
  1. or use an Array List like with the Wifi AP White List
  2. or do not allow "," char in sync task list name and in schedule name

For SMBSync3, I think it is better to go with fix 2

For SMBSync2, I did a quick fix that works perfectly, but 2 things need to be implemented:

  • a new buildScheduleListV6 to save the new settings on first app launch after update
  • external app script needs to use the new separator !

So I did not continue on it because I am not sure if you prefer to just disable "," for SMBSync2

Hope you can fix it for SMBSync3 properly using Array (or at least the ";" separator instead of the commonly used ",") and maybe for now just disable "," in the name of Schedule and Task List

Best regards

Failed to connect

I have a task synchronizing to a Buffalo Linkstation NAS, last time I used it on version 2.24 it worked fine, now with version 2.29 It can't connect, which might be related to the smb library change.

Screenshot_20200612-220826

Sorry for the screenshot but I will try next week enabling logs.

Target included in Master

New commit broke it again
You must restore this check

if (sti.getTargetDirectoryName().toLowerCase().startsWith(sti.getMasterDirectoryName().toLowerCase()))

Screenshot_1590078523

Official SMBSync2 Exclude / Include filters behavior and issues

I tested all useful combinations with your filters syntax recommendation
Hope this can help you fix it whenever you have time...

Directory Include and exclude current guide:

  1. filter = dir
    1.1. include: matches master/dir/ exact folder name
    1.2. exclude: matches master/dir*, including master/dirOther/ folder
  2. filter = dir/
    2.1. matches master/dir/* (exact name) for both include and exclude
  3. filter = *dir*
    3.1. include: matches master/*dir*/ (starts in root of master)
    3.2. exclude: matches /*dir*/ anywhere in path
  4. filter = dir/*name*/
    4.1. matches master/dir/*name*/ for both include and exclude
  5. filter = \\dir
    5.1. exclude: matches */dir/* anywhere in path
    5.2. include: broken, doesn't include anything under master/dir or master/name/dir
  6. filter = \\*dir*
    6.1. exclude: matches /*dir*/ (matches any *dir* folder anywhere in path)
    6.2. include: broken, matches master/*dir*/ but not everywhere in path

Current limitations and issues

  1. filters do not behave the same for include and exclude (1, 3, 5, 6)
  2. filter type whole dir \\
    2.1. exclude: is ignored if another exclude filter is specified (can be easily fixed in code)
    2.2. include: is completely broken for now
  3. filters apply in master and target, even in Mirror mode
    3.1. in mirror mode, if you exclude \\cache, existing */cache/* folders in target must be removed manually
  4. filters of type */dir/subdir/* to match any path occurrence are not possible for both exclude and include
  5. not currently supported to include */dir/* everywhere in path (but it is supported by exclude filter)
  6. filters must not start with / or */: non predictable results

Screenshot_1590170535

Screenshot_1590170535-2

History List is not always updated

Hi,

Pull request: #173

Steps to reproduce:

  • Delete all History items
  • Switch to SyncTasks TAB
  • perform a sync on one existing SyncTask
  • wait that sync completes
  • back to History TAB

Result: The History entry is not shown until we touch the screen

I pushed a pull request but I am not sure if this is the best way to fix it or better in SyncThread.addHistoryList(...)

Best regards

Add option to manually start Schedules

Pull request: (#180)

Hi,

I had this patch since a few months but with inline code to parse the schedules
I finally found some time to look at the intent and clean it to use the existing timer intent code

This patch enables to start Schedules manually as I really needed that option I was used to in FolderSync and FreeFileSync

When we have a Schedule setup to run many tasks in a specified order, this can be annoying to always manually select the specified tasks when we do not want them to be set on Auto

This patch makes it possible to manually start either All Enabled Schedules or only Some Selected Schedules

Not implemented in the patch / To do:

  • msg entries not added in xml layout: only english in-code (to not conflict with previous pull requests). The final getString from resources code is written but commented
  • I did not add a dedicated intent ACTION label in the manifest, but reused the existing SCHEDULER_INTENT_TIMER_EXPIRED
    I let you decide if you prefer a dedicated intent action
  • I let you decide and enhance if needed the icon I quickly did for my use

Note: I am holding on any further push requests until you are done. I know you are maintaining many repos and that it is an amazing work and a lot of time

Thank you for all your work and best regards

Schedule sync task list view bug

I pushed the code I had stated to work on to implement the part you also tried to fix:

  • on load of schedule sync task list: all sync tasks existing in the schedule are set to checked so that we can see the current sync tasks defined the schedule
  • on first click of an invalid sync task item: uncheck the sync task (unselect) + disable the item so that we can no more select it

We need to override the isEnabled(int position) in the adapter + set the state in setOnItemClicklistener of editSyncTaskList()

I did not find time to dig more into it as it is a part I am not used to
There are good hints here:
https://stackoverflow.com/questions/17919130/how-to-disable-the-particular-list-item-in-list-view-in-android
https://stackoverflow.com/questions/4636270/android-listview-child-view-setenabled-and-setclickable-do-nothing
https://stackoverflow.com/questions/33081181/how-to-set-a-listview-item-as-checked-programmatically-in-a-baseadapter

Hope you can fix it better than I could

Best regards

Bug in result log file names and Sync Task Names

Hi,

I committed a patch (#178) to fix the below issues.
However, please not the following:

  • I did not add the xml msg entries, but only the english text in code to not create a merge conflict with my previous patch
  • I did not fix the root cause of the GUI issue in EditSyncTask described below which needs another patch (create a new scroll view template)

I let you add the above fixes to complete the patch

Issues fixed:

  • result_log txt file cannot have invalid characters else it will fail to sync to or to be saved to FAT32/NTFS or any windows system
    This patch preserves the useful ability to name sync tasks freely while ensuring the result.log file is valid
    We can name a task My Main Sync Task: SDCARD -> NAS/Galaxy S20 while ensuring the log file name remains valid
    Limiting the sync task name chars like FolderSync is very limiting I think and this is a good approach
  • fix result_log file name length could exceed 255 chars (linux doesn't allow usually longer file names)
  • ensure sync task name global length cannot be longer than 150 chars to fix a bug in the EditSyncTask GUI. Also, 150 chars seems more than enough for a sync task name

GUI bug:
When we rename a sync task to a very long name, the view doesn't scroll in EditSyncTask
We end up with something like this that we cannot scroll or change):
Screenshot_1601841646

After my fix, with 150 chars limit on the Nexus S small screen:
Screenshot_1601841736

So 150 chars looks like a nice spot. However, a proper fix to the scroll view is still needed

** Sync task name invalid length fix **
Screenshot_1601841434
Screenshot_1601841438

Many thanks and best regards

filters lack some common media formats

how about adding some additional media formats to the default filters? at least opus, m3u8, mkv and webm... if you don't mind i've compiled a list of (more and less common) formats/extensions, which are missing.

audio files: *.opus; *.spx (Speex); *.oga, *.ogm (2 not so common ogg extensoins); *.mka (Matroska-audio); *.m4b (mp4-audiobooks)
playlists: *.m3u8 (utf8-variant of m3u); *.xspf (spiff: XML Shareable Playlist Format); *.pls (ini-playlist)
images: *.jfif, *.jif, *.jfi (3 not so common jpeg extensions like *.jpe); *.svgz (compressed svg)
videos: *.mkv (Matroska); *.webm; *.m4v (not so common mp4-video extension)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.