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

Commit

Permalink
Remove unnecessary logging and tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
AlMcKinlay committed Oct 14, 2020
1 parent 72022ea commit 6603504
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
6 changes: 0 additions & 6 deletions electron/id3.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ const timeToMS = (time) => {
};

exports.getTags = (file) => {
console.log(file);
const tags = NodeID3.read(file);
console.log(tags);
delete tags.raw;

if (tags.length) {
Expand All @@ -26,10 +24,6 @@ exports.getTags = (file) => {
};

exports.setTags = (file, tags) => {
console.log(file);
console.log(tags);
console.log(tags.length);
console.log(timeToMS(tags.length));
if (tags.length && tags.length.includes(":")) {
tags.length = timeToMS(tags.length);
}
Expand Down
2 changes: 0 additions & 2 deletions electron/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ exports.getVideo = (audioPath, image, videoPath, length) => {
.audioCodec("libmp3lame")
.audioChannels(2)
.on("end", function () {
console.log("Finished");
// TODO: Delete the temp image
res();
})
.on("error", function (err) {
console.log(err);
// TODO: Delete the temp image
rej(err);
})
Expand Down
9 changes: 7 additions & 2 deletions src/fileEditor/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@ export default function Actions({ path, setTags, image, length }) {
.then(sideEffect(() => log("Create video finished")))
.catch((err) => {
setErr(err);
console.log(err);
dispatch({ type: "ADD_LOG", log: err || "Create video cancelled" });
if (typeof err === "object" && err !== null) {
log(err.message);
} else if (typeof err === "string") {
log(err);
} else {
log("Create video cancelled");
}
})
.finally(() => setIsCreatingVideo(false));
};
Expand Down
2 changes: 0 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ const msToTime = (s) => {
return ("00" + n).slice(-z);
}

console.log(s);

var ms = s % 1000;
s = (s - ms) / 1000;
var secs = s % 60;
Expand Down

0 comments on commit 6603504

Please sign in to comment.