Remove \u0000 from string
This commit is contained in:
parent
2812176393
commit
41d50ebf0c
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -67,7 +67,7 @@ if (!process.env.STREAM_TYPE || process.env.STREAM_TYPE === 'radio') {
|
|||
stream.on('metadata', function (data) {
|
||||
console.log('RAW DATA:', data)
|
||||
// let song = data.replace(/[^A-Za-z 0-9 .,?""!@#$%^&*()-_=+;:<>/\\|}{[\]`~]*/g, '')
|
||||
const song = data.substring(13, data.length - 1).replace('\';', '')
|
||||
const song = data.substring(13, data.length - 1).replace(/\0/g, '').replace('\';', '')
|
||||
|
||||
// Extract artist = title from song
|
||||
const splitted = song.split(' - ')
|
||||
|
|
Loading…
Reference in a new issue