Skip to content

Commit

Permalink
Better AutoBone recording load logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ButterscotchV committed Jan 18, 2025
1 parent 2837bdd commit 4b24c22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/core/src/main/java/dev/slimevr/autobone/AutoBone.kt
Original file line number Diff line number Diff line change
Expand Up @@ -753,18 +753,20 @@ class AutoBone(server: VRServer) {
if (!file.isFile) return@forEach

val frames = if (file.name.endsWith(".pfs", ignoreCase = true)) {
LogManager.info("[AutoBone] Loading PFS recording from \"${file.path}\"...")
PfsIO.tryReadFromFile(file)
} else if (file.name.endsWith(".pfr", ignoreCase = true)) {
LogManager.info("[AutoBone] Loading PFR recording from \"${file.path}\"...")
PfrIO.tryReadFromFile(file)
} else {
return@forEach
}

if (frames == null) {
LogManager.severe("Failed to load recording from \"${file.path}\".")
LogManager.severe("[AutoBone] Failed to load recording from \"${file.path}\".")
} else {
LogManager.info("[AutoBone] Loaded recording from \"${file.path}\".")
recordings.add(Pair.of(file.name, frames))
LogManager.info("[AutoBone] Loaded recording from \"${file.path}\".")
}
}

Expand Down

0 comments on commit 4b24c22

Please sign in to comment.