Colon Files: rsync-tr

I was copying over some music to my phone (via jmtpfs and rsync), and I noticed that some of the files failed with “Input/output error”:

After a while it dawned on me what all these files had in common was that there’s a colon in the file names. And presumably the MicroSD card in the phone uses a VFAT file system, and those file systems don’t like colons in the file names at all.

So I thought: Surely there’s a simple switch I can give to rsync to translate file name characters. I mean, this problem can’t be that obscure: We’ve been copying media files to devices that use VFAT file systems for decades now.

But after reading the man page and Googling for hours: rsync doesn’t support this. I mean, I can somewhat understand why. Whatever you’re doing is going to be pretty hackish. You could get file name collisions or inconsistent rsyncs, perhaps. On the other hand, these devices are the end point for these files: We don’t really care much about the names…

It turns out that Matt McCutchen wrote a patch in 2007 that was never accepted. It adds a simple –tr :/- syntax that does exactly what I need.

The patch no longer applies cleanly, but it’s surprising how little work was needed to shoehorn it into the current rsync source code. They’ve obviously retained the basic structure of the files and the repo, for which I am thankful.

I put the resulting git fork up on Microsoft Github.

And there’s a few other gotchas when rsyncing to VFAT: It doesn’t support all the Linux file system flags or renaming in the way rsync does by default, so for reference, here’s the complete command line I ended up with that will (sort of) reliably copy over new files to my phone:

~/src/rsync/rsync -atvL \
  --tr ':?"/-!' --inplace \
  --ignore-existing \
  /music/picks/ /mnt/sony/SD\ card/Android/music/

Your mileage will vary.

wordpress.com is annoying

I’ve got some blogs hosted on wordpress.com, and when I looked at the stats for one of them today, this thing popped up:

Wha… My blog isn’t “set up” unless I signed up for some weird Google product?

When I click on that link I get this:

There’s no way to say “I don’t fucking care about any of this”.

So now I guess I just have to live with half the screen on the stats page being taken up by a Google ad without any way to make it go away.

What the fuck, WordPress.com? These are the offputting upsell strategies expected of corporations like Network Solutions (who anybody sensible have severed ties with); not of Automattic.

unsilence

Hidden tracks on CDs used to be a pretty common thing. Not “real” hidden tracks: You could play tricks with the directory structure and put a track before the first one, so you have to skip back from 1 to get to 0.

No, the common way to do this is to pad the final track with, say, ten minutes of silence, and then the “hidden” song starts.

While the concept of hidden tracks is fun, in practice it’s really annoying, because it means that you’re sitting there listening to silence for ten minutes.

So once upon a time I wrote a little C program that would look for silences in the last track of all the CDs I have ripped, and if it finds (long) silences, then splitting happens.

As CDs are getting less popular as a means of distribution (to put it mildly), the hidden track thing has all but disappeared, too, but this week I got
the new Deathcrush album, and it employs this tactic.

I started looking around for the scripts to split the file, and then I discovered that it was in an obscure region of my home directory, not touched for ten years, and not put on Microsoft Github.

But now it is.

It’s probably a couple of decades too late to be useful to anybody, but there you go. It compiles and everything on the current Debian, which just amazes me. I mean, I wrote it in… like… 2003?

Go Linux.

NFLX2019 April 19th: Music Teacher

Music Teacher. Sarthak Dasgupta. 2019. ☆☆☆★★★

I’ve been following the “drama” and “comedy” lists here and thinking that I was getting all the Netflix Originals. But then I noticed that I wasn’t getting “The Silence”, which I thought was a Netflix Original.

It turns out that it’s on this list instead, which is a list of movies Netflix doesn’t have distribution rights for in all markets. So is it a “Netflix” movie? Uhm…

If I’d know about this before I started, I would have added those movies to the plan, but I didn’t, and now it’s too late, so we’ll go with the original definition of “Originals”.

Besides, that stupid table doesn’t include any release years, annoyingly enough. And why is it split into all these sub-tables anyway instead of just adding more columns to segment and then people can sort as they want?

Gah.

ANYWAY. This movie!

Oh, it’s another Indian movie. Is this the first one in Hindi that I’ve seen in this blog series?

Most of the previous ones have been “social issue” movies, but this looks like it might be slightly more entertainment oriented…

Oh! And now he started singing! This is the first musical in this blog
series! Yay!

Or… perhaps it’s not a musical: The protagonist is a music teacher, so there’s a few natural chances to drop in some singing here and there without going full dance production.

This is a very good-looking movie: It’s got fabulous locations, sensitive cinematography and attractive and convincing actors.

It’s got a very simple plot of longing and love and regret and envy and is easy on the brain. I like it, but I feel it insisted on some bits for way too long.

And the denouement when we finally get to see this fabulously famous singer is a let-down because it’s autotuned and melodyned to death and the show looks kinda cheap.

This post is part of the NFLX2019 blog series.