"use strict"; const glob = require('glob'); class FileBackend { constructor(config) { this.config = config; } find(tag, callback) { glob(this.config.media_path + '/' + tag + ' - *.mp3', (err, files) => { if (files.length > 0) { return callback(files[0]); } callback(); }); } } module.exports = function(config) { return new FileBackend(config); }; // vim:ts=2 sw=2 et: