#NEWLINE# def optimized_to_raw( collections_optimized ) : #NEWLINE# #INDENT# raw = '' #NEWLINE# for ( alias , collection ) in collections_optimized . items ( ) : #NEWLINE# #INDENT# if ( 'mpd_playlist' in collection ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'sort' in collection ) : #NEWLINE# #INDENT# raw += ( '--@' + alias ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'special' in collection ) : #NEWLINE# #INDENT# raw += ( '--#' + alias ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raw += ( '--' + alias ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( 'expression' in collection ) : #NEWLINE# #INDENT# raw += ( '\n' + collection [ 'expression' ] . rstrip ( ) ) #NEWLINE# #UNINDENT# if ( 'command' in collection ) : #NEWLINE# #INDENT# raw += ( '\ncommand: ' + collection [ 'command' ] ) #NEWLINE# #UNINDENT# if ( ( 'songs' in collection ) and collection [ 'songs' ] ) : #NEWLINE# #INDENT# raw += '\nsongs:' #NEWLINE# for song in collection [ 'songs' ] : #NEWLINE# #INDENT# raw += ( '\n    ' + repr_tags ( mpd . get_tags ( song ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# raw += '\n\n\n' #NEWLINE# #UNINDENT# return raw . strip ( )