mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-05 10:35:42 +02:00
Add clear logs, use more menu dialog
This commit is contained in:
parent
2000534e37
commit
74758c7762
5 changed files with 71 additions and 15 deletions
|
@ -301,4 +301,7 @@ class DbManager {
|
|||
}
|
||||
return logs
|
||||
}
|
||||
fun removeAllLogs() {
|
||||
Paper.book("log").destroy()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,4 +58,10 @@ class AbsLogger : Plugin() {
|
|||
val absLogs = DeviceManager.dbManager.getAllLogs()
|
||||
call.resolve(JSObject(jacksonMapper.writeValueAsString(AbsLogList(absLogs))))
|
||||
}
|
||||
|
||||
@PluginMethod
|
||||
fun clearLogs(call: PluginCall) {
|
||||
DeviceManager.dbManager.removeAllLogs()
|
||||
call.resolve()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue