From bf7c96d23fa751df9a018121c9a80d2bc5b5a11b Mon Sep 17 00:00:00 2001 From: whatdoineed2do/Ray Date: Sun, 9 Jun 2019 15:19:52 +0100 Subject: [PATCH] [web-src] forced meta rescan --- htdocs/admin.html | 2 ++ htdocs/admin/js/forked-daapd.js | 5 +++++ web-src/src/pages/PageAbout.vue | 7 ++++++- web-src/src/webapi/index.js | 4 ++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/htdocs/admin.html b/htdocs/admin.html index dcc08b00..2f8215f4 100644 --- a/htdocs/admin.html +++ b/htdocs/admin.html @@ -97,6 +97,8 @@
Update library

Update in progress ...

+ Rescan library meta +

Rescan in progress ...

diff --git a/htdocs/admin/js/forked-daapd.js b/htdocs/admin/js/forked-daapd.js index 07b47691..2dcf0e20 100644 --- a/htdocs/admin/js/forked-daapd.js +++ b/htdocs/admin/js/forked-daapd.js @@ -56,6 +56,11 @@ var app = new Vue({ axios.get('/api/update').then(console.log('Library is updating')); }, + update_meta: function() { + this.library.updating = true; + axios.get('/api/update/meta').then(console.log('Library is rescanning meta')); + }, + kickoffPairing: function() { axios.post('/api/pairing', this.pairing_req).then(response => { console.log('Kicked off pairing'); diff --git a/web-src/src/pages/PageAbout.vue b/web-src/src/pages/PageAbout.vue index 863831bb..80ed56f6 100644 --- a/web-src/src/pages/PageAbout.vue +++ b/web-src/src/pages/PageAbout.vue @@ -24,8 +24,9 @@ -
+ @@ -95,6 +96,10 @@ export default { methods: { update: function () { webapi.library_update() + }, + + update_meta: function () { + webapi.library_update_meta() } }, diff --git a/web-src/src/webapi/index.js b/web-src/src/webapi/index.js index 82cd0e34..198001f5 100644 --- a/web-src/src/webapi/index.js +++ b/web-src/src/webapi/index.js @@ -21,6 +21,10 @@ export default { return axios.get('/api/update') }, + library_update_meta () { + return axios.get('/api/update/meta') + }, + library_count (expression) { return axios.get('/api/library/count?expression=' + expression) },