Merge lp:~rockstar/ubuntuone-ios-music/albumart-loading into lp:~ubuntuone-ios-client-team/ubuntuone-ios-music/moriarty

Proposed by Paul Hummer
Status: Merged
Merge reported by: Paul Hummer
Merged at revision: not available
Proposed branch: lp:~rockstar/ubuntuone-ios-music/albumart-loading
Merge into: lp:~ubuntuone-ios-client-team/ubuntuone-ios-music/moriarty
Prerequisite: lp:~rockstar/ubuntuone-ios-music/dial-down
Diff against target: 705 lines (+226/-30)
19 files modified
Music/AppDelegate.h (+4/-0)
Music/AppDelegate.m (+18/-2)
Music/Categories/NSString+Extras.m (+5/-3)
Music/Models/Album.h (+2/-2)
Music/Models/Album.m (+12/-3)
Music/Models/Artist.h (+1/-1)
Music/Models/Artist.m (+9/-1)
Music/Models/Song.h (+0/-1)
Music/Models/Song.m (+17/-1)
Music/Models/UOModel.h (+8/-0)
Music/Models/UOModel.m (+31/-0)
Music/Storyboard_iPhone.storyboard (+64/-11)
Music/UOMusic.xcdatamodeld/UOMusic.xcdatamodel/contents (+4/-4)
Music/Utilities/UOWebServiceController.m (+2/-0)
Music/View Controllers/AlbumViewController.m (+8/-0)
Music/View Controllers/ArtistViewController.m (+8/-0)
Music/View Controllers/Table Cells/AlbumCell.m (+11/-0)
Music/View Controllers/Table Cells/ArtistCell.m (+10/-0)
Music/View Controllers/Table Cells/SongCell.m (+12/-1)
To merge this branch: bzr merge lp:~rockstar/ubuntuone-ios-music/albumart-loading
Reviewer Review Type Date Requested Status
Michał Karnicki (community) Approve
Review via email: mp+141685@code.launchpad.net

Description of the change

This branch adds the album art fetching and display to the views in the places
they are prescribed. I think they're a little awkward now, but it's not
polishing time.

To post a comment you must log in.
Revision history for this message
Michał Karnicki (karni) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Music/AppDelegate.h'
--- Music/AppDelegate.h 2013-01-02 23:52:23 +0000
+++ Music/AppDelegate.h 2013-01-02 23:52:23 +0000
@@ -16,8 +16,12 @@
16@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;16@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
17@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;17@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
1818
19@property (nonatomic, retain) NSOperationQueue *queue;
20
19- (void)saveContext;21- (void)saveContext;
20- (NSURL *)applicationDocumentsDirectory;22- (NSURL *)applicationDocumentsDirectory;
23- (NSURL *)applicationCachesDirectory;
24- (NSURL *)albumArtDirectory;
2125
22+ (AppDelegate *)delegate;26+ (AppDelegate *)delegate;
2327
2428
=== modified file 'Music/AppDelegate.m'
--- Music/AppDelegate.m 2013-01-02 23:52:23 +0000
+++ Music/AppDelegate.m 2013-01-02 23:52:23 +0000
@@ -38,6 +38,7 @@
3838
39- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {39- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
4040
41 self.queue = [[NSOperationQueue alloc] init];
41 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];42 self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
42 43
43 /* rockstar - WTF? This should just work with the target settings. */44 /* rockstar - WTF? This should just work with the target settings. */
@@ -172,11 +173,26 @@
172#pragma mark - Application's Documents directory173#pragma mark - Application's Documents directory
173174
174// Returns the URL to the application's Documents directory.175// Returns the URL to the application's Documents directory.
175- (NSURL *)applicationDocumentsDirectory176- (NSURL *)applicationDocumentsDirectory {
176{
177 return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];177 return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
178}178}
179179
180- (NSURL *)applicationCachesDirectory {
181 return [[[NSFileManager defaultManager] URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask] lastObject];
182}
183
184- (NSURL *)albumArtDirectory {
185 NSURL *path = [[self applicationCachesDirectory] URLByAppendingPathComponent:@"albumArt"];
186 if (![[NSFileManager defaultManager] fileExistsAtPath:[path path]]) {
187 NSError *error;
188 [[NSFileManager defaultManager] createDirectoryAtPath:[path path] withIntermediateDirectories:YES attributes:nil error:&error];
189 if (error) {
190 abort();
191 }
192 }
193 return path;
194}
195
180- (void)checkAuthentication {196- (void)checkAuthentication {
181 if (![[UOAuthManager sharedAuthManager] hasCredentials]) {197 if (![[UOAuthManager sharedAuthManager] hasCredentials]) {
182 UITabBarController *rootViewController = (UITabBarController *)self.window.rootViewController;198 UITabBarController *rootViewController = (UITabBarController *)self.window.rootViewController;
183199
=== modified file 'Music/Categories/NSString+Extras.m'
--- Music/Categories/NSString+Extras.m 2013-01-02 23:52:23 +0000
+++ Music/Categories/NSString+Extras.m 2013-01-02 23:52:23 +0000
@@ -45,9 +45,11 @@
45 return [[self dearticlizedString] substringToIndex:1];45 return [[self dearticlizedString] substringToIndex:1];
46}46}
4747
48- (NSString *)urlParameterEncodedString;48- (NSString *)urlParameterEncodedString {
49{49 CFStringRef resultRef = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)self, NULL, (__bridge CFStringRef)@":/?#[]@!$&’()*+,;=", kCFStringEncodingUTF8);
50 NSString *result = (__bridge id)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)self, NULL, (__bridge CFStringRef)@":/?#[]@!$&’()*+,;=", kCFStringEncodingUTF8);50 NSString *result = [(__bridge id)resultRef copy];
51 CFRelease(resultRef);
52
51 return result;53 return result;
52}54}
5355
5456
=== modified file 'Music/Models/Album.h'
--- Music/Models/Album.h 2013-01-02 23:52:23 +0000
+++ Music/Models/Album.h 2013-01-02 23:52:23 +0000
@@ -16,8 +16,7 @@
16@property (nonatomic, retain) NSString *albumId;16@property (nonatomic, retain) NSString *albumId;
17@property (nonatomic, retain) NSString *title;17@property (nonatomic, retain) NSString *title;
18@property (nonatomic, retain) NSString *url;18@property (nonatomic, retain) NSString *url;
19@property (nonatomic, retain) NSString *artUrl;19@property (nonatomic, retain) NSString *artHash;
20@property (nonatomic, retain) NSString *art;
2120
22@property (nonatomic, retain, readonly) NSString *dearticlizedTitle;21@property (nonatomic, retain, readonly) NSString *dearticlizedTitle;
23@property (nonatomic, retain, readonly) NSString *index;22@property (nonatomic, retain, readonly) NSString *index;
@@ -26,4 +25,5 @@
26@property (nonatomic, retain, readonly) Artist *artist;25@property (nonatomic, retain, readonly) Artist *artist;
2726
28@property (nonatomic, retain) NSSet *songs;27@property (nonatomic, retain) NSSet *songs;
28
29@end29@end
3030
=== modified file 'Music/Models/Album.m'
--- Music/Models/Album.m 2013-01-02 23:52:23 +0000
+++ Music/Models/Album.m 2013-01-02 23:52:23 +0000
@@ -11,13 +11,13 @@
11#import <RestKit/CoreData.h>11#import <RestKit/CoreData.h>
12#import "Artist.h"12#import "Artist.h"
13#import "NSString+Extras.h"13#import "NSString+Extras.h"
14#import "AppDelegate.h"
1415
15@implementation Album16@implementation Album
16@dynamic albumId;17@dynamic albumId;
17@dynamic title;18@dynamic title;
18@dynamic url;19@dynamic url;
19@dynamic art;20@dynamic artHash;
20@dynamic artUrl;
21@dynamic dearticlizedTitle;21@dynamic dearticlizedTitle;
2222
23@synthesize index;23@synthesize index;
@@ -27,6 +27,8 @@
2727
28@dynamic songs;28@dynamic songs;
2929
30#pragma mark - UOModel methods
31
30+ (RKEntityMapping *)objectMapping {32+ (RKEntityMapping *)objectMapping {
31 RKObjectManager *manager = [RKObjectManager sharedManager];33 RKObjectManager *manager = [RKObjectManager sharedManager];
32 34
@@ -35,7 +37,7 @@
35 [mapping addAttributeMappingsFromDictionary:@{37 [mapping addAttributeMappingsFromDictionary:@{
36 @"id": @"albumId",38 @"id": @"albumId",
37 @"album_url": @"url",39 @"album_url": @"url",
38 @"cover_art": @"art",40 @"cover_art": @"artHash",
39 @"album_art_url": @"artUrl",41 @"album_art_url": @"artUrl",
40 @"title": @"title",42 @"title": @"title",
41 @"artist_id": @"artistId"43 @"artist_id": @"artistId"
@@ -48,6 +50,12 @@
48 return @"response.albums";50 return @"response.albums";
49}51}
5052
53- (NSString *)artPath {
54 return [[[[AppDelegate delegate] albumArtDirectory] URLByAppendingPathComponent:[NSString stringWithFormat:@"album-%@.jpg", self.albumId]] path];
55}
56
57#pragma mark - Model specific methods
58
51- (void)setTitle:(NSString *)title {59- (void)setTitle:(NSString *)title {
52 [self setPrimitiveValue:title forKey:@"title"];60 [self setPrimitiveValue:title forKey:@"title"];
53 [self setValue:[[title dearticlizedString] uppercaseString] forKey:@"dearticlizedTitle"];61 [self setValue:[[title dearticlizedString] uppercaseString] forKey:@"dearticlizedTitle"];
@@ -82,4 +90,5 @@
82 return _index;90 return _index;
83}91}
8492
93
85@end94@end
8695
=== modified file 'Music/Models/Artist.h'
--- Music/Models/Artist.h 2013-01-02 23:52:23 +0000
+++ Music/Models/Artist.h 2013-01-02 23:52:23 +0000
@@ -15,10 +15,10 @@
15@property (nonatomic, retain) NSString *artistId;15@property (nonatomic, retain) NSString *artistId;
16@property (nonatomic, retain) NSString *name;16@property (nonatomic, retain) NSString *name;
17@property (nonatomic, retain) NSString *url;17@property (nonatomic, retain) NSString *url;
18@property (nonatomic, retain) NSString *artUrl;
1918
20@property (nonatomic, retain, readonly) NSString *dearticlizedName;19@property (nonatomic, retain, readonly) NSString *dearticlizedName;
21@property (nonatomic, retain, readonly) NSString *index;20@property (nonatomic, retain, readonly) NSString *index;
2221
23@property (nonatomic, retain) NSSet *albums;22@property (nonatomic, retain) NSSet *albums;
23
24@end24@end
2525
=== modified file 'Music/Models/Artist.m'
--- Music/Models/Artist.m 2013-01-02 23:52:23 +0000
+++ Music/Models/Artist.m 2013-01-02 23:52:23 +0000
@@ -9,17 +9,19 @@
9#import "Artist.h"9#import "Artist.h"
10#import <RestKit/RestKit.h>10#import <RestKit/RestKit.h>
11#import "NSString+Extras.h"11#import "NSString+Extras.h"
12#import "AppDelegate.h"
1213
13@implementation Artist14@implementation Artist
14@dynamic artistId;15@dynamic artistId;
15@dynamic name;16@dynamic name;
16@dynamic url;17@dynamic url;
17@dynamic artUrl;
18@dynamic albums;18@dynamic albums;
19@dynamic dearticlizedName;19@dynamic dearticlizedName;
2020
21@synthesize index;21@synthesize index;
2222
23#pragma mark - UOModel methods
24
23+ (RKEntityMapping *)objectMapping {25+ (RKEntityMapping *)objectMapping {
24 RKObjectManager *manager = [RKObjectManager sharedManager];26 RKObjectManager *manager = [RKObjectManager sharedManager];
25 27
@@ -38,6 +40,12 @@
38 return @"response.artists";40 return @"response.artists";
39}41}
4042
43- (NSString *)artPath {
44 return [[[[AppDelegate delegate] albumArtDirectory] URLByAppendingPathComponent:[NSString stringWithFormat:@"artist-%@.jpg", self.artistId]] path];
45}
46
47#pragma mark - Model specific methods
48
41- (void)setName:(NSString *)name {49- (void)setName:(NSString *)name {
42 [self setPrimitiveValue:name forKey:@"name"];50 [self setPrimitiveValue:name forKey:@"name"];
43 [self setValue:[[name dearticlizedString] uppercaseString] forKey:@"dearticlizedName"];51 [self setValue:[[name dearticlizedString] uppercaseString] forKey:@"dearticlizedName"];
4452
=== modified file 'Music/Models/Song.h'
--- Music/Models/Song.h 2013-01-02 23:52:23 +0000
+++ Music/Models/Song.h 2013-01-02 23:52:23 +0000
@@ -15,7 +15,6 @@
15@interface Song : UOModel15@interface Song : UOModel
1616
17@property (nonatomic, retain) NSString *url;17@property (nonatomic, retain) NSString *url;
18@property (nonatomic, retain) NSString *artUrl;
19@property (nonatomic, retain) NSString *suffix;18@property (nonatomic, retain) NSString *suffix;
20@property (nonatomic, retain) NSString *track;19@property (nonatomic, retain) NSString *track;
21@property (nonatomic, retain) NSString *title;20@property (nonatomic, retain) NSString *title;
2221
=== modified file 'Music/Models/Song.m'
--- Music/Models/Song.m 2013-01-02 23:52:23 +0000
+++ Music/Models/Song.m 2013-01-02 23:52:23 +0000
@@ -11,11 +11,11 @@
11#import "Artist.h"11#import "Artist.h"
12#import "Album.h"12#import "Album.h"
13#import "NSString+Extras.h"13#import "NSString+Extras.h"
14#import "AppDelegate.h"
1415
15@implementation Song16@implementation Song
1617
17@dynamic url;18@dynamic url;
18@dynamic artUrl;
19@dynamic suffix;19@dynamic suffix;
20@dynamic track;20@dynamic track;
21@dynamic title;21@dynamic title;
@@ -32,11 +32,15 @@
32@dynamic dearticlizedTitle;32@dynamic dearticlizedTitle;
3333
34@synthesize index;34@synthesize index;
35/* Override to fall through to album's artUrl */
36@synthesize artUrl;
3537
36@dynamic album;38@dynamic album;
37@dynamic artist;39@dynamic artist;
38@dynamic albumArtist;40@dynamic albumArtist;
3941
42#pragma mark - UOModel methods
43
40+ (RKEntityMapping *)objectMapping {44+ (RKEntityMapping *)objectMapping {
41 RKObjectManager *manager = [RKObjectManager sharedManager];45 RKObjectManager *manager = [RKObjectManager sharedManager];
42 46
@@ -44,7 +48,9 @@
44 [mapping setIdentificationAttributes:@[@"songId"]];48 [mapping setIdentificationAttributes:@[@"songId"]];
45 [mapping addAttributeMappingsFromDictionary:@{49 [mapping addAttributeMappingsFromDictionary:@{
46 @"song_url": @"url",50 @"song_url": @"url",
51 /* Disabled, since we want to fall through to album's art.
47 @"song_art_url": @"artUrl",52 @"song_art_url": @"artUrl",
53 */
48 @"suffix": @"suffix",54 @"suffix": @"suffix",
49 @"track": @"track",55 @"track": @"track",
50 @"title": @"title",56 @"title": @"title",
@@ -69,6 +75,16 @@
69 return @"response.songs";75 return @"response.songs";
70}76}
7177
78- (NSString *)artPath {
79 return self.album.artPath;
80}
81
82#pragma mark - Model specific methods
83
84- (NSString *)artUrl {
85 return self.album.artUrl;
86}
87
72- (void)setTitle:(NSString *)_title {88- (void)setTitle:(NSString *)_title {
73 [self setPrimitiveValue:_title forKey:@"title"];89 [self setPrimitiveValue:_title forKey:@"title"];
74 [self setValue:[[_title dearticlizedString] uppercaseString] forKey:@"dearticlizedTitle"];90 [self setValue:[[_title dearticlizedString] uppercaseString] forKey:@"dearticlizedTitle"];
7591
=== modified file 'Music/Models/UOModel.h'
--- Music/Models/UOModel.h 2013-01-02 23:52:23 +0000
+++ Music/Models/UOModel.h 2013-01-02 23:52:23 +0000
@@ -14,4 +14,12 @@
14+ (void)registerMapping;14+ (void)registerMapping;
15+ (RKEntityMapping *)objectMapping;15+ (RKEntityMapping *)objectMapping;
16+ (NSString *)keyPath;16+ (NSString *)keyPath;
17
18/* Not used for playlist */
19@property (nonatomic, retain) NSString *artUrl;
20
21/* Used for fetching art */
22@property (nonatomic, readonly) UIImage *art;
23- (NSString *)artPath;
24- (void)fetchArt:(void (^)(UIImage *))completionBlock;
17@end25@end
1826
=== modified file 'Music/Models/UOModel.m'
--- Music/Models/UOModel.m 2013-01-02 23:52:23 +0000
+++ Music/Models/UOModel.m 2013-01-02 23:52:23 +0000
@@ -8,9 +8,13 @@
88
9#import "UOModel.h"9#import "UOModel.h"
10#import <RestKit/RestKit.h>10#import <RestKit/RestKit.h>
11#import "AppDelegate.h"
12#import "UOAuthManager.h"
1113
12@implementation UOModel14@implementation UOModel
1315
16@dynamic artUrl;
17
14+ (void)registerMapping {18+ (void)registerMapping {
15 RKObjectManager *manager = [RKObjectManager sharedManager];19 RKObjectManager *manager = [RKObjectManager sharedManager];
16 20
@@ -32,4 +36,31 @@
32 return @"";36 return @"";
33}37}
3438
39- (UIImage *)art {
40 NSString *path = [self artPath];
41 if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
42 return nil;
43 }
44 return [UIImage imageWithContentsOfFile:path];
45}
46
47- (void)fetchArt:(void (^)(UIImage *))completionBlock {
48 NSOperationQueue *queue = [[AppDelegate delegate] queue];
49 NSString *path = [self artPath];
50 NSURLRequest *echo = [UOAuthManager oauthRequestForPath:self.artUrl];
51 NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:self.artUrl]];
52 [request setHTTPMethod:@"GET"];
53 [request addValue:[echo valueForHTTPHeaderField:@"Authorization"] forHTTPHeaderField:@"Authorization"];
54
55 [NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
56 UIImage *image = [UIImage imageWithData:data];
57 [UIImageJPEGRepresentation(image, 1) writeToFile:path atomically:YES];
58 completionBlock(image);
59 }];
60}
61
62- (NSString *)artPath {
63 return nil;
64}
65
35@end66@end
3667
=== modified file 'Music/Storyboard_iPhone.storyboard'
--- Music/Storyboard_iPhone.storyboard 2013-01-02 23:52:23 +0000
+++ Music/Storyboard_iPhone.storyboard 2013-01-02 23:52:23 +0000
@@ -36,7 +36,7 @@
36 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>36 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
37 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>37 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
38 <prototypes>38 <prototypes>
39 <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="Wy4-11-qhh" detailTextLabel="PUO-bG-eLt" style="IBUITableViewCellStyleSubtitle" id="TCk-Kb-c61" customClass="ArtistCell">39 <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="Wy4-11-qhh" detailTextLabel="PUO-bG-eLt" imageView="EvX-DO-a8s" style="IBUITableViewCellStyleSubtitle" id="TCk-Kb-c61" customClass="ArtistCell">
40 <rect key="frame" x="0.0" y="22" width="320" height="44"/>40 <rect key="frame" x="0.0" y="22" width="320" height="44"/>
41 <autoresizingMask key="autoresizingMask"/>41 <autoresizingMask key="autoresizingMask"/>
42 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">42 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
@@ -44,19 +44,23 @@
44 <autoresizingMask key="autoresizingMask"/>44 <autoresizingMask key="autoresizingMask"/>
45 <subviews>45 <subviews>
46 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Wy4-11-qhh">46 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Wy4-11-qhh">
47 <rect key="frame" x="10" y="2" width="38" height="22"/>47 <rect key="frame" x="53" y="2" width="38" height="22"/>
48 <autoresizingMask key="autoresizingMask"/>48 <autoresizingMask key="autoresizingMask"/>
49 <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>49 <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
50 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>50 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
51 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>51 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
52 </label>52 </label>
53 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="PUO-bG-eLt">53 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="PUO-bG-eLt">
54 <rect key="frame" x="10" y="24" width="47" height="18"/>54 <rect key="frame" x="53" y="24" width="47" height="18"/>
55 <autoresizingMask key="autoresizingMask"/>55 <autoresizingMask key="autoresizingMask"/>
56 <fontDescription key="fontDescription" type="system" pointSize="14"/>56 <fontDescription key="fontDescription" type="system" pointSize="14"/>
57 <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>57 <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>
58 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>58 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
59 </label>59 </label>
60 <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="default-album-art-120.png" id="EvX-DO-a8s">
61 <rect key="frame" x="0.0" y="0.0" width="43" height="43"/>
62 <autoresizingMask key="autoresizingMask"/>
63 </imageView>
60 </subviews>64 </subviews>
61 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>65 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
62 </view>66 </view>
@@ -85,12 +89,32 @@
85 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>89 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
86 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>90 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
87 <prototypes>91 <prototypes>
88 <tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="Cell" id="Y5x-0G-rno" customClass="AlbumCell">92 <tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="Cell" textLabel="G72-IX-jh9" detailTextLabel="VIc-Rn-YXm" imageView="F2l-py-JAO" style="IBUITableViewCellStyleSubtitle" id="Y5x-0G-rno" customClass="AlbumCell">
89 <rect key="frame" x="0.0" y="22" width="320" height="44"/>93 <rect key="frame" x="0.0" y="22" width="320" height="44"/>
90 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>94 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
91 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">95 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
92 <rect key="frame" x="0.0" y="0.0" width="320" height="43"/>96 <rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
93 <autoresizingMask key="autoresizingMask"/>97 <autoresizingMask key="autoresizingMask"/>
98 <subviews>
99 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="G72-IX-jh9">
100 <rect key="frame" x="53" y="2" width="38" height="22"/>
101 <autoresizingMask key="autoresizingMask"/>
102 <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
103 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
104 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
105 </label>
106 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="VIc-Rn-YXm">
107 <rect key="frame" x="53" y="24" width="47" height="18"/>
108 <autoresizingMask key="autoresizingMask"/>
109 <fontDescription key="fontDescription" type="system" pointSize="14"/>
110 <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>
111 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
112 </label>
113 <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="default-album-art-120.png" id="F2l-py-JAO">
114 <rect key="frame" x="0.0" y="0.0" width="43" height="43"/>
115 <autoresizingMask key="autoresizingMask"/>
116 </imageView>
117 </subviews>
94 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>118 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
95 </view>119 </view>
96 <connections>120 <connections>
@@ -146,12 +170,32 @@
146 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>170 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
147 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>171 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
148 <prototypes>172 <prototypes>
149 <tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="Cell" id="vAU-q1-3Z9" customClass="SongCell">173 <tableViewCell contentMode="scaleToFill" selectionStyle="blue" indentationWidth="10" reuseIdentifier="Cell" textLabel="0Be-Uu-e1M" detailTextLabel="cgX-vu-iNg" imageView="xX5-x4-y65" style="IBUITableViewCellStyleSubtitle" id="vAU-q1-3Z9" customClass="SongCell">
150 <rect key="frame" x="0.0" y="22" width="320" height="44"/>174 <rect key="frame" x="0.0" y="22" width="320" height="44"/>
151 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>175 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
152 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">176 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
153 <rect key="frame" x="0.0" y="0.0" width="320" height="43"/>177 <rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
154 <autoresizingMask key="autoresizingMask"/>178 <autoresizingMask key="autoresizingMask"/>
179 <subviews>
180 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0Be-Uu-e1M">
181 <rect key="frame" x="53" y="2" width="38" height="22"/>
182 <autoresizingMask key="autoresizingMask"/>
183 <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
184 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
185 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
186 </label>
187 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="cgX-vu-iNg">
188 <rect key="frame" x="53" y="24" width="47" height="18"/>
189 <autoresizingMask key="autoresizingMask"/>
190 <fontDescription key="fontDescription" type="system" pointSize="14"/>
191 <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>
192 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
193 </label>
194 <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="default-album-art-120.png" id="xX5-x4-y65">
195 <rect key="frame" x="0.0" y="0.0" width="43" height="43"/>
196 <autoresizingMask key="autoresizingMask"/>
197 </imageView>
198 </subviews>
155 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>199 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
156 </view>200 </view>
157 </tableViewCell>201 </tableViewCell>
@@ -218,7 +262,7 @@
218 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>262 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
219 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>263 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
220 <prototypes>264 <prototypes>
221 <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="lHq-bS-Zm9" detailTextLabel="03B-YT-E7s" style="IBUITableViewCellStyleSubtitle" id="5s2-Qn-BOB" customClass="AlbumCell">265 <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="lHq-bS-Zm9" detailTextLabel="03B-YT-E7s" imageView="apM-jL-xHe" style="IBUITableViewCellStyleSubtitle" id="5s2-Qn-BOB" customClass="AlbumCell">
222 <rect key="frame" x="0.0" y="22" width="320" height="44"/>266 <rect key="frame" x="0.0" y="22" width="320" height="44"/>
223 <autoresizingMask key="autoresizingMask"/>267 <autoresizingMask key="autoresizingMask"/>
224 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">268 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
@@ -226,19 +270,23 @@
226 <autoresizingMask key="autoresizingMask"/>270 <autoresizingMask key="autoresizingMask"/>
227 <subviews>271 <subviews>
228 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="lHq-bS-Zm9">272 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="lHq-bS-Zm9">
229 <rect key="frame" x="10" y="2" width="38" height="22"/>273 <rect key="frame" x="53" y="2" width="38" height="22"/>
230 <autoresizingMask key="autoresizingMask"/>274 <autoresizingMask key="autoresizingMask"/>
231 <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>275 <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
232 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>276 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
233 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>277 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
234 </label>278 </label>
235 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="03B-YT-E7s">279 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="03B-YT-E7s">
236 <rect key="frame" x="10" y="24" width="47" height="18"/>280 <rect key="frame" x="53" y="24" width="47" height="18"/>
237 <autoresizingMask key="autoresizingMask"/>281 <autoresizingMask key="autoresizingMask"/>
238 <fontDescription key="fontDescription" type="system" pointSize="14"/>282 <fontDescription key="fontDescription" type="system" pointSize="14"/>
239 <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>283 <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>
240 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>284 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
241 </label>285 </label>
286 <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="default-album-art-120.png" id="apM-jL-xHe">
287 <rect key="frame" x="0.0" y="0.0" width="43" height="43"/>
288 <autoresizingMask key="autoresizingMask"/>
289 </imageView>
242 </subviews>290 </subviews>
243 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>291 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
244 </view>292 </view>
@@ -263,7 +311,7 @@
263 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>311 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
264 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>312 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
265 <prototypes>313 <prototypes>
266 <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="OwY-7W-CUV" detailTextLabel="ORO-PT-T6b" style="IBUITableViewCellStyleSubtitle" id="jpK-Yt-5Y9" customClass="SongCell">314 <tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="Cell" textLabel="OwY-7W-CUV" detailTextLabel="ORO-PT-T6b" imageView="Ynd-vW-pQI" style="IBUITableViewCellStyleSubtitle" id="jpK-Yt-5Y9" customClass="SongCell">
267 <rect key="frame" x="0.0" y="22" width="320" height="44"/>315 <rect key="frame" x="0.0" y="22" width="320" height="44"/>
268 <autoresizingMask key="autoresizingMask"/>316 <autoresizingMask key="autoresizingMask"/>
269 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">317 <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
@@ -271,19 +319,23 @@
271 <autoresizingMask key="autoresizingMask"/>319 <autoresizingMask key="autoresizingMask"/>
272 <subviews>320 <subviews>
273 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="OwY-7W-CUV">321 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="OwY-7W-CUV">
274 <rect key="frame" x="10" y="2" width="38" height="22"/>322 <rect key="frame" x="53" y="2" width="38" height="22"/>
275 <autoresizingMask key="autoresizingMask"/>323 <autoresizingMask key="autoresizingMask"/>
276 <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>324 <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
277 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>325 <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
278 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>326 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
279 </label>327 </label>
280 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ORO-PT-T6b">328 <label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ORO-PT-T6b">
281 <rect key="frame" x="10" y="24" width="47" height="18"/>329 <rect key="frame" x="53" y="24" width="47" height="18"/>
282 <autoresizingMask key="autoresizingMask"/>330 <autoresizingMask key="autoresizingMask"/>
283 <fontDescription key="fontDescription" type="system" pointSize="14"/>331 <fontDescription key="fontDescription" type="system" pointSize="14"/>
284 <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>332 <color key="textColor" red="0.50196078431372548" green="0.50196078431372548" blue="0.50196078431372548" alpha="1" colorSpace="calibratedRGB"/>
285 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>333 <color key="highlightedColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
286 </label>334 </label>
335 <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="default-album-art-120.png" id="Ynd-vW-pQI">
336 <rect key="frame" x="0.0" y="0.0" width="43" height="43"/>
337 <autoresizingMask key="autoresizingMask"/>
338 </imageView>
287 </subviews>339 </subviews>
288 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>340 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
289 </view>341 </view>
@@ -559,6 +611,7 @@
559 <resources>611 <resources>
560 <image name="albums.png" width="30" height="30"/>612 <image name="albums.png" width="30" height="30"/>
561 <image name="artists.png" width="30" height="30"/>613 <image name="artists.png" width="30" height="30"/>
614 <image name="default-album-art-120.png" width="60" height="60"/>
562 <image name="playlists.png" width="30" height="30"/>615 <image name="playlists.png" width="30" height="30"/>
563 <image name="settings.png" width="30" height="30"/>616 <image name="settings.png" width="30" height="30"/>
564 <image name="songs.png" width="30" height="30"/>617 <image name="songs.png" width="30" height="30"/>
565618
=== modified file 'Music/UOMusic.xcdatamodeld/UOMusic.xcdatamodel/contents'
--- Music/UOMusic.xcdatamodeld/UOMusic.xcdatamodel/contents 2013-01-02 23:52:23 +0000
+++ Music/UOMusic.xcdatamodeld/UOMusic.xcdatamodel/contents 2013-01-02 23:52:23 +0000
@@ -2,7 +2,7 @@
2<model name="" userDefinedModelVersionIdentifier="UOMusic0" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1811" systemVersion="12C60" minimumToolsVersion="Xcode 4.3" macOSVersion="Automatic" iOSVersion="Automatic">2<model name="" userDefinedModelVersionIdentifier="UOMusic0" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1811" systemVersion="12C60" minimumToolsVersion="Xcode 4.3" macOSVersion="Automatic" iOSVersion="Automatic">
3 <entity name="Album" representedClassName="Album" syncable="YES">3 <entity name="Album" representedClassName="Album" syncable="YES">
4 <attribute name="albumId" attributeType="String" indexed="YES" syncable="YES"/>4 <attribute name="albumId" attributeType="String" indexed="YES" syncable="YES"/>
5 <attribute name="art" optional="YES" attributeType="String" syncable="YES"/>5 <attribute name="artHash" optional="YES" attributeType="String" syncable="YES"/>
6 <attribute name="artUrl" optional="YES" attributeType="String" syncable="YES"/>6 <attribute name="artUrl" optional="YES" attributeType="String" syncable="YES"/>
7 <attribute name="dearticlizedTitle" attributeType="String" syncable="YES"/>7 <attribute name="dearticlizedTitle" attributeType="String" syncable="YES"/>
8 <attribute name="index" optional="YES" transient="YES" attributeType="String" syncable="YES"/>8 <attribute name="index" optional="YES" transient="YES" attributeType="String" syncable="YES"/>
@@ -12,6 +12,7 @@
12 <relationship name="songs" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Song" inverseName="album" inverseEntity="Song" syncable="YES"/>12 <relationship name="songs" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Song" inverseName="album" inverseEntity="Song" syncable="YES"/>
13 </entity>13 </entity>
14 <entity name="Artist" representedClassName="Artist" syncable="YES">14 <entity name="Artist" representedClassName="Artist" syncable="YES">
15 <attribute name="art" optional="YES" transient="YES" attributeType="Transformable" syncable="YES"/>
15 <attribute name="artistId" attributeType="String" indexed="YES" syncable="YES"/>16 <attribute name="artistId" attributeType="String" indexed="YES" syncable="YES"/>
16 <attribute name="artUrl" optional="YES" attributeType="String" syncable="YES"/>17 <attribute name="artUrl" optional="YES" attributeType="String" syncable="YES"/>
17 <attribute name="dearticlizedName" attributeType="String" syncable="YES"/>18 <attribute name="dearticlizedName" attributeType="String" syncable="YES"/>
@@ -30,7 +31,6 @@
30 <attribute name="url" attributeType="String" syncable="YES"/>31 <attribute name="url" attributeType="String" syncable="YES"/>
31 </entity>32 </entity>
32 <entity name="Song" representedClassName="Song" syncable="YES">33 <entity name="Song" representedClassName="Song" syncable="YES">
33 <attribute name="artUrl" optional="YES" attributeType="String" syncable="YES"/>
34 <attribute name="bitRate" optional="YES" attributeType="String" syncable="YES"/>34 <attribute name="bitRate" optional="YES" attributeType="String" syncable="YES"/>
35 <attribute name="contentType" optional="YES" attributeType="String" syncable="YES"/>35 <attribute name="contentType" optional="YES" attributeType="String" syncable="YES"/>
36 <attribute name="dearticlizedTitle" attributeType="String" syncable="YES"/>36 <attribute name="dearticlizedTitle" attributeType="String" syncable="YES"/>
@@ -53,8 +53,8 @@
53 </entity>53 </entity>
54 <elements>54 <elements>
55 <element name="Album" positionX="468" positionY="180" width="128" height="180"/>55 <element name="Album" positionX="468" positionY="180" width="128" height="180"/>
56 <element name="Artist" positionX="160" positionY="195" width="128" height="165"/>56 <element name="Artist" positionX="160" positionY="195" width="128" height="180"/>
57 <element name="Playlist" positionX="160" positionY="192" width="128" height="135"/>57 <element name="Playlist" positionX="160" positionY="192" width="128" height="135"/>
58 <element name="Song" positionX="160" positionY="192" width="128" height="345"/>58 <element name="Song" positionX="160" positionY="192" width="128" height="330"/>
59 </elements>59 </elements>
60</model>60</model>
61\ No newline at end of file61\ No newline at end of file
6262
=== modified file 'Music/Utilities/UOWebServiceController.m'
--- Music/Utilities/UOWebServiceController.m 2013-01-02 23:52:23 +0000
+++ Music/Utilities/UOWebServiceController.m 2013-01-02 23:52:23 +0000
@@ -169,6 +169,7 @@
169}169}
170170
171- (void)initRestKit {171- (void)initRestKit {
172 RKLogConfigureByName("RestKit/Network", RKLogLevelWarning);
172 173
173 NSURL *baseUrl = [NSURL URLWithString:@"https://one.ubuntu.com/api/music/v2/"];174 NSURL *baseUrl = [NSURL URLWithString:@"https://one.ubuntu.com/api/music/v2/"];
174 RKObjectManager *objectManager = [RKObjectManager managerWithBaseURL:baseUrl];175 RKObjectManager *objectManager = [RKObjectManager managerWithBaseURL:baseUrl];
@@ -190,6 +191,7 @@
190 NSError *error;191 NSError *error;
191 [managedObjectStore addSQLitePersistentStoreAtPath:[RKApplicationDataDirectory() stringByAppendingPathComponent:@"UOMusic.sqlite"] fromSeedDatabaseAtPath:nil withConfiguration:nil options:nil error:&error];192 [managedObjectStore addSQLitePersistentStoreAtPath:[RKApplicationDataDirectory() stringByAppendingPathComponent:@"UOMusic.sqlite"] fromSeedDatabaseAtPath:nil withConfiguration:nil options:nil error:&error];
192 if (error) {193 if (error) {
194 NSLog(@"Database model is out of date");
193 abort();195 abort();
194 }196 }
195 [objectManager setManagedObjectStore:managedObjectStore];197 [objectManager setManagedObjectStore:managedObjectStore];
196198
=== modified file 'Music/View Controllers/AlbumViewController.m'
--- Music/View Controllers/AlbumViewController.m 2013-01-02 23:52:23 +0000
+++ Music/View Controllers/AlbumViewController.m 2013-01-02 23:52:23 +0000
@@ -38,6 +38,14 @@
38 38
39 [_albumTitle setText:album.title];39 [_albumTitle setText:album.title];
40 [_albumDescription setText:album.artist.name];40 [_albumDescription setText:album.artist.name];
41 if (!album.art) {
42 [album fetchArt:^(UIImage *image) {
43 [self.albumArt setImage:image];
44 [self.albumArt setNeedsDisplay];
45 }];
46 } else {
47 [self.albumArt setImage:album.art];
48 }
41 49
42 if ([album.songs count]) {50 if ([album.songs count]) {
43 NSArray *sortDescriptors = [NSArray arrayWithObjects:[[NSSortDescriptor alloc] initWithKey:@"track" ascending:NO], nil];51 NSArray *sortDescriptors = [NSArray arrayWithObjects:[[NSSortDescriptor alloc] initWithKey:@"track" ascending:NO], nil];
4452
=== modified file 'Music/View Controllers/ArtistViewController.m'
--- Music/View Controllers/ArtistViewController.m 2013-01-02 23:52:23 +0000
+++ Music/View Controllers/ArtistViewController.m 2013-01-02 23:52:23 +0000
@@ -41,6 +41,14 @@
41 [self fetchArtist];41 [self fetchArtist];
42 42
43 [_artistName setText:artist.name];43 [_artistName setText:artist.name];
44 if (!artist.art) {
45 [artist fetchArt:^(UIImage *image) {
46 [self.albumArt setImage:image];
47 [self.albumArt setNeedsDisplay];
48 }];
49 } else {
50 [self.albumArt setImage:artist.art];
51 }
44 52
45 NSString *pluralizedNoun = @"albums";53 NSString *pluralizedNoun = @"albums";
46 if ([artist.albums count] == 1) {54 if ([artist.albums count] == 1) {
4755
=== modified file 'Music/View Controllers/Table Cells/AlbumCell.m'
--- Music/View Controllers/Table Cells/AlbumCell.m 2013-01-02 23:52:23 +0000
+++ Music/View Controllers/Table Cells/AlbumCell.m 2013-01-02 23:52:23 +0000
@@ -13,6 +13,17 @@
1313
14- (void)setAlbum:(Album *)album {14- (void)setAlbum:(Album *)album {
15 _album = album;15 _album = album;
16
17 if (!album.art) {
18 [self.imageView setImage:[UIImage imageNamed:@"default-album-art-120.png"]];
19 [album fetchArt:^(UIImage *image) {
20 [self.imageView setImage:image];
21 [self setNeedsDisplay];
22 }];
23 } else {
24 [self.imageView setImage:album.art];
25 }
26
16 [self.textLabel setText:album.title];27 [self.textLabel setText:album.title];
17 28
18 [self.detailTextLabel setText:album.artist.name];29 [self.detailTextLabel setText:album.artist.name];
1930
=== modified file 'Music/View Controllers/Table Cells/ArtistCell.m'
--- Music/View Controllers/Table Cells/ArtistCell.m 2013-01-02 23:52:23 +0000
+++ Music/View Controllers/Table Cells/ArtistCell.m 2013-01-02 23:52:23 +0000
@@ -14,6 +14,16 @@
14- (void)setArtist:(Artist *)artist {14- (void)setArtist:(Artist *)artist {
15 _artist = artist;15 _artist = artist;
16 16
17 if (!artist.art) {
18 [self.imageView setImage:[UIImage imageNamed:@"default-album-art-120.png"]];
19 [artist fetchArt:^(UIImage *image) {
20 [self.imageView setImage:image];
21 [self setNeedsDisplay];
22 }];
23 } else {
24 [self.imageView setImage:artist.art];
25 }
26
17 [self.textLabel setText:artist.name];27 [self.textLabel setText:artist.name];
18 if ([artist.albums count] > 0) {28 if ([artist.albums count] > 0) {
19 NSString *pluralizedNoun = @"albums";29 NSString *pluralizedNoun = @"albums";
2030
=== modified file 'Music/View Controllers/Table Cells/SongCell.m'
--- Music/View Controllers/Table Cells/SongCell.m 2013-01-02 23:52:23 +0000
+++ Music/View Controllers/Table Cells/SongCell.m 2013-01-02 23:52:23 +0000
@@ -7,6 +7,7 @@
7//7//
88
9#import "SongCell.h"9#import "SongCell.h"
10#import "Artist.h"
1011
11@implementation SongCell12@implementation SongCell
12@synthesize song = _song;13@synthesize song = _song;
@@ -14,8 +15,18 @@
14- (void)setSong:(Song *)song {15- (void)setSong:(Song *)song {
15 _song = song;16 _song = song;
16 17
18 if (!song.art) {
19 [self.imageView setImage:[UIImage imageNamed:@"default-album-art-120.png"]];
20 [song fetchArt:^(UIImage *image) {
21 [self.imageView setImage:image];
22 [self setNeedsDisplay];
23 }];
24 } else {
25 [self.imageView setImage:song.art];
26 }
27
17 [self.textLabel setText:song.title];28 [self.textLabel setText:song.title];
18 //[self.detailTextLabel setText:song.artist];29 [self.detailTextLabel setText:song.artist.name];
19}30}
2031
21@end32@end

Subscribers

People subscribed via source and target branches