Any examples with synchronized lyrics? #596
-
|
I work on my small project, Vinyl, and I want to implement synchronized lyrics lyrics = tag.get_string(&ItemKey::Lyrics).map(|s| s.to_string());But... How can I work with synchronized lyrics? I have found SynchronizedTextFrame in the docs. But I have no idea how to use with this. Therefore, any projects, or just examples with this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Unfortunately lyrics can be very annoying to work with in a generic way.
That's only accessible through Id3v2Tag if you read a concrete file type (e.g. MpegFile). In your project, you're using read_from_path(), which internally will read a concrete file type, and then convert it to a generic TaggedFile, so you'll lose access to any format-specific item structures (like ID3v2 frames).
So for formats except ID3v2, there's For ID3v2 there is no generic way to work with synchronized lyrics, just because the SynchronizedTextFrame contains too much format-specific information. What apps will usually end up doing is checking the file type and having an ID3v2-specific implementation (example). |
Beta Was this translation helpful? Give feedback.
-
|
@Serial-ATA Thanks to fast response. I think this information is enough. |
Beta Was this translation helpful? Give feedback.
Unfortunately lyrics can be very annoying to work with in a generic way.
That's only accessible through Id3v2Tag if you read a concrete file type (e.g. MpegFile).
In your project, you're using read_from_path(), which internally will read a concrete file type, and then convert it to a generic TaggedFile, so you'll lose access to any format-specific item structures (like ID3v2 frames).
So for formats except ID3v2, there's
ItemKey::Lyrics. It usually just has plaintext lyrics, but some applications overload it to store synchronized LRC lyrics (I just recently found this out, #561). You'll just have to…