question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

APIC/image ID Not Setting in Electron

See original GitHub issue

I’m having an odd issue in an ElectronJS app where it’s setting title, artist, album, genre, and track just fine, but for some reason it’s not working with APIC/image (I’ve tried with both, to see if that was the issue). I tried the plugin in a normal Node app, and there was no issues setting the image ID, so I’m guessing it’s an interaction with Electron. Any and all suggestions would be appreciated!

For reference, here is my code:

let mp3File = `${savePath}/${filename}.mp3`
let tags = {
  title: story.title,
  artist: story.author,
  album: story.album,
  genre: story.genre,
  APIC: "./images/albumArt-default-light.jpg",
  TRCK: story.track
}

let success = NodeID3.write(tags, mp3File)

NodeID3.write(tags, mp3File, function(err) {
  if (err) reject(console.error(err))
  if (success) {
    resolve(console.log(`MP3 metadata added.`))
  }
})

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
coffeepostalcommented, Nov 11, 2020

@Zazama thank you! I’m behind the ball on for-pay project, and I’m using node-id3 for a personal project. It might be a couple of days, but I’ll get it to you ASAP.

For a little backstory, the Electron app is a website scrapper that takes the content of a website, converts it to audio via Say.js into a wav file. It then converts that wav into an mp3, at which point, it uses node-id3 to add the website’s meta data (eg: author, title, etc) to the MP3’s metadata. I don’t think it’ll matter too much, but I thought context might help. You’d also mentioned that it might be a conflict with pre-existing ID3v1 tags, which I don’t think would exist since the files are being generated, though maybe they have default values that I don’t know about.

Thanks again!

0reactions
coffeepostalcommented, Dec 23, 2021

I’m sorry it’s been so long, but I finally picked the project back up, the error was mine. I was trying to use relative file paths for the image, I switched to path to make the file path absolute, and it worked just fine. So sorry for the run around and the lack of updates!

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - cant use HTML ID in my node.js file electron app ...
First off, let's look at the code in your html file. The majority of contents of the <form> tag looks good apart from...
Read more >
Common Configuration - electron-builder
Windows not supported). It is strongly recommended that an explicit ID is set. artifactName String | “undefined” - The artifact file name template....
Read more >
systemPreferences | Electron
Returns boolean - whether or not this device has the ability to use Touch ID. NOTE: This API will return false on macOS...
Read more >
Options | electron-packager
Functions to be called after your app directory has been copied to a temporary directory. Note: afterCopy will not be called if the...
Read more >
"Unnotarized Developer ID" - Facin… | Apple Developer Forums
"Unnotarized Developer ID" - Facing issue while code signing my electron ... --no-cache /var/folders/n6/vn0gnf6j5mg0my_k9pplw4n80000gq/T/electron-packager/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found