Changeset 1627

Show
Ignore:
Timestamp:
2005-11-14 00:25:22 (3 years ago)
Author:
jkivlighn
Message:

Fix loading last opened file when the configuration file hasn't been created yet

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • annoamp/trunk/annoamp.py

    r1626 r1627  
    184184    config.read([os.path.expanduser('~/.annoamp.conf')]) 
    185185     
    186     files = config.get("DEFAULT","lastOpened").split("\n") 
    187      
    188     for file in files: 
    189         player.load_file_info(file) 
     186    if config.has_option("DEFAULT","lastOpened"): 
     187        files = config.get("DEFAULT","lastOpened").split("\n") 
     188         
     189        for file in files: 
     190            player.load_file_info(file) 
    190191         
    191192def save_settings( player ): 
  • annoamp/trunk/anxplayer.py

    r1623 r1627  
    161161                self.debug("whooops, warning: "+message.parse_warning()) 
    162162            elif message.type == gst.MESSAGE_ERROR: 
     163                self.chapter_info.append(chapter_info) 
     164                self.add_file_callback(filename, playlist_info) 
    163165                self.error(message.parse_error()) 
    164166                break;