#NEWLINE# def clear_cache( name ) : #NEWLINE# #INDENT# if ( platform . system ( ) == 'Windows' ) : #NEWLINE# #INDENT# name = name . decode ( 'windows-1252' ) #NEWLINE# #UNINDENT# APP . debug ( ( 'Clearing "%s" from movie db...' % name ) ) #NEWLINE# movie = torrent_to_movie ( name ) #NEWLINE# clear_webcache ( movie ) #NEWLINE# record = APP . Movie . get_data ( movie ) #NEWLINE# if ( not record ) : #NEWLINE# #INDENT# APP . output ( ( 'Could not find movie in db: %s' % name ) ) #NEWLINE# return #NEWLINE# #UNINDENT# if ( ( not movie [ 'year' ] ) and record [ 'year' ] ) : #NEWLINE# #INDENT# movie [ 'year' ] = record [ 'year' ] #NEWLINE# clear_webcache ( movie ) #NEWLINE# #UNINDENT# APP . output ( ( 'Deleted movie from database: %s' % record [ 'title' ] ) ) #NEWLINE# APP . Movie . remove ( 'id' , record [ 'id' ] )