Skip to content

Commit 43b6257

Browse files
committed
TagLib: Don't collide with inputs' own chapters
TagLib reader seems to not support chapter title reading, so don't override title if it's the same as the album name. Fixes #458 along with the next commit Signed-off-by: Christopher Snowhill <kode54@gmail.com>
1 parent 09d329d commit 43b6257

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎Plugins/TagLib/TagLibMetadataReader.m‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,11 @@ + (NSDictionary *)readMetadataFromTag:(const TagLib::Tag *)tag {
8282
if(!album.isEmpty())
8383
[dict setObject:[NSString stringWithUTF8String:album.toCString(true)] forKey:@"album"];
8484

85-
if(!title.isEmpty())
86-
[dict setObject:[NSString stringWithUTF8String:title.toCString(true)] forKey:@"title"];
85+
if(!title.isEmpty()) {
86+
// XXX workaround for colliding with chapterized inputs' readers
87+
if(album.isEmpty() || title != album)
88+
[dict setObject:[NSString stringWithUTF8String:title.toCString(true)] forKey:@"title"];
89+
}
8790

8891
if(!genre.isEmpty())
8992
[dict setObject:[NSString stringWithUTF8String:genre.toCString(true)] forKey:@"genre"];

0 commit comments

Comments
 (0)