Permalink
Browse files

new version

  • Loading branch information...
1 parent 5a4de26 commit 9db5eb0cfcdf967f38c9b43c46d576cd6e783420 Alex Ehlke committed May 31, 2010
View
@@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="453"/>
+ <integer value="29"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -58,7 +58,7 @@
</object>
<string key="NSAction">submenuAction:</string>
<object class="NSMenu" key="NSSubmenu" id="110575045">
- <string key="NSTitle">itunesloader</string>
+ <string key="NSTitle">Download to iTunes</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="238522557">
@@ -91,29 +91,29 @@
<reference key="NSOnImage" ref="715147791"/>
<reference key="NSMixedImage" ref="897496305"/>
</object>
- <object class="NSMenuItem" id="493771298">
+ <object class="NSMenuItem" id="501544025">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">Preferences</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="715147791"/>
<reference key="NSMixedImage" ref="897496305"/>
<string key="NSAction">submenuAction:</string>
- <object class="NSMenu" key="NSSubmenu" id="269324606">
+ <object class="NSMenu" key="NSSubmenu" id="631738477">
<string key="NSTitle">Menu</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMenuItem" id="1063068003">
- <reference key="NSMenu" ref="269324606"/>
+ <object class="NSMenuItem" id="329557607">
+ <reference key="NSMenu" ref="631738477"/>
<string key="NSTitle">iTunes manages my library</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<int key="NSState">1</int>
<reference key="NSOnImage" ref="715147791"/>
<reference key="NSMixedImage" ref="897496305"/>
</object>
- <object class="NSMenuItem" id="1023961764">
- <reference key="NSMenu" ref="269324606"/>
+ <object class="NSMenuItem" id="659891338">
+ <reference key="NSMenu" ref="631738477"/>
<string key="NSTitle">Set iTunes library location...</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
@@ -215,6 +215,8 @@
</object>
<object class="NSMenuItem" id="391199113">
<reference key="NSMenu" ref="649796088"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsHidden">YES</bool>
<string key="NSTitle">Help</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
@@ -228,6 +230,8 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="238773614">
<reference key="NSMenu" ref="374024848"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsHidden">YES</bool>
<string key="NSTitle">itunesloader Help</string>
<string key="NSKeyEquiv">?</string>
<int key="NSKeyEquivModMask">1048576</int>
@@ -264,7 +268,7 @@
<object class="NSCustomObject" id="15635064">
<string key="NSClassName">NSFontManager</string>
</object>
- <object class="NSCustomObject" id="288178953">
+ <object class="NSCustomObject" id="162169812">
<string key="NSClassName">controller</string>
</object>
</object>
@@ -330,19 +334,19 @@
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">toggleITunesManagesMyLibrary:</string>
- <reference key="source" ref="288178953"/>
- <reference key="destination" ref="1063068003"/>
+ <reference key="source" ref="162169812"/>
+ <reference key="destination" ref="329557607"/>
</object>
<int key="connectionID">457</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: iTunesManagesMyLibrary</string>
- <reference key="source" ref="1063068003"/>
- <reference key="destination" ref="288178953"/>
+ <reference key="source" ref="329557607"/>
+ <reference key="destination" ref="162169812"/>
<object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="1063068003"/>
- <reference key="NSDestination" ref="288178953"/>
+ <reference key="NSSource" ref="329557607"/>
+ <reference key="NSDestination" ref="162169812"/>
<string key="NSLabel">value: iTunesManagesMyLibrary</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">iTunesManagesMyLibrary</string>
@@ -354,35 +358,35 @@
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">iTunesManagesMyLibraryMenuItem</string>
- <reference key="source" ref="288178953"/>
- <reference key="destination" ref="1063068003"/>
+ <reference key="source" ref="162169812"/>
+ <reference key="destination" ref="329557607"/>
</object>
<int key="connectionID">475</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">setLibraryLocation:</string>
- <reference key="source" ref="288178953"/>
- <reference key="destination" ref="1023961764"/>
+ <reference key="source" ref="162169812"/>
+ <reference key="destination" ref="659891338"/>
</object>
<int key="connectionID">476</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">iTunesLibraryLocationMenuItem</string>
- <reference key="source" ref="288178953"/>
- <reference key="destination" ref="1023961764"/>
+ <reference key="source" ref="162169812"/>
+ <reference key="destination" ref="659891338"/>
</object>
<int key="connectionID">477</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">enabled: iTunesLibraryLocationMenuItemEnabled</string>
- <reference key="source" ref="1023961764"/>
- <reference key="destination" ref="288178953"/>
+ <reference key="source" ref="659891338"/>
+ <reference key="destination" ref="162169812"/>
<object class="NSNibBindingConnector" key="connector">
- <reference key="NSSource" ref="1023961764"/>
- <reference key="NSDestination" ref="288178953"/>
+ <reference key="NSSource" ref="659891338"/>
+ <reference key="NSDestination" ref="162169812"/>
<string key="NSLabel">enabled: iTunesLibraryLocationMenuItemEnabled</string>
<string key="NSBinding">enabled</string>
<string key="NSKeyPath">iTunesLibraryLocationMenuItemEnabled</string>
@@ -480,7 +484,7 @@
<reference ref="1046388886"/>
<reference ref="1056857174"/>
<reference ref="342932134"/>
- <reference ref="493771298"/>
+ <reference ref="501544025"/>
</object>
<reference key="parent" ref="694149608"/>
</object>
@@ -577,36 +581,36 @@
</object>
<object class="IBObjectRecord">
<int key="objectID">449</int>
- <reference key="object" ref="493771298"/>
+ <reference key="object" ref="501544025"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="269324606"/>
+ <reference ref="631738477"/>
</object>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">450</int>
- <reference key="object" ref="269324606"/>
+ <reference key="object" ref="631738477"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="1023961764"/>
- <reference ref="1063068003"/>
+ <reference ref="659891338"/>
+ <reference ref="329557607"/>
</object>
- <reference key="parent" ref="493771298"/>
+ <reference key="parent" ref="501544025"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">452</int>
- <reference key="object" ref="1063068003"/>
- <reference key="parent" ref="269324606"/>
+ <reference key="object" ref="329557607"/>
+ <reference key="parent" ref="631738477"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">453</int>
- <reference key="object" ref="1023961764"/>
- <reference key="parent" ref="269324606"/>
+ <reference key="object" ref="659891338"/>
+ <reference key="parent" ref="631738477"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">454</int>
- <reference key="object" ref="288178953"/>
+ <reference key="object" ref="162169812"/>
<reference key="parent" ref="0"/>
</object>
</object>
@@ -680,7 +684,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
- <string>{{569, 641}, {191, 23}}</string>
+ <string>{{623, 641}, {191, 23}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{596, 852}, {216, 23}}</string>
View
@@ -2,22 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>NSServices</key>
- <array>
- <dict>
- <key>NSMessage</key>
- <string>doString</string>
- <key>NSSendTypes</key>
- <array>
- <string>NSStringPboardType</string>
- </array>
- <key>NSMenuItem</key>
- <dict>
- <key>default</key>
- <string>Do The String</string>
- </dict>
- </dict>
- </array>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
@@ -33,14 +17,30 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>1.0</string>
+ <string>0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>1.0</string>
+ <string>0.3</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
+ <key>NSServices</key>
+ <array>
+ <dict>
+ <key>NSMenuItem</key>
+ <dict>
+ <key>default</key>
+ <string>Do The String</string>
+ </dict>
+ <key>NSMessage</key>
+ <string>doString</string>
+ <key>NSSendTypes</key>
+ <array>
+ <string>NSStringPboardType</string>
+ </array>
+ </dict>
+ </array>
</dict>
</plist>
View
@@ -138,7 +138,7 @@ def main():
if config.get_config_option('iTunesManagesMyLibrary') \
or not config.get_config_option('iTunesLibraryLocation') \
- or not os.path.exists(config.get_config_options('iTunesLibraryLocation')):
+ or not os.path.exists(config.get_config_option('iTunesLibraryLocation')):
download_dir_path = tempfile.mkdtemp(prefix='tmp3')
else:
download_dir_path = config.get_config_option('iTunesLibraryLocation')
@@ -147,19 +147,22 @@ def main():
print 'Downloading archive...'
archive_name = download(url, download_dir_path)
archive_path = os.path.join(download_dir_path, archive_name)
+ #import pdb;pdb.set_trace()
# extract it, using the 'e' ruby script, to the download directory
print 'Extracting archive...'
if not config.get_config_option('iTunesManagesMyLibrary'):
# move the archive into a subdir first in case it doesn't contain a directory
- new_dir_path = os.splitext(archive_path)[0]
+ new_dir_path = os.path.splitext(archive_path)[0]
os.makedirs(new_dir_path)
shutil.move(archive_path, new_dir_path)
archive_path = os.path.join(new_dir_path, archive_name)
-
+ new_cwd = new_dir_path
+ else:
+ new_cwd = download_dir_path
try:
ret_code = subprocess.call('"'+os.path.join(cwd, 'e')+'"' +\
- ' ' + archive_name, cwd=download_dir_path, shell=True)
+ ' ' + archive_name, cwd=new_cwd, shell=True)
if ret_code < 0:
print >>sys.stderr, 'Child was terminated by signal', -ret_code
shutil.rmtree(download_dir_path)
@@ -214,7 +217,7 @@ def main():
print 'Done!'
- exit(0)
+ #exit(0)
Oops, something went wrong.

0 comments on commit 9db5eb0

Please sign in to comment.