[web-src] Update library stats after "database" event

Fixes missing display of audiobooks/podcasts link in top navbar after 
adding the first audiobook/podcast (library updated through inotify and 
not with a full scan)
This commit is contained in:
chme 2018-12-30 09:14:23 +01:00
parent f2ea608a49
commit 9198dbc8a9
1 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ export default {
socket.onopen = function () {
vm.$store.dispatch('add_notification', { text: 'Connection to server established', type: 'primary', topic: 'connection', timeout: 2000 })
vm.reconnect_attempts = 0
socket.send(JSON.stringify({ notify: ['update', 'player', 'options', 'outputs', 'volume', 'spotify'] }))
socket.send(JSON.stringify({ notify: ['update', 'database', 'player', 'options', 'outputs', 'volume', 'spotify'] }))
vm.update_outputs()
vm.update_player_status()
@ -112,7 +112,7 @@ export default {
}
socket.onmessage = function (response) {
var data = JSON.parse(response.data)
if (data.notify.includes('update')) {
if (data.notify.includes('update') || data.notify.includes('database')) {
vm.update_library_stats()
}
if (data.notify.includes('player') || data.notify.includes('options') || data.notify.includes('volume')) {