Changeset 324
- Timestamp:
- 07/14/07 23:34:16 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/StreamVision/StreamVision.py
r323 r324 74 74 pass 75 75 76 needsStereoPowerOn = HAVE_XTENSION 77 76 78 class StreamVision(NSApplication): 77 79 … … 80 82 81 83 def displayTrackInfo(self): 84 global needsStereoPowerOn 85 82 86 iTunes = iTunesApp() 83 87 … … 89 93 if iTunes.player_state() != k.playing: 90 94 growlNotify('iTunes is not playing.', trackName) 91 return 95 if HAVE_XTENSION: 96 if not needsStereoPowerOn and XTensionApp().status('Stereo'): 97 XTensionApp().turnoff('Stereo') 98 needsStereoPowerOn = True 99 return 100 if needsStereoPowerOn: 101 if not XTensionApp().status('Stereo'): 102 XTensionApp().turnon('Stereo') 103 needsStereoPowerOn = False 92 104 if trackClass == k.URL_track: 93 105 growlNotify(cleanStreamTitle(iTunes.current_stream_title()), … … 95 107 return 96 108 if trackClass == k.property: 97 growlNotify('iTunes is playing.', '')98 return109 growlNotify('iTunes is playing.', '') 110 return 99 111 kw = {} 100 112 # XXX iTunes doesn't let you get artwork for shared tracks … … 145 157 146 158 def playPause(self, useStereo=True): 159 global needsStereoPowerOn 160 147 161 iTunes = iTunesApp() 148 162 was_playing = (iTunes.player_state() == k.playing) 163 if not useStereo: 164 needsStereoPowerOn = False 149 165 iTunes.playpause() 150 166 if not was_playing and iTunes.player_state() == k.stopped: … … 155 171 if iTunes.player_state() == k.playing: 156 172 XTensionApp().turnon('Stereo') 173 needsStereoPowerOn = False 157 174 else: 158 175 XTensionApp().turnoff('Stereo') 176 needsStereoPowerOn = True 159 177 160 178 def playPauseFront(self):
Note:
See TracChangeset
for help on using the changeset viewer.