Fix:Encode filename for audio player direct plays

This commit is contained in:
advplyr 2022-03-05 17:28:15 -06:00
parent 9f29b245d7
commit 83976b5549
5 changed files with 17 additions and 21 deletions

View file

@ -138,6 +138,10 @@ function xmlToJson(xml) {
}
Vue.prototype.$xmlToJson = xmlToJson
Vue.prototype.$encodeUriPath = (path) => {
return path.replace(/\\/g, '/').replace(/%/g, '%25').replace(/#/g, '%23')
}
const encode = (text) => encodeURIComponent(Buffer.from(text).toString('base64'))
Vue.prototype.$encode = encode
const decode = (text) => Buffer.from(decodeURIComponent(text), 'base64').toString()