- Timestamp:
- 04/27/11 04:43:06 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Update Podcasts/update_podcasts.py
r639 r640 9 9 def iTunes_main_pane(): 10 10 return app(u'System Events').application_processes[u'iTunes'].windows[u'iTunes'].scroll_areas[1] 11 12 def iOS_devices(iTunes): 13 return iTunes.sources[its.kind == AEEnum('kPod')] 11 14 12 15 def wait_for_podcast_update(iTunes): … … 21 24 def sync_devices(iTunes): 22 25 try: 23 i Tunes.update()26 iOS_devices(iTunes).update() 24 27 except CommandError: 25 28 print >> sys.stderr, 'No iOS devices detected. Waiting for an iOS device...' … … 27 30 time.sleep(0.5) 28 31 try: 29 i Tunes.update()32 iOS_devices(iTunes).update() 30 33 return 31 34 except CommandError: … … 33 36 34 37 # show first iOS device 35 i Tunes.sources[its.kind == AEEnum('kPod')].sources[1].library_playlists[1].reveal()38 iOS_devices(iTunes).sources[1].library_playlists[1].reveal() 36 39 37 # wait for update to complete 40 # wait for update to complete - XXX wait for all 38 41 def sync_enabled(): 39 42 try:
Note:
See TracChangeset
for help on using the changeset viewer.