Tuesday, November 20

ITunes: Deleting Dead Tracks From ITunes


I just got a new iPhone and I'm converting my music from Media Player to iTunes.

There are some key differences between these apps.

1. Media Player gets properties off of the actual file or folder. iTunes saves some information in its database and some of it is in the file.

2. Media Player puts an album art file for album art, where iTunes puts the album art in a Album Art folder, then under some convoluted database that doesn't match back to the album. Neither of the players will look for the other, so converting is not fun.

3. iTunes copies files when organizing its library, iTunes copies creating duplicate files. Media Center Moves the files underneath my consolidated library.

4. iTunes doesn't know if the file system deleted a file or a new file exists in the library. Media Player continually looks for new music, pictures and movies.

This is why I found the following code, in the Apple SDK, that will delete dead tracks from you iTunes library.

dim ITTrackKindFile

ITTrackKindFile = 1

dim iTunesApp

set iTunesApp = WScript.CreateObject("iTunes.Application")

dim deletedTracks

deletedTracks = 0

dim mainLibrary

set mainLibrary = iTunesApp.LibraryPlaylist

dim tracks

set tracks = mainLibrary.Tracks

dim numTracks

numTracks = tracks.Count

dim i

while (numTracks <> 0)

dim currTrack

set currTrack = tracks(numTracks)

if ( currTrack.Kind = ITTrackKindFile) then

' yes, does it have an empty location?

if (currTrack.Location = "") then

' yes, delete it

currTrack.Delete()

deletedTracks = deletedTracks + 1

end if

end if

numTracks = numTracks - 1

wend

if (deletedTracks > 0) then

if (deletedTracks = 1) then

WScript.Echo("Removed 1 dead track.")

else

WScript.Echo("Removed " & deletedTracks & " dead tracks." )

end if

else

WScript.Echo("No dead tracks were found.")

end if


Monday, November 19

Saturday, November 10

You might be from Ohio If...




You might be from Ohio (pronounced O-hi-yuh), if...

  • You think all Pro football teams are supposed to wear orange!
  • You know all the 4 seasons: winter, still winter, almost winterand construction.
  • You live less than 30 miles from some college or university.
  • You know what a buckeye really is, and have a recipe for candied ones.
  • "Toward the lake" means "north" and "toward the river" means "south."
  • You know if other Ohioans are from southern or northern Ohio as soon as they open their mouths.
  • You can spell words like Cuyahoga, Olentangy, Bellefontaine,Tuscarawas, Wapakoneta and you know which letter is doubled in Cincinnati.
  • "Vacation! " means spending a day at Cedar Point in the summer and deer hunting in the fall.
  • You measure distance in minutes.
  • Your school classes were canceled because of cold.
  • Your school classes were canceled because of heat.
  • You've had to switch from "heat" to "A/C" in the same day.
  • You know what should be knee-high by the Fourth of July.
  • You end your sentences with an unnecessary preposition. Forexample: "Where's my coat at?"
  • You install security lights on your house and garage and leaveboth unlocked.
  • You think of the major four food groups as corn, pork, beer, and Jell-O salad with marshmallows.
  • You carry jumper cables in your car.
  • You know what 'pop' is.
  • You design your kid's Halloween costume to fit over a snowsuit.
  • Driving is better in the winter because the potholes are filledwith snow.
  • You think sexy lingerie is tube socks and a flannel nightgown.
  • The local paper covers national and international headlines onone page but requires six pages for sports.

If you actually get these jokes -- then forward 'em to your OhiO friends!