Skip to content
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

How to rsync between /Volumes/iTunesFS/ and your USB MP3 player #5

Open
porg opened this issue May 30, 2022 · 2 comments
Open

How to rsync between /Volumes/iTunesFS/ and your USB MP3 player #5

porg opened this issue May 30, 2022 · 2 comments
Labels

Comments

@porg
Copy link

porg commented May 30, 2022

rsync --recursive --verbose --itemize-changes --modify-window=2 --exclude "PlaylistsTrackFormat.txt" --delete /Volumes/iTunesFS/Playlists/By-Device/mp3-player/ /Volumes/MP3-PLAYER-VOLUME/My-Playlist/

Explanations

  • I do not use rsync's commonplace -a --archive flag, because the whole Unix stuff which is included in --archive (owner, group, permissions) will always differ if the destination is a FAT formatted drive, which is the case for most mp3 players.

  • --exclude "PlaylistsTrackFormat.txt" because we don't needs them at the destination. Some very dumb and chunky players may even choke on a text file and abort playback. More clever ones will skip it. But by excluding it in the sync we avoid that problem beforehand.

  • --modify-window=2 because --modify-window=0 is too strict, because due to FAT's lower time resolution for the timestamps will often differ even though it it's the same unchanged file.

  • Alternatively you can simply use --ignore-existing instead of --modify-window. Then any file which is already at the destination with this name is assumed as being same as on the source and skipped. Should you have updated an MP3's cover art or ID3 tags these changes would be undetected. But to simply compare by filename is the most rudimentary comparison, which may be handy for some use cases.

  • Beware that in your iTunesFS file naming scheme you use %(playlistNumber) then if you change the track order in a playlist, the filename changes and is considered as new, even though it is the same. If you just delete a single track from such a playlist all tracks thereafter have their playlistNumber shifted and would re-copy on the next sync!

Closing Words

@users: I hope this hints may be handy for you.

@znek : Feel free to integrate this to Readme.me or the projects's website's FAQ.

@porg
Copy link
Author

porg commented May 30, 2022

As I learned and positively tested meanwhile:

@porg porg closed this as completed May 30, 2022
@porg porg reopened this May 30, 2022
@porg
Copy link
Author

porg commented May 30, 2022

  • Leaving this open as a reminder to may include this in the Readme and FAQ.
  • Feel free to close when you see fit.

@znek znek added the FAQ label May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants