#NEWLINE# def _start_lbry_files( self ) : #NEWLINE# #INDENT# def set_options_and_restore( rowid , stream_hash , options ) : #NEWLINE# #INDENT# payment_rate_manager = PaymentRateManager ( self . session . base_payment_rate_manager ) #NEWLINE# d = self . start_lbry_file ( rowid , stream_hash , payment_rate_manager , blob_data_rate = options ) #NEWLINE# d . addCallback ( ( lambda downloader : downloader . restore ( ) ) ) #NEWLINE# return d #NEWLINE# #UNINDENT# def log_error( err ) : #NEWLINE# #INDENT# log . error ( 'An error occurred while starting a lbry file: %s' , err . getErrorMessage ( ) ) #NEWLINE# #UNINDENT# def start_lbry_files( lbry_files_and_options ) : #NEWLINE# #INDENT# for ( rowid , stream_hash , options ) in lbry_files_and_options : #NEWLINE# #INDENT# d = set_options_and_restore ( rowid , stream_hash , options ) #NEWLINE# d . addErrback ( log_error ) #NEWLINE# #UNINDENT# return True #NEWLINE# #UNINDENT# d = self . _get_all_lbry_files ( ) #NEWLINE# d . addCallback ( start_lbry_files ) #NEWLINE# return d