diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-01-08 15:36:13 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-01-08 15:36:13 +0100 |
| commit | 4bfd9c88a538138963b15dee4695eb55d3bac23a (patch) | |
| tree | a86b0701b57e255fbe83b8d455498f0fde93ab18 | |
| parent | 5236a7e242a239b53baf600c0843c7e9339343b9 (diff) | |
fix wave url checking
| -rw-r--r-- | bucky/app/bucky.js | 2 | ||||
| -rw-r--r-- | public/assets/js/lib/views/details/audio.js | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js index 0581bc9..84bbe70 100644 --- a/bucky/app/bucky.js +++ b/bucky/app/bucky.js @@ -396,7 +396,6 @@ var bucky = module.exports = { return res.sendStatus(404) } db.getFileById(id).then(function(file){ - console.log(file) if (file) { res.file = file next() @@ -539,7 +538,6 @@ var bucky = module.exports = { next() }, checkFilePrivacy: function(req, res, next) { - console.log(res.file) if (req.user.get('ulevel') !== 3 && req.user.get('username') !== res.file.get('username')) { return res.sendStatus(500) } diff --git a/public/assets/js/lib/views/details/audio.js b/public/assets/js/lib/views/details/audio.js index e328a07..0f16dc7 100644 --- a/public/assets/js/lib/views/details/audio.js +++ b/public/assets/js/lib/views/details/audio.js @@ -17,7 +17,7 @@ var audio = (function(){ music = [] var links = document.querySelectorAll("a") Array.prototype.slice.apply(links).forEach(function(link){ - if (! link.href.match(/(mp3|wav|ogg)/)) return + if (! link.href.match(/\.(mp3|wav|ogg)$/)) return link.dataset.index = music.length music.push(link) if (playing && link.href === el.src) { |
