add scan button
This commit is contained in:
parent
cab0adb392
commit
8621d06fbc
@ -25,6 +25,9 @@
|
|||||||
<b-dropdown-item :href="`${server}/settings.view`">
|
<b-dropdown-item :href="`${server}/settings.view`">
|
||||||
Server settings
|
Server settings
|
||||||
</b-dropdown-item>
|
</b-dropdown-item>
|
||||||
|
<b-dropdown-item-button @click="scan">
|
||||||
|
Scan media folders
|
||||||
|
</b-dropdown-item-button>
|
||||||
<b-dropdown-item-button @click="showAboutModal = true">
|
<b-dropdown-item-button @click="showAboutModal = true">
|
||||||
About
|
About
|
||||||
</b-dropdown-item-button>
|
</b-dropdown-item-button>
|
||||||
@ -63,6 +66,9 @@
|
|||||||
...mapActions([
|
...mapActions([
|
||||||
'showMenu',
|
'showMenu',
|
||||||
]),
|
]),
|
||||||
|
scan() {
|
||||||
|
this.$api.scan()
|
||||||
|
},
|
||||||
logout() {
|
logout() {
|
||||||
this.$auth.logout()
|
this.$auth.logout()
|
||||||
this.$router.go(0)
|
this.$router.go(0)
|
||||||
|
@ -308,6 +308,10 @@ export class API {
|
|||||||
return this.get('rest/deleteInternetRadioStation', { id })
|
return this.get('rest/deleteInternetRadioStation', { id })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async scan(): Promise<void> {
|
||||||
|
return this.get('rest/startScan')
|
||||||
|
}
|
||||||
|
|
||||||
private normalizeRadioStation(item: any): Track & RadioStation {
|
private normalizeRadioStation(item: any): Track & RadioStation {
|
||||||
return {
|
return {
|
||||||
id: `radio-${item.id}`,
|
id: `radio-${item.id}`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user