Update file.js

This commit is contained in:
Aleksandr Statciuk 2021-09-09 00:43:01 +03:00
parent 1572f1c799
commit 41e21e2d64

View File

@ -8,7 +8,7 @@ const file = {}
file.list = function (include = [], exclude = []) {
return new Promise(resolve => {
glob('channels/*.m3u', function (err, files) {
glob('channels/**/*.m3u', function (err, files) {
if (include.length) {
include = include.map(filename => `channels/${filename}.m3u`)
files = files.filter(filename => include.includes(filename))