Changeset 647 for trunk


Ignore:
Timestamp:
05/27/12 03:18:20 (12 years ago)
Author:
Nicholas Riley
Message:

StreamVision: Be resilient to iTunes quitting, finally.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StreamVision/StreamVision.py

    r646 r647  
    171171            trackName = iTunes.current_track.name()
    172172
    173         if iTunes.player_state() != k.playing:
    174             growlNotify('iTunes is not playing.', trackName)
     173        try:
     174            playerState = iTunes.player_state()
     175        except CommandError:
     176            playerState = None # probably iTunes quit
     177        if playerState != k.playing:
     178            if playerState != None:
     179                growlNotify('iTunes is not playing.', trackName)
    175180            turnStereoOff()
    176181            return
Note: See TracChangeset for help on using the changeset viewer.