Comments (2)
Hi, let me do my best to help on this one. Sorry the advanced tagging docs on the wiki aren't done yet. I started working on them a while ago and keep getting sidetracked by other things.
If you want to use the myFile.getTag()
method to create new tags, you'll want to look at the settings in Id3v2Settings
Use Id3v2Settings.defaultVersion = 4
to make new ID3v2 tags v2.4. However, this won't affect existing tags. There's a couple ways to change version of existing tags (this is subject to change as per #47) but the most obvious is to update the version of the existing tag by setting id3v2Tag.version = 4
.
As for creating the frame, see my notes on your other question about creating a frame identifier (ie, don't create a new one, use the existing ones). Ideally, if you're creating a text information frame, you can just use TextInformationFrame.FromIdentifier
.
Putting it all together, here's an example for how you would add the title to your file:
const id3v2Tag = myFile.getTag(TagTypes.Id3v2, true);
id3v2Tag.version = 4;
const newFrame = Id3v2TextInformationFrame.fromIdentifier(Id3v2FrameIdentifiers.TIT2);
newFrame.text = ['mytitle'];
id3v2Tag.addFrame(newFrame);
I'm kinda winging it with the example since it's been a while since I've touched the ID3v2 code. Let me know if you run into any issues.
from node-taglib-sharp.
Your example worked for me. Appreciate the answer !
from node-taglib-sharp.
Related Issues (20)
- Version 5.2.3 breaks reading of mp3 picture.data for some files HOT 4
- PopularimeterFrame HOT 2
- "Granular position is too large to be handled with this version of node-taglib-sharp" when parsing ogg file HOT 7
- Remove Ogg granule position safe integer check and make granule position a number HOT 1
- Support for M4A HOT 7
- use in browser HOT 5
- Matroska tag docs didn't get generated HOT 1
- Question - error setting title HOT 2
- Id3v2FrameIdentifier doc and possible bug ? HOT 4
- Named export not found HOT 4
- Pictures cannot display in windows file browser. HOT 4
- ID3v2 tags at end of file not showing up in players
- Throwing error: `Argument null: ${name} was not provided` HOT 10
- 'Cannot set property ByteVector' error on load of module HOT 3
- id3v2 frameId RGAD causes failure to read tags HOT 4
- Add Legacy ReplayGain Frame Support
- Why Tag class has no accessor for 'artist' ? HOT 1
- poor performance when saving picture HOT 3
- wrong duration of `.mp3` and `.wav` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-taglib-sharp.