#NEWLINE# def __init__( self , config , episode ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . initTitle = config . get ( 'NicecastTarget' , 'initTitle' ) #NEWLINE# self . initArtist = config . get ( 'NicecastTarget' , 'initArtist' ) #NEWLINE# self . initAlbum = config . get ( 'NicecastTarget' , 'initAlbum' ) #NEWLINE# self . initTime = config . get ( 'NicecastTarget' , 'initTime' ) #NEWLINE# #UNINDENT# except ConfigParser . NoSectionError : #NEWLINE# #INDENT# print ( 'NicecastTarget: No [NicecastTarget] section in config' ) #NEWLINE# return #NEWLINE# #UNINDENT# except ConfigParser . NoOptionError : #NEWLINE# #INDENT# print ( 'NicecastTarget: Missing values in config' ) #NEWLINE# return #NEWLINE# #UNINDENT# fh = open ( self . nowPlayingFilePath , 'w' ) #NEWLINE# fh . write ( ( ( 'Title: ' + fh . initTitle ) + '\n' ) ) #NEWLINE# fh . write ( ( ( 'Artist: ' + self . initArtist ) + '\n' ) ) #NEWLINE# fh . write ( ( ( 'Album: ' + self . initAlbum ) + '\n' ) ) #NEWLINE# fh . write ( ( ( 'Time: ' + self . initTime ) + '\n' ) ) #NEWLINE# fh . close ( )