[Playlist Storage] Add another compatibility hook

Add a compatibility getter/setter for URL, which was renamed to url, due
to Core Storage having a requirement of all attributes starting with a
lower case letter.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
swiftingly
Christopher Snowhill 2022-06-16 17:43:48 -07:00
parent 333c6c7e8b
commit 789e8e432e
3 changed files with 12 additions and 1 deletions

View File

@ -1348,7 +1348,7 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
NSURL *url = [[self selectedObjects][0] URL];
NSURL *url = [[self selectedObjects][0] url];
if([url isFileURL]) [ws selectFile:[url path] inFileViewerRootedAtPath:[url path]];
}

View File

@ -64,6 +64,7 @@
@property(nonatomic) NSData *_Nullable albumArtInternal;
@property(nonatomic) BOOL Unsigned;
@property(nonatomic) NSURL *URL;
- (void)setMetadata:(NSDictionary *_Nonnull)metadata;

View File

@ -471,6 +471,16 @@ NSURL *_Nullable urlForPath(NSString *_Nullable path) {
self.unSigned = Unsigned;
}
// More of the same
@dynamic URL;
- (NSURL *)URL {
return self.url;
}
- (void)setURL:(NSURL *)URL {
self.url = URL;
}
- (void)setMetadata:(NSDictionary *)metadata {
if(metadata == nil) {
self.error = YES;