Skip to content

Add create_new method#53

Open
cetra3 wants to merge 3 commits into
TianyiShi2001:mainfrom
cetra3:add_create_new
Open

Add create_new method#53
cetra3 wants to merge 3 commits into
TianyiShi2001:mainfrom
cetra3:add_create_new

Conversation

@cetra3

@cetra3 cetra3 commented Jun 19, 2025

Copy link
Copy Markdown

This adds a create_new method to create a tag from scratch. It also fixes an error whereby the tag type is specified, but it still tries to read it from the path, and fails.

Resolves #35

@pinkforest

Copy link
Copy Markdown
Collaborator

Hey thanks - could we add a test pretty pls 🙏

Cc/ @Serial-ATA 🍏 thoughts ?

@Serial-ATA

Copy link
Copy Markdown
Contributor

This would probably be better as an associated function:

impl Tag {
    pub fn empty(tag_type: TagType, config: Config) -> Box<dyn AudioTag + Send + Sync> {
        // ...
    }
}

Just to avoid having an extra error variant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No way to write new tag to a file which doesn't have any tag

3 participants