2009-03-08 20:04:09 +00:00
|
|
|
//
|
|
|
|
// MissingAlbumArtTransformer.m
|
|
|
|
// Cog
|
|
|
|
//
|
|
|
|
// Created by Vincent Spader on 3/8/09.
|
|
|
|
// Copyright 2009 __MyCompanyName__. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "MissingAlbumArtTransformer.h"
|
|
|
|
|
|
|
|
@implementation MissingAlbumArtTransformer
|
|
|
|
|
2022-02-07 05:49:27 +00:00
|
|
|
+ (Class)transformedValueClass {
|
|
|
|
return [NSImage class];
|
|
|
|
}
|
|
|
|
+ (BOOL)allowsReverseTransformation {
|
|
|
|
return NO;
|
|
|
|
}
|
2009-03-08 20:04:09 +00:00
|
|
|
|
|
|
|
// Convert from NSImage to NSImage
|
|
|
|
- (id)transformedValue:(id)value {
|
2022-02-07 05:49:27 +00:00
|
|
|
if(value == nil) {
|
2009-03-08 20:04:09 +00:00
|
|
|
return [NSImage imageNamed:@"missingArt"];
|
|
|
|
}
|
2022-02-07 05:49:27 +00:00
|
|
|
|
2009-03-08 20:04:09 +00:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|