~ubuntuone-ios-client-team/ubuntuone-ios-contacts/trunk

« back to all changes in this revision

Viewing changes to musicstreaming/utilities/ArtistParser.m

  • Committer: Jason Foreman
  • Date: 2011-06-16 18:33:42 UTC
  • mfrom: (191.1.60 master)
  • Revision ID: jason.foreman@canonical.com-20110616183342-vl7a4804xsf0s1b5
Merging branches for v 2.0.

lp:~threeve/ubuntuone-ios-client/master
lp:~urbanape/ubuntuone-ios-client/downloader

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
                                                
69
69
                        if (nil == album)
70
70
                        {
71
 
                                Album *album = [NSEntityDescription insertNewObjectForEntityForName:@"Album" inManagedObjectContext:PerThreadManagedObjectContext()];
 
71
                                album = [NSEntityDescription insertNewObjectForEntityForName:@"Album" inManagedObjectContext:PerThreadManagedObjectContext()];
72
72
                                
73
73
                                album.title = [attributeDict objectForKey:@"title"];
74
74
                                album.albumId = [attributeDict objectForKey:@"id"];
75
 
                                
76
 
                                if ([attributeDict objectForKey:@"coverArt"])
77
 
                                {
78
 
                                        album.coverArtId = [attributeDict objectForKey:@"coverArt"];
79
 
                                }
 
75
                                album.coverArtId = [attributeDict objectForKey:@"coverArt"];
80
76
                                
81
77
                                [artist addAlbumsObject:album];                 
82
78
                                SaveContext();
83
79
                        }
84
 
                        else if (nil == album.artistEntity)
 
80
 
 
81
                        if (nil == album.artistEntity)
85
82
                        {
86
83
                                album.artistEntity = artist;
87
84
                                SaveContext();