Merge lp:~rockstar/ubuntuone-ios-music/no-more-mogenerator into lp:ubuntuone-ios-music

Proposed by Paul Hummer
Status: Merged
Approved by: Paul Hummer
Approved revision: 243
Merged at revision: 240
Proposed branch: lp:~rockstar/ubuntuone-ios-music/no-more-mogenerator
Merge into: lp:ubuntuone-ios-music
Diff against target: 215 lines (+83/-12)
9 files modified
Models/Album.h (+12/-3)
Models/Album.m (+7/-0)
Models/Artist.h (+10/-3)
Models/Artist.m (+4/-0)
Models/Playlist.h (+6/-2)
Models/Playlist.m (+4/-0)
Models/Song.h (+22/-3)
Models/Song.m (+16/-0)
utilities/ArtistParser.m (+2/-1)
To merge this branch: bzr merge lp:~rockstar/ubuntuone-ios-music/no-more-mogenerator
Reviewer Review Type Date Requested Status
Michał Karnicki (community) Approve
Review via email: mp+133007@code.launchpad.net

Commit message

Don't inherit from mogenerator generated classes

Description of the change

RestKit doesn't seem to like the mogenerator code at all. I'm trying an experiment to see if it's needed at all. Just go with it.

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
1=== modified file 'Models/Album.h'
2--- Models/Album.h 2012-02-17 16:39:42 +0000
3+++ Models/Album.h 2012-11-06 02:19:20 +0000
4@@ -13,9 +13,11 @@
5 // You should have received a copy of the GNU Affero General Public License
6 // along with this program. If not, see <http://www.gnu.org/licenses/>.
7
8-#import "_Album.h"
9-
10-@interface Album : _Album {}
11+#import <CoreData/CoreData.h>
12+
13+@class Artist;
14+
15+@interface Album : NSManagedObject {}
16 + (BOOL)albumWithIdExists:(NSString*)anAlbumId;
17 + (Album*)albumWithId:(NSString*)anAlbumId;
18 + (Album*)albumWithTitle:(NSString*)albumTitle artist:(NSString*)albumArtist;
19@@ -24,4 +26,11 @@
20 - (NSString*)dearticlizedTitle;
21 - (NSString *)idPath;
22 - (BOOL)hasCachedSongs;
23+
24+@property (nonatomic, retain) NSString *albumId;
25+@property (nonatomic, retain) NSString *artist;
26+@property (nonatomic, retain) Artist* artistEntity;
27+@property (nonatomic, retain) NSString *coverArtId;
28+@property (nonatomic, retain) NSString *title;
29+@property (nonatomic, retain) NSSet* songs;
30 @end
31
32=== modified file 'Models/Album.m'
33--- Models/Album.m 2012-02-17 17:00:15 +0000
34+++ Models/Album.m 2012-11-06 02:19:20 +0000
35@@ -27,6 +27,13 @@
36
37 @implementation Album
38
39+@dynamic albumId;
40+@dynamic artist;
41+@dynamic artistEntity;
42+@dynamic coverArtId;
43+@dynamic title;
44+@dynamic songs;
45+
46 + (BOOL)albumWithIdExists:(NSString*)anAlbumId
47 {
48 return (nil != [Album albumWithId:anAlbumId]);
49
50=== modified file 'Models/Artist.h'
51--- Models/Artist.h 2012-02-17 16:39:42 +0000
52+++ Models/Artist.h 2012-11-06 02:19:20 +0000
53@@ -13,9 +13,11 @@
54 // You should have received a copy of the GNU Affero General Public License
55 // along with this program. If not, see <http://www.gnu.org/licenses/>.
56
57-#import "_Artist.h"
58-
59-@interface Artist : _Artist {}
60+#import <CoreData/CoreData.h>
61+
62+@class Album;
63+
64+@interface Artist : NSManagedObject {}
65 + (Artist*)artistWithId:(NSString*)anArtistId;
66 + (BOOL)artistWithIdExists:(NSString*)anArtistId;
67 + (Artist*)artistWithName:(NSString*)artistName;
68@@ -24,4 +26,9 @@
69 - (NSError*)loadAlbums;
70 - (NSString *)idPath;
71 - (BOOL)hasCachedSongs;
72+
73+@property (nonatomic, retain) NSString *artistId;
74+@property (nonatomic, retain) NSString *name;
75+@property (nonatomic, retain) NSSet* albums;
76+
77 @end
78
79=== modified file 'Models/Artist.m'
80--- Models/Artist.m 2012-02-17 17:00:15 +0000
81+++ Models/Artist.m 2012-11-06 02:19:20 +0000
82@@ -27,6 +27,10 @@
83
84 @implementation Artist
85
86+@dynamic artistId;
87+@dynamic name;
88+@dynamic albums;
89+
90 + (BOOL)artistWithIdExists:(NSString*)anArtistId
91 {
92 return [Artist artistWithId:anArtistId] != nil;
93
94=== modified file 'Models/Playlist.h'
95--- Models/Playlist.h 2012-01-07 04:48:49 +0000
96+++ Models/Playlist.h 2012-11-06 02:19:20 +0000
97@@ -13,11 +13,11 @@
98 // You should have received a copy of the GNU Affero General Public License
99 // along with this program. If not, see <http://www.gnu.org/licenses/>.
100
101-#import "_Playlist.h"
102+#import <CoreData/CoreData.h>
103
104 @class Song;
105
106-@interface Playlist : _Playlist {}
107+@interface Playlist : NSManagedObject {}
108 + (BOOL)playlistWithNameExists:(NSString*)aPlaylistName;
109 + (Playlist*)playlistWithName:(NSString*)aPlaylistName;
110 - (BOOL)matchesSearchQuery:(NSString *)query;
111@@ -26,4 +26,8 @@
112 - (BOOL)isEditable;
113 - (void)addSong:(Song*)song;
114 - (void)removeSong:(Song*)song;
115+
116+@property (nonatomic, retain) NSString *name;
117+@property (nonatomic, retain) NSString *playlistId;
118+@property (nonatomic, retain) NSSet* playlistSongIndexes;
119 @end
120
121=== modified file 'Models/Playlist.m'
122--- Models/Playlist.m 2012-01-07 04:48:49 +0000
123+++ Models/Playlist.m 2012-11-06 02:19:20 +0000
124@@ -22,6 +22,10 @@
125
126 @implementation Playlist
127
128+@dynamic name;
129+@dynamic playlistId;
130+@dynamic playlistSongIndexes;
131+
132 + (BOOL)playlistWithNameExists:(NSString *)aPlaylistName
133 {
134 return (nil != [Playlist playlistWithName:aPlaylistName]);
135
136=== modified file 'Models/Song.h'
137--- Models/Song.h 2012-02-10 17:36:20 +0000
138+++ Models/Song.h 2012-11-06 02:19:20 +0000
139@@ -13,13 +13,32 @@
140 // You should have received a copy of the GNU Affero General Public License
141 // along with this program. If not, see <http://www.gnu.org/licenses/>.
142
143-#import "_Song.h"
144-
145-@interface Song : _Song {}
146+#import <CoreData/CoreData.h>
147+
148+@class Album;
149+@class Artist;
150+
151+@interface Song : NSManagedObject {}
152 + (BOOL)songWithIdExists:(NSString*)aSongId;
153 + (Song*)songWithId:(NSString*)aSongId;
154 - (BOOL)matchesSearchQuery:(NSString *)query;
155 - (NSString *)dearticlizedTitle;
156 - (BOOL)cachedSongExists;
157 - (NSString*)idPath;
158+
159+@property (nonatomic, retain) NSString *songId;
160+@property (nonatomic, retain) NSString *title;
161+@property (nonatomic, retain) NSNumber *track;
162+@property (nonatomic, retain) NSNumber *discNumber;
163+@property (nonatomic, retain) NSString *artist;
164+@property (nonatomic, retain) NSString *album;
165+@property (nonatomic, retain) NSNumber *duration;
166+@property (nonatomic, retain) Album *albumEntity;
167+@property (nonatomic, retain) NSString *coverArtId;
168+@property (nonatomic, retain) NSString *genre;
169+@property (nonatomic, retain) NSString *path;
170+@property (nonatomic, retain) NSNumber *bitRate;
171+@property (nonatomic, retain) NSNumber *year;
172+@property (nonatomic, retain) Artist *artistEntity;
173+@property (nonatomic, retain) NSNumber *size;
174 @end
175
176=== modified file 'Models/Song.m'
177--- Models/Song.m 2012-02-17 17:42:26 +0000
178+++ Models/Song.m 2012-11-06 02:19:20 +0000
179@@ -21,6 +21,22 @@
180
181 @implementation Song
182
183+@dynamic discNumber;
184+@dynamic genre;
185+@dynamic artistEntity;
186+@dynamic artist;
187+@dynamic path;
188+@dynamic size;
189+@dynamic album;
190+@dynamic albumEntity;
191+@dynamic bitRate;
192+@dynamic track;
193+@dynamic songId;
194+@dynamic coverArtId;
195+@dynamic year;
196+@dynamic title;
197+@dynamic duration;
198+
199 + (BOOL)songWithIdExists:(NSString*)aSongId
200 {
201 return (nil != [Song songWithId:aSongId]);
202
203=== modified file 'utilities/ArtistParser.m'
204--- utilities/ArtistParser.m 2012-02-21 16:13:15 +0000
205+++ utilities/ArtistParser.m 2012-11-06 02:19:20 +0000
206@@ -71,7 +71,8 @@
207 {
208 album = [NSEntityDescription insertNewObjectForEntityForName:@"Album" inManagedObjectContext:PerThreadManagedObjectContext()];
209 album.albumId = albumId;
210- [artist addAlbumsObject:album];
211+ // XXX: rockstar - WTF? This method isn't implemented anywhere.
212+ //[artist addAlbumsObject:album];
213 }
214 album.artist = [attributeDict nilifiedValueForKey:@"artist"];
215 album.title = [attributeDict objectForKey:@"title"];

Subscribers

People subscribed via source and target branches