Skip to content

Add lyrics in Accessor #16

Closed
Closed

Description

@tramhao

Thanks for your great work! I'm using it in my project termusic and it's great.
Basically I need support for lyrics and photo. I added in accessor and it's great. I noticed that you're working heavily in the project these days thus probably it's best that you can add it in upstream.
For photo, I'm having problems for opus file. I added a photo by push_photo, and after that, it can be displayed. However, this action destroyed the tag of opus file, and I cannot modify the tag again, with error message "cannot fill the whole frame". I check with kid3, and it told me the picture frame is not correct.

Activity

  1. Serial-ATA commented on Dec 22, 2021

    @Serial-ATA
    Owner

    Thanks for checking this out! I overlooked something when I redid the pictures. I'll get that fixed.

  2. Serial-ATA commented on Dec 22, 2021

    @Serial-ATA
    Owner

    Fixed in c29b001. As for the lyrics accessor, it'd be easy to add, but I'm not sure about adding things to Accessor that aren't supported by all tags to avoid confusion. Tag::insert_text and Tag::get_string should work just fine though.

    let lyrics = include_str!("lyrics.txt");
    
    if tag.insert_text(ItemKey::Lyrics, String::from(lyrics)) {
    	...
    }
    
    let tag_lyrics = tag.get_string(ItemKey::Lyrics);

    I'll probably add such methods to the tags that support them eventually though.

  3. added
    bug
    on Dec 22, 2021
  4. tramhao commented on Dec 23, 2021

    @tramhao
    Author

    Picture works now! and lyric works with insert_text and get_string also! Thanks so much!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions