Miyazaki DVDs and Blu-rays

I finished watching the last episode of 10 Years with Hayao Miyazaki last night. (I mentioned the series in my last post.) The first couple of episodes concentrated mostly on Ponyo. The last couple covered The Wind Rises, which is likely to be Miyazaki’s final film. They also covered From Up on Poppy Hill, directed by Miyazaki’s son Gorō Miyazaki. (The series spends some time on that father/son relationship. It’s a bit prickly.)

Anyway, watching this got me interested in watching some Ghibli films again, so I starting poking through my DVDs to see what I had. I was surprised to see that I apparently only own three Miyazaki films: Castle of Cagliostro, Castle in the Sky, and Princess Mononoke. I could have sworn I owned a copy of Spirited Away, but I can’t find it anywhere, nor can I find any indication in my email archives that I ever bought a copy. So I think I was mistaken there. And I also remember owning Kiki’s Delivery Service, but that might have been on VHS.

So now I’m thinking it might be a good idea to rectify that in some way. Back in 2015, there was a big Blu-ray set of The Collected Works of Hayao Miyazaki, available exclusively on Amazon, for $225. I probably should have bought it back then, since it’s going for $600 now. (It looks like it was a pretty nice set.)

Looking at the state of Ghibli/Miyazaki films in the US right now, I see that the rights for most of them moved from Disney to an outfit called GKIDS in 2017. I was vaguely aware of that already, but hadn’t bought any of their releases. I see that they have a number of films available right now, including an “anniversary edition” of My Neighbor Totoro and a “collector’s edition” of Princess Mononoke, both of which look pretty cool.

I’m kind of trying to cut down on my accumulation of physical media though, so I checked to see if any of this stuff was available to rent or buy digitally. I was surprised to see that none of it was available on iTunes, nor does any of the GKIDS stuff seem to available digitally at all. I found a bit of discussion related to that on reddit. I guess it makes sense, though it would be nice to be able to rent a few of the films I haven’t seen, but that I’m not interested in owning.

GKIDS and Fathom Events are still doing their Studio Ghibli Fest thing. Looking at the schedule for the rest of the year, they’re mostly doing one movie per month, generally near the end of the month. I could actually go see My Neighbor Totoro tomorrow night. But it’s a pain for me to do that kind of thing on a weeknight.

So it wasn’t looking like I was going to be able to catch up on Miyazaki films without spending a bunch of money on Blu-rays. But then I checked my local library system, and they have a bunch of Miyazaki DVDs, so maybe I’ll start checking them out of the library and watching them that way.

playing with Volumio and organizing my music

Without really intending to, I would up spending a bunch of time today organizing my music collection and copying stuff over to my little Volumio box. I set up Volumio about a year ago, and still haven’t quite finished copying music over to it. But I’m now all the way through to the letter “P”, so that’s pretty good. I don’t use the thing too often, but I use it enough to justify the time I spent setting it up, I think.

My adventures today started out with a desire to listen to the Gorillaz album Plastic Beach last night. I was pretty sure I had it on CD, but I couldn’t find it anywhere, nor did I have it ripped on my Mac or PC. After spending too much time looking around for it this morning, I decided to just buy a new copy of the CD. So I wouldn’t have two copies of exactly the same thing, I bought a used copy of the “experience edition” version on eBay, which should include a bonus DVD. (I’m really not sure if I ever actually had a copy, but I think I did.)

That got me interested in getting back to organizing my MP3s and CDs a bit more, and copying more stuff over to the Volumio box. I got through the letters “O” and “P” today. There’s wasn’t much under “O”, but there was a lot under “P”, including Paul McCartney, Pink Floyd, and Phish!

My McCartney collection was a little disorganized, so I tried to fix that up. I found that I had exactly one song in there that was a DRM’d iTunes file. I thought I had replaced all of those with the DRM-free versions quite some time ago, but I guess I missed this one somehow. Normally, this wouldn’t bug me at all, since I can listen to it on my Mac, PC, and iPhone, no problem. But Volumio, of course, can’t handle DRM’d files. There’s supposed to be a way now to delete and re-download a track in iTunes, in such a way that you replace the DRM’d file with a DRM-free version. But I couldn’t get that to work. I just kept getting the same DRM’d file. I thought about just buying a new MP3 copy of the song from Amazon for $1.29, but decided to just live with it for now. I get the feeling that it’s going to bug me enough that I’ll eventually do something about it, though I’m not sure what.

And, when I got to Phish, I remembered that I had a copy of the Live Phish 01 two-CD set that got ruined by spending too much time in the trunk of my car. The “Live Phish” series of CDs were packaged in a weird way; the CDs are in a folded plastic page that can be inserted in a binder. It’s kind of nifty, but if you leave it in the heat for too long, the plastic melts a bit and adheres to the CDs, rendering them useless. And I’d never ripped those CDs. So, today, I decided to just go ahead and buy the FLACs for that concert from LivePhish.com. So now I have those CDs back, but in FLAC form. And FLACs play fine through Volumio, so that’s good. (I’m listening to it right now, and it sounds nice.) If I want to listen to it in my car, though, I need to figure out how to press FLACs to CD, or convert them to MP3 or something like that. It’s been a while since I was on a FLAC kick. I did a little research on that, to refresh my memory, but decided that I didn’t want to go too far down that particular rabbit hole today. Maybe tomorrow!

paying my bills. (or not.)

I’ve moved almost entirely to paying my monthly bills online, and receiving the bills online. I’ve been doing it slowly and carefully though. I only just recently gave my electric company the OK to send my bill electronically. I just went online to download the first one, though, and I got a message saying “Error: Injection found.” Well, that’s not very reassuring! I assume the “injection” they’re referring to is SQL injection. If I try to log in via their home page, it says they’re “making some upgrades.” I hope that’s true and it’s not that they’re madly scrambling away trying to clean up after a successful SQL injection attack. Either way, if I’d just kept receiving my bills on paper, I’d have paid that one by now, instead of having to defer it until tomorrow or Monday.

Stumbling my way through the Drupal API

I’ve had to fix some interesting problems at work recently, related to a Drupal site that we’ll be rolling out soon. I just finished fixing one issue that, while seemingly minor, took quite a while to figure out.

I’m really glad to have come up with a good solution. The thing that amuses me most about this is that, after more than eight hours of messing around, the final solution involved writing only about a half-dozen lines of code.

The problem, in a nutshell, is that we have a content type in the system that represents a university. There’s a location field on each node with, minimally, city and country specified. The user can search for locations, using some custom search code, and the search results are displayed via a standard Drupal view. We allow the user to sort the results by one of a few different fields, with the sort drop-down exposed from the view. This works fine, except when sorting by country. On the location record, only the two-letter country code is stored, for instance “AE” for “United Arab Emirates”. So, when you sort by country, it’s really sorting on country code, so “AE” goes to the top, which isn’t really what the client wanted.

Of course, the first thing I did was Google the problem. I found this issue discussion, which pretty much matches my problem. There was a suggestion in the comments there about using hook_views_pre_render to re-sort the results right before displaying them. That works great, if you’re not paging results. But, if you’re pulling results back one page at a time from a large result set, this doesn’t work, since the pre-render hook only gives you the current page.

So I figured out that I really need to sort by country name at the SQL level, while retrieving results. This led to my next problem, which is that, even with the location module installed, there’s no SQL country lookup table in Drupal. The list of country codes and names is just stored in code, in an array, which can be retrieved via _country_get_predefined_list. (You shouldn’t call that directly, though, of course; you should use country_get_list.)

So off I went to find a module that could give me a SQL table with country info in it. The countries module does that, and a bit more. So, I installed that and figured out where the country table was. Then, my next blind alley was figuring out how to join to the new country table in a view. I was hoping I could just add a join to it in the view definition, and go from there. Well, I still don’t know that much about Drupal views, and it didn’t seem possible to do that easily.

So, the next blind alley was to see if I could alter the view SQL with hook_views_query_alter, which seemed sensible. Well, the query object that you get from that hook isn’t a nice simple query object that can easily be changed, so that turned out to be another dead end. (It’s likely possible that I could have figured it out, but it seemed like the wrong approach.)

Then, finally, I stumbled across this SO question. The one answer posted there led me in the direction of modifying the query with hook_query_alter, which can be used to modify just about any query Drupal issues to MySQL. So, finally, I found a workable solution.

hasAllTags('views', 'views_university_search')) {
    $ord =& $query->getOrderBy();
    if (array_key_exists('location_country', $ord)) {
      $query->addJoin('INNER', 'countries_country', 'cc', 'cc.iso2 = location.country');
      $ord = array('cc.name' => $ord['location_country']);
    }
  }
}

So that’s it. I add a join, and replace the ‘order by’ clause. About a half-dozen lines of code. Oh, and I now also understand passing by reference in PHP a little better too!

Vista: almost done

I’m nearly done moving all my stuff over to the Vista install on my desktop machine. I de-authorized iTunes under XP, so I can use it under Vista. I moved my OneNote files over. Almost all of my key programs are installed and working now.

I’m installing Visual Studio 2008 right now. I haven’t used VS 2008 before, so hopefully I can spend some time playing around with it now. I don’t think I’m going to bother installing any older versions of VS. I don’t really have any independent projects in .Net 1.1 or 2.0 that I need to worry about supporting.

I have Delphi 4 on my XP drive, and I have one fairly important program written in it: the database program that I use to manage my comic book collection. This is a program that I first wrote in BASIC on the Commodore 64, and have ported (or rewritten) several times. It’s probably time to rewrite it again, this time as a Windows Forms app in C#, maybe. I’ll have to see if I can even get the existing Delphi program running under Vista. I never really made an installer for it, and I think I may have used a weird library or two.

I think rewriting an old Delphi app in C# is particularly apropos, since I’ll basically be following Anders Hejlsberg from Borland to Microsoft. I considered upgrading the project from Delphi 4 to the newest version of Delphi, but I don’t see much point in spending time on that right now, since Delphi programming doesn’t seem to be a marketable skill anymore. And the new version of Delphi costs a minimum of $400, whereas I got a free copy of VS 2008 from Microsoft when I went to the launch event a few months back.