Tags: Added unsynced lyrics tag interface

Added an unsynced lyrics tag interface to the PlaylistEntry class

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
xcode15
Christopher Snowhill 2023-02-23 17:39:52 -08:00
parent 5743652879
commit c34d869b99
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"];