mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-29 06:37:16 +02:00
Cleanup unnecessary logs
This commit is contained in:
@@ -47,7 +47,7 @@ data class DownloadItemPart(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val downloadUri = Uri.parse(downloadUrl)
|
val downloadUri = Uri.parse(downloadUrl)
|
||||||
Log.d("DownloadItemPart", "Audio File Destination Uri: $destinationUri | Final Destination Uri: $finalDestinationUri | Download URI $downloadUri")
|
Log.d("DownloadItemPart", "Audio File Destination Uri: $destinationUri | Final Destination Uri: $finalDestinationUri | Server Path $serverPath")
|
||||||
return DownloadItemPart(
|
return DownloadItemPart(
|
||||||
id = DeviceManager.getBase64Id(finalDestinationFile.absolutePath),
|
id = DeviceManager.getBase64Id(finalDestinationFile.absolutePath),
|
||||||
downloadItemId,
|
downloadItemId,
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ class AbsDatabase : Plugin() {
|
|||||||
|
|
||||||
@PluginMethod
|
@PluginMethod
|
||||||
fun setCurrentServerConnectionConfig(call:PluginCall) {
|
fun setCurrentServerConnectionConfig(call:PluginCall) {
|
||||||
Log.d(tag, "setCurrentServerConnectionConfig ${call.data}")
|
Log.d(tag, "setCurrentServerConnectionConfig called")
|
||||||
val serverConfigPayload = jacksonMapper.readValue<ServerConnConfigPayload>(call.data.toString())
|
val serverConfigPayload = jacksonMapper.readValue<ServerConnConfigPayload>(call.data.toString())
|
||||||
var serverConnectionConfig = DeviceManager.deviceData.serverConnectionConfigs.find { it.id == serverConfigPayload.id }
|
var serverConnectionConfig = DeviceManager.deviceData.serverConnectionConfigs.find { it.id == serverConfigPayload.id }
|
||||||
|
|
||||||
@@ -558,7 +558,7 @@ class AbsDatabase : Plugin() {
|
|||||||
|
|
||||||
@PluginMethod
|
@PluginMethod
|
||||||
fun updateDeviceSettings(call:PluginCall) { // Returns device data
|
fun updateDeviceSettings(call:PluginCall) { // Returns device data
|
||||||
Log.d(tag, "updateDeviceSettings ${call.data}")
|
Log.d(tag, "updateDeviceSettings called")
|
||||||
val newDeviceSettings = jacksonMapper.readValue<DeviceSettings>(call.data.toString())
|
val newDeviceSettings = jacksonMapper.readValue<DeviceSettings>(call.data.toString())
|
||||||
|
|
||||||
Handler(Looper.getMainLooper()).post {
|
Handler(Looper.getMainLooper()).post {
|
||||||
@@ -576,7 +576,7 @@ class AbsDatabase : Plugin() {
|
|||||||
|
|
||||||
@PluginMethod
|
@PluginMethod
|
||||||
fun getMediaItemHistory(call:PluginCall) { // Returns device data
|
fun getMediaItemHistory(call:PluginCall) { // Returns device data
|
||||||
Log.d(tag, "getMediaItemHistory ${call.data}")
|
Log.d(tag, "getMediaItemHistory called")
|
||||||
val mediaId = call.getString("mediaId") ?: ""
|
val mediaId = call.getString("mediaId") ?: ""
|
||||||
|
|
||||||
GlobalScope.launch(Dispatchers.IO) {
|
GlobalScope.launch(Dispatchers.IO) {
|
||||||
|
|||||||
@@ -484,7 +484,7 @@ export default {
|
|||||||
|
|
||||||
const { value } = await Dialog.confirm({
|
const { value } = await Dialog.confirm({
|
||||||
title: this.$strings.HeaderConfirm,
|
title: this.$strings.HeaderConfirm,
|
||||||
message: this.$strings.MessageConfirmDeleteServerConfig,
|
message: this.$strings.MessageConfirmDeleteServerConfig
|
||||||
})
|
})
|
||||||
if (value) {
|
if (value) {
|
||||||
this.processing = true
|
this.processing = true
|
||||||
@@ -843,7 +843,7 @@ export default {
|
|||||||
async setUserAndConnection({ user, userDefaultLibraryId, serverSettings, ereaderDevices }) {
|
async setUserAndConnection({ user, userDefaultLibraryId, serverSettings, ereaderDevices }) {
|
||||||
if (!user) return
|
if (!user) return
|
||||||
|
|
||||||
console.log('Successfully logged in', JSON.stringify(user))
|
console.log('Successfully logged in: ' + user.username)
|
||||||
|
|
||||||
this.$store.commit('setServerSettings', serverSettings)
|
this.$store.commit('setServerSettings', serverSettings)
|
||||||
this.$store.commit('libraries/setEReaderDevices', ereaderDevices)
|
this.$store.commit('libraries/setEReaderDevices', ereaderDevices)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
|||||||
ssc.customHeaders = serverConnectionConfig.customHeaders || {}
|
ssc.customHeaders = serverConnectionConfig.customHeaders || {}
|
||||||
|
|
||||||
if (serverConnectionConfig.refreshToken) {
|
if (serverConnectionConfig.refreshToken) {
|
||||||
console.log('[AbsDatabase] Updating refresh token...', serverConnectionConfig.refreshToken)
|
console.log('[AbsDatabase] Updating refresh token...')
|
||||||
// Only using local storage for web version that is only used for testing
|
// Only using local storage for web version that is only used for testing
|
||||||
localStorage.setItem(`refresh_token_${ssc.id}`, serverConnectionConfig.refreshToken)
|
localStorage.setItem(`refresh_token_${ssc.id}`, serverConnectionConfig.refreshToken)
|
||||||
}
|
}
|
||||||
@@ -71,7 +71,7 @@ class AbsDatabaseWeb extends WebPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (serverConnectionConfig.refreshToken) {
|
if (serverConnectionConfig.refreshToken) {
|
||||||
console.log('[AbsDatabase] Setting refresh token...', serverConnectionConfig.refreshToken)
|
console.log('[AbsDatabase] Setting refresh token...')
|
||||||
// Only using local storage for web version that is only used for testing
|
// Only using local storage for web version that is only used for testing
|
||||||
localStorage.setItem(`refresh_token_${ssc.id}`, serverConnectionConfig.refreshToken)
|
localStorage.setItem(`refresh_token_${ssc.id}`, serverConnectionConfig.refreshToken)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -128,13 +128,12 @@ export default ({ app, store }, inject) => {
|
|||||||
|
|
||||||
// Listen for token refresh events from native app
|
// Listen for token refresh events from native app
|
||||||
AbsDatabase.addListener('onTokenRefresh', (data) => {
|
AbsDatabase.addListener('onTokenRefresh', (data) => {
|
||||||
console.log('[db] onTokenRefresh', data)
|
|
||||||
store.commit('user/setAccessToken', data.accessToken)
|
store.commit('user/setAccessToken', data.accessToken)
|
||||||
})
|
})
|
||||||
|
|
||||||
// Listen for token refresh failure events from native app
|
// Listen for token refresh failure events from native app
|
||||||
AbsDatabase.addListener('onTokenRefreshFailure', async (data) => {
|
AbsDatabase.addListener('onTokenRefreshFailure', async (data) => {
|
||||||
console.log('[db] onTokenRefreshFailure', data)
|
console.log('[db] onTokenRefreshFailure')
|
||||||
// Clear store and redirect to login page
|
// Clear store and redirect to login page
|
||||||
await store.dispatch('user/logout')
|
await store.dispatch('user/logout')
|
||||||
if (window.location.pathname !== '/connect') {
|
if (window.location.pathname !== '/connect') {
|
||||||
|
|||||||
@@ -231,7 +231,6 @@ export const mutations = {
|
|||||||
state.user = user
|
state.user = user
|
||||||
},
|
},
|
||||||
setAccessToken(state, accessToken) {
|
setAccessToken(state, accessToken) {
|
||||||
console.log('[user] setAccessToken', accessToken)
|
|
||||||
state.accessToken = accessToken
|
state.accessToken = accessToken
|
||||||
},
|
},
|
||||||
removeMediaProgress(state, id) {
|
removeMediaProgress(state, id) {
|
||||||
|
|||||||
Reference in New Issue
Block a user