Created
September 20, 2010 07:56
-
-
Save ecerulm/587564 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Adjust volume and eq setting of podcasts and audiobooks | |
* http://rubenlaguna.com/wp | |
* Jscript file must be run with Windows wscript.exe | |
* Based on a script by Otto - http://ottodestruct.com | |
*/ | |
var iTunesApp = WScript.CreateObject("iTunes.Application"); | |
var ITTrackKindFile = 1; | |
var tracks = iTunesApp.LibraryPlaylist.Tracks; | |
var numTracks = tracks.Count; | |
var changedTracks = 0; | |
var i; | |
for (i = 1; i <= numTracks; i++) | |
{ | |
var currTrack = tracks.Item(i); | |
// is this a file track? | |
if (currTrack.Kind == ITTrackKindFile) | |
{ | |
try { | |
if ("Podcast" == currTrack.Genre || "Audiobook" == currTrack.Genre) { | |
currTrack.EQ = "Spoken word"; | |
currTrack.VolumeAdjustment = 100; | |
changedTracks++; | |
} | |
} | |
catch(er) | |
{ | |
// ignore these errors | |
WScript.Echo(er); | |
} | |
} | |
} | |
//WScript.Echo(changedTracks + " track changed"); | |
//iTunesApp.Stop(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment