Tags: Implement unsynced lyrics into TagLib plugin

Implement unsynced lyrics reading into TagLib frontend plugin.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
main
Christopher Snowhill 2023-02-23 17:41:50 -08:00
parent a21242db55
commit e66b01b6db
No known key found for this signature in database
2 changed files with 11 additions and 2 deletions

View File

@ -60,7 +60,7 @@
const TagLib::Tag *tag = f.tag();
if(tag) {
TagLib::String artist, albumartist, title, album, genre, comment;
TagLib::String artist, albumartist, title, album, genre, comment, unsyncedlyrics;
int year, track, disc;
float rgAlbumGain, rgAlbumPeak, rgTrackGain, rgTrackPeak;
TagLib::String cuesheet;
@ -73,6 +73,7 @@
genre = tag->genre();
comment = tag->comment();
cuesheet = tag->cuesheet();
unsyncedlyrics = tag->unsyncedlyrics();
year = tag->year();
[dict setObject:@(year) forKey:@"year"];
@ -130,6 +131,9 @@
if(!comment.isEmpty())
[dict setObject:[NSString stringWithUTF8String:comment.toCString(true)] forKey:@"comment"];
if(!unsyncedlyrics.isEmpty())
[dict setObject:[NSString stringWithUTF8String:unsyncedlyrics.toCString(true)] forKey:@"unsyncedlyrics"];
// Try to load the image.
NSData *image = nil;

View File

@ -73,7 +73,7 @@
const TagLib::Tag *tag = f.tag();
if(tag) {
TagLib::String artist, albumartist, title, album, genre, comment;
TagLib::String artist, albumartist, title, album, genre, comment, unsyncedlyrics;
int year, track, disc;
float rgAlbumGain, rgAlbumPeak, rgTrackGain, rgTrackPeak;
TagLib::String cuesheet;
@ -87,6 +87,8 @@
genre = tag->genre();
comment = tag->comment();
cuesheet = tag->cuesheet();
unsyncedlyrics = tag->unsyncedlyrics();
year = tag->year();
[dict setObject:@(year) forKey:@"year"];
@ -144,6 +146,9 @@
if(!comment.isEmpty())
[dict setObject:[NSString stringWithUTF8String:comment.toCString(true)] forKey:@"comment"];
if(!unsyncedlyrics.isEmpty())
[dict setObject:[NSString stringWithUTF8String:unsyncedlyrics.toCString(true)] forKey:@"unsyncedlyrics"];
}
// Try to load the image.