Skip to content

Commit

Permalink
logging updates for mobile debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jjmaldonis committed Mar 3, 2023
1 parent 913b279 commit e998920
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![version](https://img.shields.io/badge/version-0.6.4-blue)
![version](https://img.shields.io/badge/version-0.6.5-blue)
![license](https://img.shields.io/badge/license-MIT-brightgreen)
<a href='https://ko-fi.com/jjmaldonis' target='_blank'><img height='20' style='border:0px;height:26px;margin-bottom:-2.5px;' src='https://az743702.vo.msecnd.net/cdn/kofi3.png?v=0' border='0' alt='Buy Me a Coffee :)' /></a>

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-audio-notes",
"name": "Audio Notes",
"version": "0.6.4",
"version": "0.6.5",
"minAppVersion": "0.15.0",
"description": "Create notes for audio files based on translations generated by Open AI Whisper.",
"author": "Jason Maldonis",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-audio-notes",
"version": "0.6.4",
"version": "0.6.5",
"description": "Create notes for audio files based on translations generated by Open AI Whisper.",
"main": "main.js",
"scripts": {
Expand Down
10 changes: 7 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ export default class AutomaticAudioNotes extends Plugin {
}

async onload() {
monkeyPatchConsole(this);
console.log("Audio Notes: loading settings...")
// Load Settings
await this.loadSettings();
console.log("Audio Notes: loaded settings!")
this.addSettingTab(new AudioNotesSettingsTab(this.app, this));
const ribbonIconEl = this.addRibbonIcon(
"microphone",
Expand All @@ -227,8 +230,7 @@ export default class AutomaticAudioNotes extends Plugin {
);
// Go through the loaded settings and set the timestamps of any src's that have been played in the last 3 months.
// Resave the data after filtering out any src's that were played more than 3 months ago.
const todayMinusThreeMonthsInMilliseconds =
new Date().getTime() - 7.884e9;
const todayMinusThreeMonthsInMilliseconds = new Date().getTime() - 7.884e9;
let data = await this.loadData();
if (!data) {
data = new Object();
Expand All @@ -247,7 +249,8 @@ export default class AutomaticAudioNotes extends Plugin {
}
data.positions = newPositions;
this.saveData(data);
// Make the UUID is set in the data.json file. It doesn't need to be a perfect UUID, so we don't need a package for it.
console.log("Audio Notes: saved audio positions")
// Make sure the UUID is set in the data.json file. It doesn't need to be a perfect UUID, so we don't need a package for it.
if (!data.uuid) {
data.uuid = getUniqueId(4);
this.saveData(data);
Expand All @@ -264,6 +267,7 @@ export default class AutomaticAudioNotes extends Plugin {
monkeyPatchConsole(this);
}

console.log("Audio Notes: loading commands...")
// Add all the commands
this.addCommand({
id: "create-new-audio-note",
Expand Down

0 comments on commit e998920

Please sign in to comment.