Closed tracerrx closed 3 years ago
i agree this feature is a MUST. however, @tracerrx you should really fork the repo, and push your pull request if you think this addresses the missing feature....
I'm not sure why this is necessary - the UI should automatically update the relevant elements (song title, album art, etc) when the song changes, without doing a full page refresh. Is this not happening?
Was not working on chrome 67/macos until I made the changes
Current Chrome version is 68.0.3440.84. The UI updates without these changes.
I added the below to make the screen refresh upon a change in the nowplaying file (my filename differs from your CurrentSong file)
`var fs = require('fs'); var filePath = process.env.HOME + '/.config/pianobar/nowplaying'; var file = fs.readFileSync(filePath); console.log('Initial File content: ' + file);
fs.watch(filePath, function(event, filename) { if(filename){ console.log('Event : ' + event); console.log(filename + ' file Changed ...'); file = fs.readFileSync(filePath); console.log('File content at : ' + new Date() + ' is \n' + file); readCurrentSong(); } else{ console.log('filename not provided') } });`