Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
fix: failing scan
Browse files Browse the repository at this point in the history
  • Loading branch information
5rahim committed Oct 13, 2023
1 parent acf9b06 commit bb11cf8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## 0.3.8

- 🚨 Fixed failing scan

## 0.3.7

- 💄 New Home Page design
Expand All @@ -12,9 +16,9 @@ All notable changes to this project will be documented in this file.

- 🦺 Fixed incorrect completion status in episode list
- 🔄 Modified some aspects in logs
- Directory path is now hidden
- Dumped info logs are now in separate folder
- Added more stats
- Directory path is now hidden
- Dumped info logs are now in separate folder
- Added more stats

## 0.3.5

Expand All @@ -23,7 +27,7 @@ All notable changes to this project will be documented in this file.
## 0.3.4

- 🦺 Fixed directory selector returning only relative path
- This caused issues when default save path on qBittorrent was not the same as local directory
- This caused issues when default save path on qBittorrent was not the same as local directory
- ✨ Ability to deselect torrents from episode list preview
- 🔄 Changed default download directory to be the same as local directory when downloading batches

Expand Down
20 changes: 10 additions & 10 deletions src/lib/local-library/helpers/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ export class ScanLogging {
* -----------------------------------------------------------------------------------------------*/

export async function _dumpToFile(key: string, content: any) {
const snapshotDir = path.resolve("logs/dumps")
if (!existsSync(snapshotDir)) {
await fs.mkdir(snapshotDir)
}
// Generate the timestamp for the snapshot file name
const timestamp = new Date().toISOString().replace(/:/g, "_")
const snapshotFilename = `${timestamp.replaceAll(".", "_")}-DUMP-${key}.txt`
const snapshotPath = path.join(snapshotDir, snapshotFilename)

await fs.writeFile(snapshotPath, JSON.stringify(content, null, 2), { encoding: "utf-8" })
// const snapshotDir = path.resolve("logs/dumps")
// if (!existsSync(snapshotDir)) {
// await fs.mkdir(snapshotDir)
// }
// // Generate the timestamp for the snapshot file name
// const timestamp = new Date().toISOString().replace(/:/g, "_")
// const snapshotFilename = `${timestamp.replaceAll(".", "_")}-DUMP-${key}.txt`
// const snapshotPath = path.join(snapshotDir, snapshotFilename)
//
// await fs.writeFile(snapshotPath, JSON.stringify(content, null, 2), { encoding: "utf-8" })
}

0 comments on commit bb11cf8

Please sign in to comment.