Tags: Implement unsynced lyrics into TagLib plugin

Implement unsynced lyrics reading into TagLib frontend plugin.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
xcode15
Christopher Snowhill 2023-02-23 17:41:50 -08:00
parent 790eb5508b
commit 190d6959fd
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"];
@ -131,6 +132,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;
@ -88,6 +88,8 @@
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.