use url safe b64
This commit is contained in:
parent
0b57e22e55
commit
d770c29334
1 changed files with 5 additions and 4 deletions
|
@ -547,7 +547,8 @@ export class BrowserWindow {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
app.get("/ciderlocal/:songs", (req, res) => {
|
app.get("/ciderlocal/:songs", (req, res) => {
|
||||||
const audio = atob(req.params.songs);
|
const audio = atob(req.params.songs.replace(/_/g, '/').replace(/-/g, '+'));
|
||||||
|
console.log('auss', audio)
|
||||||
let data = {data:
|
let data = {data:
|
||||||
this.localSongs.filter((f: any) => audio.split(',').includes(f.id))};
|
this.localSongs.filter((f: any) => audio.split(',').includes(f.id))};
|
||||||
res.send(data);
|
res.send(data);
|
||||||
|
@ -671,7 +672,7 @@ export class BrowserWindow {
|
||||||
let text = details.url.toString().includes('ids=') ? decodeURIComponent(details.url.toString()).split("?ids=")[1] : decodeURIComponent(details.url.toString().substring(details.url.toString().lastIndexOf('/') + 1));
|
let text = details.url.toString().includes('ids=') ? decodeURIComponent(details.url.toString()).split("?ids=")[1] : decodeURIComponent(details.url.toString().substring(details.url.toString().lastIndexOf('/') + 1));
|
||||||
console.log('localurl',text)
|
console.log('localurl',text)
|
||||||
callback({
|
callback({
|
||||||
redirectURL: `http://localhost:${this.clientPort}/ciderlocal/${btoa(text)}`,
|
redirectURL: `http://localhost:${this.clientPort}/ciderlocal/${Buffer.from(text).toString('base64url')}`,
|
||||||
});
|
});
|
||||||
}else {
|
}else {
|
||||||
callback({
|
callback({
|
||||||
|
@ -1221,8 +1222,8 @@ export class BrowserWindow {
|
||||||
],
|
],
|
||||||
// "playParams": {
|
// "playParams": {
|
||||||
// "id": "ciderlocal" + numid,
|
// "id": "ciderlocal" + numid,
|
||||||
// "kind": "episode",
|
// "kind": "podcast",
|
||||||
// "isLibrary": false,
|
// "isLibrary": true,
|
||||||
// "reporting": false },
|
// "reporting": false },
|
||||||
"trackNumber": metadata.common.track?.no ?? 0,
|
"trackNumber": metadata.common.track?.no ?? 0,
|
||||||
"discNumber": metadata.common.disk?.no ?? 0,
|
"discNumber": metadata.common.disk?.no ?? 0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue