mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-07 04:18:48 +02:00
Add clear logs, use more menu dialog
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user