-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature "sync shared" #1978
Feature "sync shared" #1978
Conversation
unquoted "is set" check fails if var is not set and if-statement has a following check. Further the preceding "is empty" check is sufficient in this case.
…er nicht existent)
Enabled Flag hinzugefuegt, mit fruehem ausstieg. rsync command ignoriert nun hinzufuegen der "folder.conf" als Aenderung. - hierdurch sync nicht nur bei erstem Scan sondern immer moeglich Ordner auf Remote werden initialisiert wenn nicht vorhanden.
Uunveraenderte Dateien werden uebersprungen (--update). Permissions ignoriert (--np-perms). folder.conf als Aenderung ignoriert (--exclude). Nachtraegliches Setzen der Persmission korrigiert.
Added full synchronisation on rfid scan. Changed rsync option to correctly sync files and ignore 'folder.conf' and 'placholder' file
Command for changing acticvation of 'cync on rfid scan'
Sync folder.conf from server, but dont delete it if only present on phoniebox (except folder will be deleted)
added function for changing access of files/folder changed definition of SYNC*PATH variables
Make sure the path variables are alike and dont have a trailing slash moved command handling to funtions moved rsync to single function moved server check to funtion
added special thanks section
Hi, thanks for improving Phoniebox 🙏 We will review the PR :) and are probably happy to add this feature. please be aware that we are intending to move to Phoniebox 3 (future3 branches), which is an all python implementation. So you might want to consider to implement the feature there. |
Thank you too for this great project :) |
To be honest there is no clear "schedule" when version 3 will be the new stable. |
@AlvinSchiller, can you have a look? |
@s-martin Merged it |
Note: we need to update the wiki as well after merging this PR: https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Sychnronising-Phonieboxes-in-a-local-network |
* removed "is set" check (#) unquoted "is set" check fails if var is not set and if-statement has a following check. Further the preceding "is empty" check is sufficient in this case. * Sync fuer shortcuts und audiofile von lokalem Ordner (wenn Datei/Ordner nicht existent) * chmod und chown korrigiert. update mpc angepasst * sync in eigenes Script ausgelagert * Settings in conf ausgelagert. Weitere Anpassungen im Abluaf Enabled Flag hinzugefuegt, mit fruehem ausstieg. rsync command ignoriert nun hinzufuegen der "folder.conf" als Aenderung. - hierdurch sync nicht nur bei erstem Scan sondern immer moeglich Ordner auf Remote werden initialisiert wenn nicht vorhanden. * Synchronisierung korrigiert Uunveraenderte Dateien werden uebersprungen (--update). Permissions ignoriert (--np-perms). folder.conf als Aenderung ignoriert (--exclude). Nachtraegliches Setzen der Persmission korrigiert. * gitignore erweitert * Sync Shared als Componente ausgelagert * Sync Shared Flag angepasst * Skripte Pfade und Aufrufe korrigiert * Skript Name angepasst * Install Skript hinzugefuegt * ReadMe hinzugefuegt * New feature 'full sync'. rsync options corrected Added full synchronisation on rfid scan. Changed rsync option to correctly sync files and ignore 'folder.conf' and 'placholder' file * Added DEBUG_sync_shared_sh to WebUi * Added new Feature Command for changing acticvation of 'cync on rfid scan' * corrected description of new Command * Timeout for server check added to settings * Added script for configuration. Improved installation * Adjusted sync rules for folder.conf Sync folder.conf from server, but dont delete it if only present on phoniebox (except folder will be deleted) * Added Readme * Readme adjusted * Readme adjusted * refactored sync script. * changed definition of owner and rights in setup conf * refactored sync script added function for changing access of files/folder changed definition of SYNC*PATH variables * refactoring and path handling Make sure the path variables are alike and dont have a trailing slash moved command handling to funtions moved rsync to single function moved server check to funtion * removed leftover var * new rfid commands harmonised * minor corrections * Added synchronisation mode SSH config updated for new settings * Settings sample updated * Exclude special folders from syncing * renamed folder sync-shared-from-server to sync-shared Updated README.md * refactored commands to playout_control.sh fullsync and changeOnRfidScan refactored to playout_controls.sh * fixed exec_for_mode for paths with whitespaces * use consinstent quotation * use consistent var access * removed unused logic * added documentation comments to conf file * reordered conf and updated README * updated README * refactored function definition * fixed sync_from_server for paths with whitespaces * applied editorconfig * applied filename convention * refactored filepath to var * updated README added special thanks section * fixed db update after sync for spotify version * install packages for openssh-client added * updated comments * Update README.md * fixed logic for subfolder shortcuts * Update README.md
I added a component to sync the shared files (shortcut and audiofolders) from a remote server via a mounted share or ssh.
It allows to manage the shortcuts and audiofiles of one to many Phonieboxes in a central place (e.g. NAS, one main Phoniebox, ...) in the network, but keeps the possibility to play audio offline once the data where synced.
There is a "full-sync" command that can be bound to an CardId and an optional "sync-on-rfid-scan" feature which syncs only the files for a CardId on scan (shortcuts and and the corresponding audiofolder). The "sync-on-rfid-scan" feature can also be enabled/disabled with a command bound to an CardId.
See "components/synchronisation/sync-shared/README.md" for further details.