src/workers/list.js
async function list(torrentHandler, config) {
	try {
		const list = await clientTorrent.list(config.pid);
		for(const i in list) {
			torrentHandler.handle(list[i], config.pid);
		}
		torrentHandler.checkState(list, config.pid);
	} catch (error) {
		lError(`Exception ${error}`);
	}
}
async function list(torrentHandler, config) {
	try {
		const list = await clientTorrent.list(config.pid);
		for(const i in list) {
			torrentHandler.handle(list[i], config.pid);
		}
		torrentHandler.checkState(list, config.pid);
	} catch (error) {
		lError(`Exception ${error}`);
	}
}
async function list ( torrentHandler , config ) { try { const list = await clientTorrent . list ( config . pid ) ; for ( const i in list ) { torrentHandler . handle ( list [ i ] , config . pid ) ; } torrentHandler . checkState ( list , config . pid ) ; } catch ( error ) { lError ( ` ${ error } ` ) ; } }
List all torrents
@return {Promise.<void>}
List all torrents