Revision [643]

This is an old revision of phases made by AdminUser on 2015-04-11 13:23:30.

 

Phases of the synchronization process


This is a simplified look behind the script to show you the phases of the synchronization process. Some optional steps are missing.

Phase 1: Read command line
Sure we need some information what to do and where to get detailed instructions. For this the command line is read.

Phase 2: Read configuration file
Detailed instructions for the synchronization to the selected target is located in the configuration file. This stuff is loaded into memory and some basic plausibility checks are made.

Phase 3: Prepare media for analysis
Script will make use or file attibute A to mark existing files on the target as 'good' . Therefore file attributes in all corresponding folders of the target will be set to a uniform mask.

Phase 4: Analyse Medialibrary
If instructed by command line the Medialibrary is filtered for the selected audio files. Each file is matched against the defined rule-sets (loaded in step 2) to get the destination file-path, format and size on the target.
If this file is missing on the target a 'flag-file' is created (see below). If it is there, the format and/or size is checked. If the existing file is fine, it will be marked as 'good'.
As a result the script will have marked all 'good' Medialibrary files on the target and will have lists of files that will be copied / converted.

Phase 5: Analyse Playlists
Same as last phase, but for your playlists. Which playlists to analyse/sync are known from step 2. All playlists are processed and their items are checked against the rules.
At this phase the new m3u-files are created too (because we know, where the playlist items will be saeved after sync). There will be a check against the files from step 4 in near future. This will save extra space on target and save time by pointing to those files from step 4 if the audio source file is identical.

Phase 5: Show statistics
After the analysis the amount of files to copy and/or convert is known. Also we know about the needed space on target. And finally there are 'flag-files' in the folder/file-structure. Therefore the script will pause to give you a chance to check. Very useful if you made changes configuration file of the target.

Phase 6: Erase orphant stuff
If you did use option 't' in parameter tasks, the script will remove all flag-files and all empty folders in the destination folders and then end (because it was a test). If it wasn't a test, all files that do not belong to your sync and/or are outdated (wrong bitrate/codec) are deleted.

Phase 7: Copy files
Now all files where NO convertion is needed are copied to their destination paths.

Phase 8: Convert files
Files that need convertion are converted.

That's it!


- Check out the other Pages, that belong to the wiki-category Documentation !
- Ask and discuss at the FoobarSync discussion thread on Hydrogenaudio Forums
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki