Fixing Total Tracks and Removing Album Artist in iTunes

iTunes seems to have a bug if you edit the album artists on an album, it blows away the total number of tracks for a song. I had a bunch of songs that had album artists for half the tracks in the album but not the others, which cased all sorts of havoc when trying to play an album since iTunes can’t figure out the order to play them in any more.

I wrote up a little script to remove the Album Arist and also to fix up any places where the total number of tracks for a song is incorrect. It looks at the other tracks for the album to find what the correct total should be, so it’s only useful if at least one track in the album has the correct total.

I put the script up on Pastie, http://pastie.caboo.se/72537, and also below. It’s not the fastest thing, but it works (for me). Use at your own risk, I’m not responsible, yadda yadda yadda.

var   iTunesApp = WScript.CreateObject("iTunes.Application");
var   mainLibrary = iTunesApp.LibraryPlaylist;
var   tracks = mainLibrary.Tracks;
var   i;
var allAlbumsToArtist = new Array();
var allAlbumsToTrackCount = new Array();
 

for (i = 1; i <= tracks.Count; i++)
{

        var   currTrack = tracks.Item(i);
        allAlbumsToArtist[currTrack.Album] = currTrack.Artist;

        if(currTrack.TrackCount > 0)
        {
                allAlbumsToTrackCount[currTrack.Album] = currTrack.TrackCount;
        }

}

for (i = 1; i <= tracks.Count; i++)
{
        var currTrack = tracks.Item(i);
        WScript.Echo ("removing album aritst for  " + currTrack.Name);
        currTrack.AlbumArtist = "";
}

for (i = 1; i <= tracks.Count; i++)
{
        var   currTrack = tracks.Item(i);
        if(!(currTrack.TrackCount > 0))
        {
                var totalTracks = allAlbumsToTrackCount[currTrack.Album];
                if(totalTracks > 0)
                {
                        WScript.Echo ("changing  " + currTrack.Name + " to total tracks " + totalTracks);                
                        currTrack.TrackCount = totalTracks;
                }
        }
}
278 Words

Northern California Water

While I’m typically not one to participate in the “NorCal” versus “SoCal” battle (having lived extended amounts of time in both), there is one thing that Northern California has that is unbeatable: the water. Tap water here tastes so good. It came back to my mind after drinking tap water in San Diego, which tasted metallic, odd and just not very good. Up here in SF, the water supply from the tap is as good as anything bought in a bottle, or even better. It has that almost buttery quality. Yum.

91 Words

Last Weekend in San Diego

Last weekend a couple of us went down to San Diego for Austin’s bachlor party. Dan and I got in late on Friday and we managed to catch a late showing of Spiderman 3 (awful by the way). Saturday got started nice and early at 8am at Pipes, then we drove to Ramona and spent until about 4pm paintballing. It was my first time going and it turned out a lot more fun then I thought it’d be.

I didn’t get terribly bruised up thankfully although I did take quite a few shots. Austin’s right arm and back ended up blue and purple. We calculated given the amount of games we played and the amount of ammo shot, we had a 1.4% hit rate. Pretty pathetic showing on our part, but it was still a whole lot of fun.

After checking splitting up for a few hours in the afternoon our group reconvened in Gaslamp for dinner and barhopping. Downtown San Diego is quite a bit cooler than I remember it before. Lots of new bars, places to eat, condos, etc and totally happening. It was wierd to be back in San Diego; I havn’t been down in some two years or so, which made it even more interesting to see how things had changed, how things haden’t and to drive around. As Dan and I were going between different locations like Solano Beach, Del Mar, Gaslamp, UTC, etc it reminded us a lot driving between neighbourhoods in SF except that you have to reach the ones in SD by car and freeways. Being back down really brought on a sense of nostaliga, too.

Sunday we hit up Cody’s for lunch and then hung out with some of our friends in the Solano Beach area before we had dinner with Austin and then got on our flight back to Oakland. Great trip and I get to go back down in three weeks for the wedding (but not before Vegas with the old high school gang this weekend!). Pictures from the bachlor party are posted, too.

343 Words

My Three Week Flirtation with the Motorola Q

Being back in SF and wanting to be part of the hip and cool crowd, I went out and purchased a Blackberry-esque phone, the Motorola Q on Sprint. I can’t actually get a Blackberry since Microsoft’s mail system does not run a Blackberry Enterprise Server, which is required to have them work with Exchange email (and running the desktop client breaks company policy of having company data pushed outside the org).

At first, I was overjoyed to have my email, my calendar and contacts all on phone at all times. Having the Calendar was fantastic, it let me keep myself up to date with my life and update things as I needed to. I use my Calendar religiously to keep track of my work and personal lives so having it with me was very valuable. After about the first hour of using the phone, the joy wore off and reality sunk in. The phone barley works.

The list of the problems is too many to enumerate, but I’ll give the highlights. The buttons would stop responding. I would click something, the UI would flash that it received the press and then it did nothing. Clicking “Home” would at times do nothing. I could type faster than the screen could draw. It would send 200 text messages when I wanted to send one. The right thumb scroller just doesn’t work. Pushing the “Talk” button to pick up the phone would hang up on the caller half the time. The battery didn’t charge half the time. I would leave it in the charger overnight only to find it give me an a battery empty alert within minutes. The UI for Windows Mobile 5 is inconsistent, unreliable and non-predictable. Each part of it would act in a different way. It was never able to coordinate the vibrate and ring function (e.g. it would start vibrating a full 5 seconds before the ringer started). I could keep going ad infinitum.

End of the story is I returned it this weekend and I’m back to a non-smart, very-dumb, but at least it works Samsung flip phone.

349 Words

The Ideal Career

Omar pointed me to this great Venn diagram of your ideal career and when to know you’re in the wrong spot or should be looking.

 

26 Words

T-Line

The new Third Street light rail opened up this weekend. It’s been pretty uneven service the last few days, both getting from Embarcadero and Folsom (where I live) to the Sunset and to Caltrain. Going outbound to the Sunset there were all kinds of backups of cars, bunching and other problems in signaling it seemed that made a 30 minute trip in to 1.5 hours. Plus, I had to change lines now (!!) becuase N doesn’t go past the Embarcadero any more so I had to take a S/T/J train and change.

SFist and the Chronicle both have more in depth coverage of what will hopefully be a short lived growing pain.

111 Words

Craigslist + RSS + Outlook Search Folders

The search function on Craigslist is a bit hard to use and not that powerful if you’re looking in multiple neighbourhoods. Since I’m looking for an apartment in SF in multiple locations, I got an RSS feed out of Craigslist for my maximum price and minimum bedroom requirement and imported that in to Outlook.

At first, I was just using that Outlook to browse the feed, which wasn’t that helpful since I got all the results of place I didn’t care to live in. So I created a search folder with the critera of contains:(“pacific heights” OR “hayes valley” OR “pac heights” OR “nob hill” OR “lower pac” OR “SOMA” OR “south beach”). Bingo bango, all the places I want, in my price range in my neighbourhoods updated automatically from Craigslist directly in my Outlook. Can’t beat that.

139 Words

Zocalo and Teotihuacan and the Last Day of Vacation

I forced Jamus to wake up early yesterday in order to maximize the amount of time we had seeing Mexico City. After a breakfast of fried tortilla chips, cheese and some salsa verde (I can’t recall the name) we headed from our hotel (on Isabel la Catholica) to the Zocalo, the central square of Mexico City. It’s an imposing sight, with the huge cathedral on one side, the National Palace and other such buildings on all flanks. As we walked through the general Historical Centre district old well preserved colonial buildings were everywhere. A bunch of the museums in the area (which we didn’t get time to see) were housed in these buildings.

Our plan for the day was to head to Teotihuacan, the pyramid most recently used by the Aztecs. Since we only had the day, we took the subway over to the North Bus Station to catch a bus to the complex. The subway system in Mexico City is awesome. To start, it’s two pesos (roughly $0.20) to go anywhere on the map. No worrying about transfers or zones or anything. Just two pesos and go. The signage is unlike any I’ve seen before. Each station has a unique icon and the lines have both numbers and colors. So when you’re on a train car and looking at the line map inside, the icons are there for each station, and if it’s a transfer station they are half (or one third) colored with the connection’s line color. The fonts and colors used in the labeling are also very 70s-ish, but in a way that does not look tacky instead looking like it was intentional. Lastly, the train cars were those not-often-seen rubber tire types like you see in some lines in Paris. All the rolling stock looked exactly the same across lines, which is also unusual (Bombardier manufactured).

The last line we transferred too was shut down during the weekend for work, but they had bus replacement service, which we took to the Autobus station and bought tickets for Teotihuacan. The ride was short (I slept for most of it) and we started to explore the area around Teotihuacan. Jamus and I both felt, that while imposing and grand, the temples of Teotihuacan seem to pale in comparison to the ones on the Yucatan. The Temple of the Sun is undoubtedly huge (third largest in the world) and took quite a bit of effort to scale, and the Temple of the Moon quite attractive and more interestingly appointed. But in general, they just didn’t seem as elaborate as those of the Mayans. In any case, we spent a good amount of time walking and exploring the grounds, many of which you could see excavated apartments and homes, which were definitely cool.

We left Teotihuacan around 430 and found a bus heading back to Mexico City. While waiting, we ran in to some Japanese guys who asked Jamus where to buy bus tickets in excellent Spanish. We were quite amused by the exchange. On our way back, we got out at a bus stop too early since we saw a running metro line near were the bus pulled over. Figuring that it was close enough, we got off and ended up stuck at some other bus station. After some searching we managed to find the entrance to the metro and got some tasty beans/cheese/onion tostadas from a street vendor. We made our way back to the Zocalo where there were a some random Saturday festivities going on. We stayed and watched them for a while, then headed back to our hotel.

For dinner, we ended up at a hole in the wall where I ordered some sopas with queso Oxhaca and a gordita. Tasty for sure although super oily. Food in Mexico did not disappoint at all. After dinner we went back to the Zocalo and went to the rooftop bar/restaurant of the Hotel Majestic (owned/operated by Best Western, gag) to have a drink overlooking the streets below.

Thus ends five weeks of traveling around the world. Starting in Shanghai, to New Delhi, to Mumbai, to London, to New Jersey, to Nicaragua, Costa Rica, and to Mexico City, I’m on the flight heading back. I can’t complain much, having had such an awesome trip and now returning home in style. I’ll post some of the cool pictures to the blog later this week.

736 Words

A Very Long Day Getting to Mexico City

originally posted 24 march 07, 7:14am.

RedYawning is down again, so this is going to be posted on LiveJournal until RY is back up.

Yesterday morning we did a walking around tour of San Jose and ended upon the Post Office and what seemed like a few of the central square-ish places. The people in San Jose were quite attractive, compared to some of the other places we have been. The post office itself was cool with a colonial exterior and the inside was a bit cavernous. We got brunch at this little hole in the wall on the street somewhere (good memory, eh?). For me, it was a fantastic plate of a fried egg, rice and beans (gallio pinto), and tortillas.

Our flight to Mexico City was long and pretty uneventful. We arrived at the airport in San Jose around 1pm and did not arrive at the hotel in Mexico City until about 1230am. The first flight was short and landed us in Panama City, where I took some cool pictures of the Panama Canal. While not very impressive from 10,000 feet, the sheer number of boats and ships that are in the waters in the area near it is unlike anything I have ever seen. The flight out of Panama City was delayed an hour after they had boarded us already and we had to deplane. When the flight arrived, it arrived on the complete other side of the airport so we had to walk for something like 20 minutes to get to imigration. Plus, the imigration agent only gave me a 30 day entry visa while Jamus got 90 days. Go figure.

Today we head out to the huge pyrimad complex that is near MX city. I cannot recall the name but it is supposed to have the third largest pyrimaid in the world. Ruins! Then back to SF tomorrow am.

308 Words