File backend: search subdirectories
This commit is contained in:
parent
320c4f7aa5
commit
adc365b4f8
@ -13,7 +13,7 @@ class FileBackend {
|
|||||||
}
|
}
|
||||||
|
|
||||||
find(tag, callback) {
|
find(tag, callback) {
|
||||||
glob(this.config.media_path + '/' + tag + ' - *.mp3', (err, files) => {
|
glob(this.config.media_path + '/**/' + tag + ' - *.mp3', (err, files) => {
|
||||||
if (files.length > 0) {
|
if (files.length > 0) {
|
||||||
return callback(pickRandom(files));
|
return callback(pickRandom(files));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user