Tags: Added unsynced lyrics tag interface

Added an unsynced lyrics tag interface to the PlaylistEntry class

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
main
Christopher Snowhill 2023-02-23 17:39:52 -08:00
parent ed281eb743
commit 7e2a286b83
No known key found for this signature in database
2 changed files with 20 additions and 0 deletions

View File

@ -85,6 +85,8 @@
@property(nonatomic) NSString *_Nullable date;
@property(nonatomic) NSString *_Nullable unsyncedlyrics;
@property(nonatomic) NSString *_Nullable comment;
- (NSString *_Nullable)readAllValuesAsString:(NSString *_Nonnull)tagName;

View File

@ -777,6 +777,24 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path) {
[self setValue:@"year" fromString:nil];
}
@dynamic unsyncedlyrics;
- (NSString *)unsyncedlyrics {
NSString *value = [self readAllValuesAsString:@"unsyncedlyrics"];
if(!value) {
value = [self readAllValuesAsString:@"unsynced lyrics"];
}
if(!value) {
value = [self readAllValuesAsString:@"lyrics"];
}
return value;
}
- (void)setUnsyncedlyrics:(NSString *)unsyncedlyrics {
[self setValue:@"unsyncedlyrics" fromString:unsyncedlyrics];
[self setValue:@"unsynced lyrics" fromString:nil];
[self setValue:@"lyrics" fromString:nil];
}
@dynamic comment;
- (NSString *)comment {
return [self readAllValuesAsString:@"comment"];