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