Merge lp:~urbanape/ubuntuone-ios-client/2.0-9-prerelease into lp:ubuntuone-ios-client
- 2.0-9-prerelease
- Merge into trunk
Proposed by
Zachery Bir
Status: | Merged |
---|---|
Approved by: | Zachery Bir |
Approved revision: | 199 |
Merged at revision: | 194 |
Proposed branch: | lp:~urbanape/ubuntuone-ios-client/2.0-9-prerelease |
Merge into: | lp:ubuntuone-ios-client |
Diff against target: |
1954 lines (+431/-656) 46 files modified
musicstreaming/categories/NSMutableArray+Extras.h (+2/-0) musicstreaming/categories/NSMutableArray+Extras.m (+34/-0) musicstreaming/categories/NSMutableSet+Extras.h (+0/-26) musicstreaming/categories/NSMutableSet+Extras.m (+0/-57) musicstreaming/controls/MiniHudView.h (+0/-17) musicstreaming/controls/MiniHudView.m (+0/-54) musicstreaming/iSub-Info.plist (+1/-1) musicstreaming/iSub.xcodeproj/project.pbxproj (+7/-17) musicstreaming/models/Album.m (+2/-2) musicstreaming/models/Artist.m (+2/-2) musicstreaming/models/Playlist.h (+12/-9) musicstreaming/models/Playlist.m (+43/-7) musicstreaming/models/PlaylistSongIndex.h (+32/-0) musicstreaming/models/PlaylistSongIndex.m (+27/-0) musicstreaming/models/Song.h (+7/-6) musicstreaming/models/Song.m (+9/-3) musicstreaming/utilities/AlbumParser.m (+1/-0) musicstreaming/utilities/Globals.h (+12/-1) musicstreaming/utilities/Globals.m (+12/-1) musicstreaming/utilities/PlaylistListParser.m (+15/-9) musicstreaming/utilities/PlaylistParser.h (+2/-2) musicstreaming/utilities/PlaylistParser.m (+9/-5) musicstreaming/utilities/Subsonic.h (+1/-1) musicstreaming/utilities/Subsonic.m (+4/-7) musicstreaming/utilities/operations/AbstractNetworkOperation.h (+12/-1) musicstreaming/utilities/operations/AbstractNetworkOperation.m (+12/-1) musicstreaming/utilities/operations/AlbumArtLoader.h (+12/-1) musicstreaming/utilities/operations/AlbumArtLoader.m (+14/-3) musicstreaming/utilities/operations/AlbumArtLoadingOperation.h (+12/-1) musicstreaming/utilities/operations/AlbumArtLoadingOperation.m (+12/-1) musicstreaming/utilities/operations/DownloadOperation.h (+12/-1) musicstreaming/utilities/operations/DownloadOperation.m (+12/-1) musicstreaming/utilities/operations/Downloader.h (+12/-1) musicstreaming/utilities/operations/Downloader.m (+12/-1) musicstreaming/view_controllers/ArtistViewController.m (+0/-1) musicstreaming/view_controllers/PlaylistEditAlbumViewController.m (+2/-2) musicstreaming/view_controllers/PlaylistEditSongListViewController.m (+4/-2) musicstreaming/view_controllers/PlaylistEditViewController.h (+2/-4) musicstreaming/view_controllers/PlaylistEditViewController.m (+11/-29) musicstreaming/view_controllers/PlaylistListViewController.m (+13/-13) musicstreaming/view_controllers/PlaylistViewController.m (+40/-25) musicstreaming/view_controllers/SongViewController.m (+0/-1) musicstreaming/view_controllers/SubsonicTableViewController.h (+0/-2) musicstreaming/view_controllers/SubsonicTableViewController.m (+3/-21) musicstreaming/view_controllers/SubsonicViewController.m (+0/-3) musicstreaming/xibs/PlaylistEditViewController.xib (+0/-314) |
To merge this branch: | bzr merge lp:~urbanape/ubuntuone-ios-client/2.0-9-prerelease |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jason Foreman (community) | Approve | ||
Review via email: mp+65364@code.launchpad.net |
Commit message
Description of the change
This branch uses disc_number to aid sort in album view. Currently, this only works server-side with lp:~urbanape/ubuntuone-servers/include-disc-number-by-default, but will be exposed on production shortly. In the interim, songs will continue to be ordered by tracks, doubling up tracks in multi-disc albums.
To post a comment you must log in.
Revision history for this message
Zachery Bir (urbanape) wrote : | # |
- 199. By Zachery Bir
-
Remove unneeded code, and an unneeded .xib, properly organize the PlaylistEditVie
wController to not get clever with nested tab bar controllers
Revision history for this message
Jason Foreman (threeve) wrote : | # |
Looks good to me!
review:
Approve
- 200. By Zachery Bir
-
Put back in just enough to make the loading/refreshing work properly
- 201. By Zachery Bir
-
Bumped to build number 10
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'musicstreaming/categories/NSMutableArray+Extras.h' | |||
2 | --- musicstreaming/categories/NSMutableArray+Extras.h 2011-03-29 14:22:42 +0000 | |||
3 | +++ musicstreaming/categories/NSMutableArray+Extras.h 2011-06-21 18:28:35 +0000 | |||
4 | @@ -21,4 +21,6 @@ | |||
5 | 21 | 21 | ||
6 | 22 | @interface NSMutableArray (Extras) | 22 | @interface NSMutableArray (Extras) |
7 | 23 | - (void)shuffle; | 23 | - (void)shuffle; |
8 | 24 | - (void)addKeyValueObjectFromArray:(NSArray *)array; | ||
9 | 25 | - (NSString*)urlEncodedString; | ||
10 | 24 | @end | 26 | @end |
11 | 25 | 27 | ||
12 | === modified file 'musicstreaming/categories/NSMutableArray+Extras.m' | |||
13 | --- musicstreaming/categories/NSMutableArray+Extras.m 2011-03-29 14:22:42 +0000 | |||
14 | +++ musicstreaming/categories/NSMutableArray+Extras.m 2011-06-21 18:28:35 +0000 | |||
15 | @@ -19,6 +19,19 @@ | |||
16 | 19 | 19 | ||
17 | 20 | #import "NSMutableArray+Extras.h" | 20 | #import "NSMutableArray+Extras.h" |
18 | 21 | 21 | ||
19 | 22 | // helper function: get the string form of any object | ||
20 | 23 | static NSString *toString(id object) | ||
21 | 24 | { | ||
22 | 25 | return [NSString stringWithFormat: @"%@", object]; | ||
23 | 26 | } | ||
24 | 27 | |||
25 | 28 | // helper function: get the url encoded string form of any object | ||
26 | 29 | static NSString *urlEncode(id object) | ||
27 | 30 | { | ||
28 | 31 | NSString *string = toString(object); | ||
29 | 32 | return [string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; | ||
30 | 33 | } | ||
31 | 34 | |||
32 | 22 | @implementation NSMutableArray (Extras) | 35 | @implementation NSMutableArray (Extras) |
33 | 23 | - (void)shuffle | 36 | - (void)shuffle |
34 | 24 | { | 37 | { |
35 | @@ -32,4 +45,25 @@ | |||
36 | 32 | [self exchangeObjectAtIndex:i withObjectAtIndex:n]; | 45 | [self exchangeObjectAtIndex:i withObjectAtIndex:n]; |
37 | 33 | } | 46 | } |
38 | 34 | } | 47 | } |
39 | 48 | |||
40 | 49 | - (void)addKeyValueObjectFromArray:(NSArray *)array | ||
41 | 50 | { | ||
42 | 51 | [self addObject:[NSDictionary dictionaryWithObjects:array | ||
43 | 52 | forKeys:[NSArray arrayWithObjects:@"key", @"value", nil]]]; | ||
44 | 53 | } | ||
45 | 54 | |||
46 | 55 | - (NSString*)urlEncodedString | ||
47 | 56 | { | ||
48 | 57 | NSMutableArray *parts = [NSMutableArray array]; | ||
49 | 58 | |||
50 | 59 | for (id object in self) | ||
51 | 60 | { | ||
52 | 61 | id key = [object objectForKey:@"key"]; | ||
53 | 62 | id value = [object objectForKey:@"value"]; | ||
54 | 63 | NSString *part = [NSString stringWithFormat:@"%@=%@",urlEncode(key),urlEncode(value)]; | ||
55 | 64 | [parts addObject:part]; | ||
56 | 65 | } | ||
57 | 66 | return [parts componentsJoinedByString:@"&"]; | ||
58 | 67 | } | ||
59 | 68 | |||
60 | 35 | @end | 69 | @end |
61 | 36 | 70 | ||
62 | === removed file 'musicstreaming/categories/NSMutableSet+Extras.h' | |||
63 | --- musicstreaming/categories/NSMutableSet+Extras.h 2011-04-08 01:55:24 +0000 | |||
64 | +++ musicstreaming/categories/NSMutableSet+Extras.h 1970-01-01 00:00:00 +0000 | |||
65 | @@ -1,26 +0,0 @@ | |||
66 | 1 | // | ||
67 | 2 | // NSMutableSet+Extras.h | ||
68 | 3 | // iSub | ||
69 | 4 | // | ||
70 | 5 | // Created by Zachery Bir on 4/7/11. | ||
71 | 6 | // Copyright 2011 Canonical Ltd. | ||
72 | 7 | // | ||
73 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
74 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
75 | 10 | // as published by the Free Software Foundation. | ||
76 | 11 | // | ||
77 | 12 | // This program is distributed in the hope that it will be useful, but | ||
78 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
79 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
80 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
81 | 16 | // | ||
82 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
83 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
84 | 19 | |||
85 | 20 | #import <Foundation/Foundation.h> | ||
86 | 21 | |||
87 | 22 | |||
88 | 23 | @interface NSMutableSet (Extras) | ||
89 | 24 | - (void)addKeyValueObjectFromArray:(NSArray *)array; | ||
90 | 25 | - (NSString*)urlEncodedString; | ||
91 | 26 | @end | ||
92 | 27 | 0 | ||
93 | === removed file 'musicstreaming/categories/NSMutableSet+Extras.m' | |||
94 | --- musicstreaming/categories/NSMutableSet+Extras.m 2011-04-08 01:55:24 +0000 | |||
95 | +++ musicstreaming/categories/NSMutableSet+Extras.m 1970-01-01 00:00:00 +0000 | |||
96 | @@ -1,57 +0,0 @@ | |||
97 | 1 | // | ||
98 | 2 | // NSMutableSet+Extras.m | ||
99 | 3 | // iSub | ||
100 | 4 | // | ||
101 | 5 | // Created by Zachery Bir on 4/7/11. | ||
102 | 6 | // Copyright 2011 Canonical Ltd. | ||
103 | 7 | // | ||
104 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
105 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
106 | 10 | // as published by the Free Software Foundation. | ||
107 | 11 | // | ||
108 | 12 | // This program is distributed in the hope that it will be useful, but | ||
109 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
110 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
111 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
112 | 16 | // | ||
113 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
114 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
115 | 19 | |||
116 | 20 | #import "NSMutableSet+Extras.h" | ||
117 | 21 | |||
118 | 22 | // helper function: get the string form of any object | ||
119 | 23 | static NSString *toString(id object) | ||
120 | 24 | { | ||
121 | 25 | return [NSString stringWithFormat: @"%@", object]; | ||
122 | 26 | } | ||
123 | 27 | |||
124 | 28 | // helper function: get the url encoded string form of any object | ||
125 | 29 | static NSString *urlEncode(id object) | ||
126 | 30 | { | ||
127 | 31 | NSString *string = toString(object); | ||
128 | 32 | return [string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; | ||
129 | 33 | } | ||
130 | 34 | |||
131 | 35 | @implementation NSMutableSet (Extras) | ||
132 | 36 | |||
133 | 37 | - (void)addKeyValueObjectFromArray:(NSArray *)array | ||
134 | 38 | { | ||
135 | 39 | [self addObject:[NSDictionary dictionaryWithObjects:array | ||
136 | 40 | forKeys:[NSArray arrayWithObjects:@"key", @"value", nil]]]; | ||
137 | 41 | } | ||
138 | 42 | |||
139 | 43 | - (NSString*)urlEncodedString | ||
140 | 44 | { | ||
141 | 45 | NSMutableArray *parts = [NSMutableArray array]; | ||
142 | 46 | |||
143 | 47 | for (id object in self) | ||
144 | 48 | { | ||
145 | 49 | id key = [object objectForKey:@"key"]; | ||
146 | 50 | id value = [object objectForKey:@"value"]; | ||
147 | 51 | NSString *part = [NSString stringWithFormat:@"%@=%@",urlEncode(key),urlEncode(value)]; | ||
148 | 52 | [parts addObject:part]; | ||
149 | 53 | } | ||
150 | 54 | return [parts componentsJoinedByString:@"&"]; | ||
151 | 55 | } | ||
152 | 56 | |||
153 | 57 | @end | ||
154 | 58 | 0 | ||
155 | === removed file 'musicstreaming/controls/MiniHudView.h' | |||
156 | --- musicstreaming/controls/MiniHudView.h 2011-05-02 07:47:25 +0000 | |||
157 | +++ musicstreaming/controls/MiniHudView.h 1970-01-01 00:00:00 +0000 | |||
158 | @@ -1,17 +0,0 @@ | |||
159 | 1 | // | ||
160 | 2 | // MiniHudView.h | ||
161 | 3 | // iSub | ||
162 | 4 | // | ||
163 | 5 | // Created by Aaron Brethorst on 5/2/11. | ||
164 | 6 | // Copyright 2011 Canonical. All rights reserved. | ||
165 | 7 | // | ||
166 | 8 | |||
167 | 9 | #import <UIKit/UIKit.h> | ||
168 | 10 | |||
169 | 11 | @interface MiniHudView : UIView | ||
170 | 12 | { | ||
171 | 13 | UIActivityIndicatorView *spinner; | ||
172 | 14 | } | ||
173 | 15 | - (void)show:(BOOL)yn; | ||
174 | 16 | - (void)hide:(BOOL)yn; | ||
175 | 17 | @end | ||
176 | 18 | 0 | ||
177 | === removed file 'musicstreaming/controls/MiniHudView.m' | |||
178 | --- musicstreaming/controls/MiniHudView.m 2011-05-02 07:47:25 +0000 | |||
179 | +++ musicstreaming/controls/MiniHudView.m 1970-01-01 00:00:00 +0000 | |||
180 | @@ -1,54 +0,0 @@ | |||
181 | 1 | // | ||
182 | 2 | // MiniHudView.m | ||
183 | 3 | // iSub | ||
184 | 4 | // | ||
185 | 5 | // Created by Aaron Brethorst on 5/2/11. | ||
186 | 6 | // Copyright 2011 Canonical. All rights reserved. | ||
187 | 7 | // | ||
188 | 8 | |||
189 | 9 | #import "MiniHudView.h" | ||
190 | 10 | #import <QuartzCore/QuartzCore.h> | ||
191 | 11 | |||
192 | 12 | @implementation MiniHudView | ||
193 | 13 | |||
194 | 14 | - (id)initWithFrame:(CGRect)aFrame | ||
195 | 15 | { | ||
196 | 16 | if ((self = [super initWithFrame:aFrame])) | ||
197 | 17 | { | ||
198 | 18 | self.opaque = NO; | ||
199 | 19 | self.backgroundColor = [UIColor colorWithWhite:0.3 alpha:0.9f]; | ||
200 | 20 | self.layer.cornerRadius = 8.0f; | ||
201 | 21 | |||
202 | 22 | spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; | ||
203 | 23 | spinner.frame = CGRectMake(5, 5, 20, 20); | ||
204 | 24 | [self addSubview:spinner]; | ||
205 | 25 | |||
206 | 26 | self.hidden = YES; | ||
207 | 27 | } | ||
208 | 28 | return self; | ||
209 | 29 | } | ||
210 | 30 | |||
211 | 31 | - (void)layoutSubviews | ||
212 | 32 | { | ||
213 | 33 | [super layoutSubviews]; | ||
214 | 34 | } | ||
215 | 35 | |||
216 | 36 | - (void)show:(BOOL)yn | ||
217 | 37 | { | ||
218 | 38 | [spinner startAnimating]; | ||
219 | 39 | self.hidden = NO; | ||
220 | 40 | } | ||
221 | 41 | |||
222 | 42 | - (void)hide:(BOOL)yn | ||
223 | 43 | { | ||
224 | 44 | [spinner stopAnimating]; | ||
225 | 45 | self.hidden = YES; | ||
226 | 46 | } | ||
227 | 47 | |||
228 | 48 | - (void)dealloc | ||
229 | 49 | { | ||
230 | 50 | [spinner release]; | ||
231 | 51 | [super dealloc]; | ||
232 | 52 | } | ||
233 | 53 | |||
234 | 54 | @end | ||
235 | 55 | 0 | ||
236 | === modified file 'musicstreaming/iSub-Info.plist' | |||
237 | --- musicstreaming/iSub-Info.plist 2011-06-07 09:20:03 +0000 | |||
238 | +++ musicstreaming/iSub-Info.plist 2011-06-21 18:28:35 +0000 | |||
239 | @@ -41,7 +41,7 @@ | |||
240 | 41 | </dict> | 41 | </dict> |
241 | 42 | </array> | 42 | </array> |
242 | 43 | <key>CFBundleVersion</key> | 43 | <key>CFBundleVersion</key> |
244 | 44 | <string>6</string> | 44 | <string>10</string> |
245 | 45 | <key>LSRequiresIPhoneOS</key> | 45 | <key>LSRequiresIPhoneOS</key> |
246 | 46 | <false/> | 46 | <false/> |
247 | 47 | <key>NSMainNibFile</key> | 47 | <key>NSMainNibFile</key> |
248 | 48 | 48 | ||
249 | === modified file 'musicstreaming/iSub.xcodeproj/project.pbxproj' | |||
250 | --- musicstreaming/iSub.xcodeproj/project.pbxproj 2011-06-16 16:39:50 +0000 | |||
251 | +++ musicstreaming/iSub.xcodeproj/project.pbxproj 2011-06-21 18:28:35 +0000 | |||
252 | @@ -21,14 +21,12 @@ | |||
253 | 21 | 91018B0B13573BBB0051EFDC /* UIImage+Resize.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B0A13573BBB0051EFDC /* UIImage+Resize.m */; }; | 21 | 91018B0B13573BBB0051EFDC /* UIImage+Resize.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B0A13573BBB0051EFDC /* UIImage+Resize.m */; }; |
254 | 22 | 91018B0E13573D150051EFDC /* UIImage+Alpha.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B0D13573D150051EFDC /* UIImage+Alpha.m */; }; | 22 | 91018B0E13573D150051EFDC /* UIImage+Alpha.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B0D13573D150051EFDC /* UIImage+Alpha.m */; }; |
255 | 23 | 91018B1113573D350051EFDC /* UIImage+RoundedCorner.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B1013573D350051EFDC /* UIImage+RoundedCorner.m */; }; | 23 | 91018B1113573D350051EFDC /* UIImage+RoundedCorner.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B1013573D350051EFDC /* UIImage+RoundedCorner.m */; }; |
256 | 24 | 91018B25135922BF0051EFDC /* PlaylistEditViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 91018B24135922BE0051EFDC /* PlaylistEditViewController.xib */; }; | ||
257 | 25 | 91018B4B135A724B0051EFDC /* PlaylistEditAlbumListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B42135A724B0051EFDC /* PlaylistEditAlbumListViewController.m */; }; | 24 | 91018B4B135A724B0051EFDC /* PlaylistEditAlbumListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B42135A724B0051EFDC /* PlaylistEditAlbumListViewController.m */; }; |
258 | 26 | 91018B4C135A724B0051EFDC /* PlaylistEditAlbumViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B44135A724B0051EFDC /* PlaylistEditAlbumViewController.m */; }; | 25 | 91018B4C135A724B0051EFDC /* PlaylistEditAlbumViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B44135A724B0051EFDC /* PlaylistEditAlbumViewController.m */; }; |
259 | 27 | 91018B4D135A724B0051EFDC /* PlaylistEditArtistListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B46135A724B0051EFDC /* PlaylistEditArtistListViewController.m */; }; | 26 | 91018B4D135A724B0051EFDC /* PlaylistEditArtistListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B46135A724B0051EFDC /* PlaylistEditArtistListViewController.m */; }; |
260 | 28 | 91018B4E135A724B0051EFDC /* PlaylistEditArtistViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B48135A724B0051EFDC /* PlaylistEditArtistViewController.m */; }; | 27 | 91018B4E135A724B0051EFDC /* PlaylistEditArtistViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B48135A724B0051EFDC /* PlaylistEditArtistViewController.m */; }; |
261 | 29 | 91018B4F135A724B0051EFDC /* PlaylistEditSongListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B4A135A724B0051EFDC /* PlaylistEditSongListViewController.m */; }; | 28 | 91018B4F135A724B0051EFDC /* PlaylistEditSongListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B4A135A724B0051EFDC /* PlaylistEditSongListViewController.m */; }; |
262 | 30 | 9110DC38134C045A0046B8E4 /* AlbumParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC37134C04590046B8E4 /* AlbumParser.m */; }; | 29 | 9110DC38134C045A0046B8E4 /* AlbumParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC37134C04590046B8E4 /* AlbumParser.m */; }; |
263 | 31 | 9110DC41134E4EEF0046B8E4 /* NSMutableSet+Extras.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC40134E4EEF0046B8E4 /* NSMutableSet+Extras.m */; }; | ||
264 | 32 | 9110DC44134EAC740046B8E4 /* AlbumListParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC43134EAC730046B8E4 /* AlbumListParser.m */; }; | 30 | 9110DC44134EAC740046B8E4 /* AlbumListParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC43134EAC730046B8E4 /* AlbumListParser.m */; }; |
265 | 33 | 9110DC571354A7490046B8E4 /* AlbumArtistUITableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC561354A7470046B8E4 /* AlbumArtistUITableViewCell.m */; }; | 31 | 9110DC571354A7490046B8E4 /* AlbumArtistUITableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC561354A7470046B8E4 /* AlbumArtistUITableViewCell.m */; }; |
266 | 34 | 9112B0241383FF27003C1D93 /* albums.png in Resources */ = {isa = PBXBuildFile; fileRef = 9112B01E1383FF27003C1D93 /* albums.png */; }; | 32 | 9112B0241383FF27003C1D93 /* albums.png in Resources */ = {isa = PBXBuildFile; fileRef = 9112B01E1383FF27003C1D93 /* albums.png */; }; |
267 | @@ -61,6 +59,7 @@ | |||
268 | 61 | 91BE4018138E8D2300D44D68 /* UIActionSheet+Blocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 91BE4015138E8D2300D44D68 /* UIActionSheet+Blocks.m */; }; | 59 | 91BE4018138E8D2300D44D68 /* UIActionSheet+Blocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 91BE4015138E8D2300D44D68 /* UIActionSheet+Blocks.m */; }; |
269 | 62 | 91BE4019138E8D2300D44D68 /* UIAlertView+Blocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 91BE4017138E8D2300D44D68 /* UIAlertView+Blocks.m */; }; | 60 | 91BE4019138E8D2300D44D68 /* UIAlertView+Blocks.m in Sources */ = {isa = PBXBuildFile; fileRef = 91BE4017138E8D2300D44D68 /* UIAlertView+Blocks.m */; }; |
270 | 63 | 91BE401C138E8D3A00D44D68 /* RIButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 91BE401B138E8D3A00D44D68 /* RIButtonItem.m */; }; | 61 | 91BE401C138E8D3A00D44D68 /* RIButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 91BE401B138E8D3A00D44D68 /* RIButtonItem.m */; }; |
271 | 62 | 91E0778913ABAD6200AA7CB2 /* PlaylistSongIndex.m in Sources */ = {isa = PBXBuildFile; fileRef = 91E0778813ABAD6200AA7CB2 /* PlaylistSongIndex.m */; }; | ||
272 | 64 | 91E88609132DA82000618994 /* PlaylistParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 91E88608132DA82000618994 /* PlaylistParser.m */; }; | 63 | 91E88609132DA82000618994 /* PlaylistParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 91E88608132DA82000618994 /* PlaylistParser.m */; }; |
273 | 65 | 9316628812264A74003B0EB7 /* NSDate+Extras.m in Sources */ = {isa = PBXBuildFile; fileRef = 9316628712264A74003B0EB7 /* NSDate+Extras.m */; }; | 64 | 9316628812264A74003B0EB7 /* NSDate+Extras.m in Sources */ = {isa = PBXBuildFile; fileRef = 9316628712264A74003B0EB7 /* NSDate+Extras.m */; }; |
274 | 66 | 932E7A6E1254747E00E7C8FF /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 932E7A6D1254747E00E7C8FF /* Default@2x.png */; }; | 65 | 932E7A6E1254747E00E7C8FF /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 932E7A6D1254747E00E7C8FF /* Default@2x.png */; }; |
275 | @@ -100,7 +99,6 @@ | |||
276 | 100 | 93D6B5111252CA71007880B0 /* music_512.png in Resources */ = {isa = PBXBuildFile; fileRef = 93D6B50D1252CA71007880B0 /* music_512.png */; }; | 99 | 93D6B5111252CA71007880B0 /* music_512.png in Resources */ = {isa = PBXBuildFile; fileRef = 93D6B50D1252CA71007880B0 /* music_512.png */; }; |
277 | 101 | 93D6B5151252CB34007880B0 /* music_57@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 93D6B5141252CB34007880B0 /* music_57@2x.png */; }; | 100 | 93D6B5151252CB34007880B0 /* music_57@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 93D6B5141252CB34007880B0 /* music_57@2x.png */; }; |
278 | 102 | 93D6B54B1252CE57007880B0 /* URLQueryStringParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D6B54A1252CE57007880B0 /* URLQueryStringParser.m */; }; | 101 | 93D6B54B1252CE57007880B0 /* URLQueryStringParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D6B54A1252CE57007880B0 /* URLQueryStringParser.m */; }; |
279 | 103 | 93DF12D9136E968E00D6C085 /* MiniHudView.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DF12D8136E968E00D6C085 /* MiniHudView.m */; }; | ||
280 | 104 | 93DFFE3F135D70B60061F29F /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93DFFE3E135D70B60061F29F /* CoreData.framework */; }; | 102 | 93DFFE3F135D70B60061F29F /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93DFFE3E135D70B60061F29F /* CoreData.framework */; }; |
281 | 105 | 93DFFE45135D71030061F29F /* MOC.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DFFE44135D71030061F29F /* MOC.m */; }; | 103 | 93DFFE45135D71030061F29F /* MOC.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DFFE44135D71030061F29F /* MOC.m */; }; |
282 | 106 | 93DFFE4D135D71760061F29F /* music.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 93DFFE4C135D71760061F29F /* music.xcdatamodeld */; }; | 104 | 93DFFE4D135D71760061F29F /* music.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 93DFFE4C135D71760061F29F /* music.xcdatamodeld */; }; |
283 | @@ -163,7 +161,6 @@ | |||
284 | 163 | 91018B0D13573D150051EFDC /* UIImage+Alpha.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Alpha.m"; sourceTree = "<group>"; }; | 161 | 91018B0D13573D150051EFDC /* UIImage+Alpha.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+Alpha.m"; sourceTree = "<group>"; }; |
285 | 164 | 91018B0F13573D350051EFDC /* UIImage+RoundedCorner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+RoundedCorner.h"; sourceTree = "<group>"; }; | 162 | 91018B0F13573D350051EFDC /* UIImage+RoundedCorner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+RoundedCorner.h"; sourceTree = "<group>"; }; |
286 | 165 | 91018B1013573D350051EFDC /* UIImage+RoundedCorner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+RoundedCorner.m"; sourceTree = "<group>"; }; | 163 | 91018B1013573D350051EFDC /* UIImage+RoundedCorner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+RoundedCorner.m"; sourceTree = "<group>"; }; |
287 | 166 | 91018B24135922BE0051EFDC /* PlaylistEditViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PlaylistEditViewController.xib; sourceTree = "<group>"; }; | ||
288 | 167 | 91018B41135A724B0051EFDC /* PlaylistEditAlbumListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistEditAlbumListViewController.h; path = view_controllers/PlaylistEditAlbumListViewController.h; sourceTree = "<group>"; }; | 164 | 91018B41135A724B0051EFDC /* PlaylistEditAlbumListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistEditAlbumListViewController.h; path = view_controllers/PlaylistEditAlbumListViewController.h; sourceTree = "<group>"; }; |
289 | 168 | 91018B42135A724B0051EFDC /* PlaylistEditAlbumListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PlaylistEditAlbumListViewController.m; path = view_controllers/PlaylistEditAlbumListViewController.m; sourceTree = "<group>"; }; | 165 | 91018B42135A724B0051EFDC /* PlaylistEditAlbumListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PlaylistEditAlbumListViewController.m; path = view_controllers/PlaylistEditAlbumListViewController.m; sourceTree = "<group>"; }; |
290 | 169 | 91018B43135A724B0051EFDC /* PlaylistEditAlbumViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistEditAlbumViewController.h; path = view_controllers/PlaylistEditAlbumViewController.h; sourceTree = "<group>"; }; | 166 | 91018B43135A724B0051EFDC /* PlaylistEditAlbumViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistEditAlbumViewController.h; path = view_controllers/PlaylistEditAlbumViewController.h; sourceTree = "<group>"; }; |
291 | @@ -176,8 +173,6 @@ | |||
292 | 176 | 91018B4A135A724B0051EFDC /* PlaylistEditSongListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PlaylistEditSongListViewController.m; path = view_controllers/PlaylistEditSongListViewController.m; sourceTree = "<group>"; }; | 173 | 91018B4A135A724B0051EFDC /* PlaylistEditSongListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PlaylistEditSongListViewController.m; path = view_controllers/PlaylistEditSongListViewController.m; sourceTree = "<group>"; }; |
293 | 177 | 9110DC36134C04590046B8E4 /* AlbumParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlbumParser.h; sourceTree = "<group>"; }; | 174 | 9110DC36134C04590046B8E4 /* AlbumParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlbumParser.h; sourceTree = "<group>"; }; |
294 | 178 | 9110DC37134C04590046B8E4 /* AlbumParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlbumParser.m; sourceTree = "<group>"; }; | 175 | 9110DC37134C04590046B8E4 /* AlbumParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlbumParser.m; sourceTree = "<group>"; }; |
295 | 179 | 9110DC3F134E4EEF0046B8E4 /* NSMutableSet+Extras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableSet+Extras.h"; sourceTree = "<group>"; }; | ||
296 | 180 | 9110DC40134E4EEF0046B8E4 /* NSMutableSet+Extras.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableSet+Extras.m"; sourceTree = "<group>"; }; | ||
297 | 181 | 9110DC42134EAC720046B8E4 /* AlbumListParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlbumListParser.h; sourceTree = "<group>"; }; | 176 | 9110DC42134EAC720046B8E4 /* AlbumListParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlbumListParser.h; sourceTree = "<group>"; }; |
298 | 182 | 9110DC43134EAC730046B8E4 /* AlbumListParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlbumListParser.m; sourceTree = "<group>"; }; | 177 | 9110DC43134EAC730046B8E4 /* AlbumListParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AlbumListParser.m; sourceTree = "<group>"; }; |
299 | 183 | 9110DC551354A7460046B8E4 /* AlbumArtistUITableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AlbumArtistUITableViewCell.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; | 178 | 9110DC551354A7460046B8E4 /* AlbumArtistUITableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AlbumArtistUITableViewCell.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; |
300 | @@ -226,6 +221,8 @@ | |||
301 | 226 | 91BE4017138E8D2300D44D68 /* UIAlertView+Blocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+Blocks.m"; sourceTree = "<group>"; }; | 221 | 91BE4017138E8D2300D44D68 /* UIAlertView+Blocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIAlertView+Blocks.m"; sourceTree = "<group>"; }; |
302 | 227 | 91BE401A138E8D3A00D44D68 /* RIButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RIButtonItem.h; sourceTree = "<group>"; }; | 222 | 91BE401A138E8D3A00D44D68 /* RIButtonItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RIButtonItem.h; sourceTree = "<group>"; }; |
303 | 228 | 91BE401B138E8D3A00D44D68 /* RIButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RIButtonItem.m; sourceTree = "<group>"; }; | 223 | 91BE401B138E8D3A00D44D68 /* RIButtonItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RIButtonItem.m; sourceTree = "<group>"; }; |
304 | 224 | 91E0778713ABAD6100AA7CB2 /* PlaylistSongIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaylistSongIndex.h; sourceTree = "<group>"; }; | ||
305 | 225 | 91E0778813ABAD6200AA7CB2 /* PlaylistSongIndex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlaylistSongIndex.m; sourceTree = "<group>"; }; | ||
306 | 229 | 91E88607132DA82000618994 /* PlaylistParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaylistParser.h; sourceTree = "<group>"; }; | 226 | 91E88607132DA82000618994 /* PlaylistParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaylistParser.h; sourceTree = "<group>"; }; |
307 | 230 | 91E88608132DA82000618994 /* PlaylistParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlaylistParser.m; sourceTree = "<group>"; }; | 227 | 91E88608132DA82000618994 /* PlaylistParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlaylistParser.m; sourceTree = "<group>"; }; |
308 | 231 | 9316628612264A74003B0EB7 /* NSDate+Extras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+Extras.h"; sourceTree = "<group>"; }; | 228 | 9316628612264A74003B0EB7 /* NSDate+Extras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDate+Extras.h"; sourceTree = "<group>"; }; |
309 | @@ -288,8 +285,6 @@ | |||
310 | 288 | 93D6B5141252CB34007880B0 /* music_57@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "music_57@2x.png"; sourceTree = "<group>"; }; | 285 | 93D6B5141252CB34007880B0 /* music_57@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "music_57@2x.png"; sourceTree = "<group>"; }; |
311 | 289 | 93D6B5491252CE57007880B0 /* URLQueryStringParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLQueryStringParser.h; sourceTree = "<group>"; }; | 286 | 93D6B5491252CE57007880B0 /* URLQueryStringParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = URLQueryStringParser.h; sourceTree = "<group>"; }; |
312 | 290 | 93D6B54A1252CE57007880B0 /* URLQueryStringParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = URLQueryStringParser.m; sourceTree = "<group>"; }; | 287 | 93D6B54A1252CE57007880B0 /* URLQueryStringParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = URLQueryStringParser.m; sourceTree = "<group>"; }; |
313 | 291 | 93DF12D7136E968E00D6C085 /* MiniHudView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MiniHudView.h; sourceTree = "<group>"; }; | ||
314 | 292 | 93DF12D8136E968E00D6C085 /* MiniHudView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MiniHudView.m; sourceTree = "<group>"; }; | ||
315 | 293 | 93DFFE3E135D70B60061F29F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; | 288 | 93DFFE3E135D70B60061F29F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; |
316 | 294 | 93DFFE43135D71030061F29F /* MOC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOC.h; sourceTree = "<group>"; }; | 289 | 93DFFE43135D71030061F29F /* MOC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MOC.h; sourceTree = "<group>"; }; |
317 | 295 | 93DFFE44135D71030061F29F /* MOC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOC.m; sourceTree = "<group>"; }; | 290 | 93DFFE44135D71030061F29F /* MOC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MOC.m; sourceTree = "<group>"; }; |
318 | @@ -549,8 +544,6 @@ | |||
319 | 549 | 93D6B213124F0F62007880B0 /* NSNumber+Extras.m */, | 544 | 93D6B213124F0F62007880B0 /* NSNumber+Extras.m */, |
320 | 550 | 93D6B2D1124FDA56007880B0 /* NSMutableArray+Extras.h */, | 545 | 93D6B2D1124FDA56007880B0 /* NSMutableArray+Extras.h */, |
321 | 551 | 93D6B2D2124FDA56007880B0 /* NSMutableArray+Extras.m */, | 546 | 93D6B2D2124FDA56007880B0 /* NSMutableArray+Extras.m */, |
322 | 552 | 9110DC3F134E4EEF0046B8E4 /* NSMutableSet+Extras.h */, | ||
323 | 553 | 9110DC40134E4EEF0046B8E4 /* NSMutableSet+Extras.m */, | ||
324 | 554 | 91018B0913573BBB0051EFDC /* UIImage+Resize.h */, | 547 | 91018B0913573BBB0051EFDC /* UIImage+Resize.h */, |
325 | 555 | 91018B0A13573BBB0051EFDC /* UIImage+Resize.m */, | 548 | 91018B0A13573BBB0051EFDC /* UIImage+Resize.m */, |
326 | 556 | 91018B0C13573D150051EFDC /* UIImage+Alpha.h */, | 549 | 91018B0C13573D150051EFDC /* UIImage+Alpha.h */, |
327 | @@ -593,8 +586,6 @@ | |||
328 | 593 | 936F230912284D1900070F43 /* NamedTextFieldCell.m */, | 586 | 936F230912284D1900070F43 /* NamedTextFieldCell.m */, |
329 | 594 | 912D1262134A162000721EE4 /* AlertPrompt.h */, | 587 | 912D1262134A162000721EE4 /* AlertPrompt.h */, |
330 | 595 | 912D1263134A162000721EE4 /* AlertPrompt.m */, | 588 | 912D1263134A162000721EE4 /* AlertPrompt.m */, |
331 | 596 | 93DF12D7136E968E00D6C085 /* MiniHudView.h */, | ||
332 | 597 | 93DF12D8136E968E00D6C085 /* MiniHudView.m */, | ||
333 | 598 | ); | 589 | ); |
334 | 599 | name = Controls; | 590 | name = Controls; |
335 | 600 | path = controls; | 591 | path = controls; |
336 | @@ -607,14 +598,16 @@ | |||
337 | 607 | 93DFFE44135D71030061F29F /* MOC.m */, | 598 | 93DFFE44135D71030061F29F /* MOC.m */, |
338 | 608 | 93F3344E1247FA2C006C6707 /* Album.h */, | 599 | 93F3344E1247FA2C006C6707 /* Album.h */, |
339 | 609 | 93F3344F1247FA2C006C6707 /* Album.m */, | 600 | 93F3344F1247FA2C006C6707 /* Album.m */, |
340 | 601 | 93F334501247FA2C006C6707 /* Artist.h */, | ||
341 | 610 | 93F334511247FA2C006C6707 /* Artist.m */, | 602 | 93F334511247FA2C006C6707 /* Artist.m */, |
342 | 611 | 93F334501247FA2C006C6707 /* Artist.h */, | ||
343 | 612 | 936F208E12273D9000070F43 /* Song.h */, | 603 | 936F208E12273D9000070F43 /* Song.h */, |
344 | 613 | 936F208F12273D9000070F43 /* Song.m */, | 604 | 936F208F12273D9000070F43 /* Song.m */, |
345 | 614 | 936F20661227364200070F43 /* Playlist.h */, | 605 | 936F20661227364200070F43 /* Playlist.h */, |
346 | 615 | 936F20671227364200070F43 /* Playlist.m */, | 606 | 936F20671227364200070F43 /* Playlist.m */, |
347 | 616 | 9646DB7B13A8FF4700CB42D2 /* CachedSongsPlaylist.h */, | 607 | 9646DB7B13A8FF4700CB42D2 /* CachedSongsPlaylist.h */, |
348 | 617 | 9646DB7C13A8FF4700CB42D2 /* CachedSongsPlaylist.m */, | 608 | 9646DB7C13A8FF4700CB42D2 /* CachedSongsPlaylist.m */, |
349 | 609 | 91E0778713ABAD6100AA7CB2 /* PlaylistSongIndex.h */, | ||
350 | 610 | 91E0778813ABAD6200AA7CB2 /* PlaylistSongIndex.m */, | ||
351 | 618 | ); | 611 | ); |
352 | 619 | name = Models; | 612 | name = Models; |
353 | 620 | path = models; | 613 | path = models; |
354 | @@ -670,7 +663,6 @@ | |||
355 | 670 | 93F334641247FB02006C6707 /* SongViewController.xib */, | 663 | 93F334641247FB02006C6707 /* SongViewController.xib */, |
356 | 671 | 93F334651247FB02006C6707 /* MainWindow.xib */, | 664 | 93F334651247FB02006C6707 /* MainWindow.xib */, |
357 | 672 | 93F334661247FB02006C6707 /* SearchableTableViewController.xib */, | 665 | 93F334661247FB02006C6707 /* SearchableTableViewController.xib */, |
358 | 673 | 91018B24135922BE0051EFDC /* PlaylistEditViewController.xib */, | ||
359 | 674 | ); | 666 | ); |
360 | 675 | name = Xibs; | 667 | name = Xibs; |
361 | 676 | path = xibs; | 668 | path = xibs; |
362 | @@ -825,7 +817,6 @@ | |||
363 | 825 | 932E7AA01255265A00E7C8FF /* about.css in Resources */, | 817 | 932E7AA01255265A00E7C8FF /* about.css in Resources */, |
364 | 826 | 932E7AA11255265A00E7C8FF /* about.html in Resources */, | 818 | 932E7AA11255265A00E7C8FF /* about.html in Resources */, |
365 | 827 | 932E7B0B12552CD500E7C8FF /* arrow.png in Resources */, | 819 | 932E7B0B12552CD500E7C8FF /* arrow.png in Resources */, |
366 | 828 | 91018B25135922BF0051EFDC /* PlaylistEditViewController.xib in Resources */, | ||
367 | 829 | 9112B0241383FF27003C1D93 /* albums.png in Resources */, | 820 | 9112B0241383FF27003C1D93 /* albums.png in Resources */, |
368 | 830 | 9112B0251383FF27003C1D93 /* artists.png in Resources */, | 821 | 9112B0251383FF27003C1D93 /* artists.png in Resources */, |
369 | 831 | 9112B0261383FF27003C1D93 /* playlists.png in Resources */, | 822 | 9112B0261383FF27003C1D93 /* playlists.png in Resources */, |
370 | @@ -894,7 +885,6 @@ | |||
371 | 894 | 912D1264134A162000721EE4 /* AlertPrompt.m in Sources */, | 885 | 912D1264134A162000721EE4 /* AlertPrompt.m in Sources */, |
372 | 895 | 912D1267134B609700721EE4 /* PlaylistEditViewController.m in Sources */, | 886 | 912D1267134B609700721EE4 /* PlaylistEditViewController.m in Sources */, |
373 | 896 | 9110DC38134C045A0046B8E4 /* AlbumParser.m in Sources */, | 887 | 9110DC38134C045A0046B8E4 /* AlbumParser.m in Sources */, |
374 | 897 | 9110DC41134E4EEF0046B8E4 /* NSMutableSet+Extras.m in Sources */, | ||
375 | 898 | 9110DC44134EAC740046B8E4 /* AlbumListParser.m in Sources */, | 888 | 9110DC44134EAC740046B8E4 /* AlbumListParser.m in Sources */, |
376 | 899 | 9110DC571354A7490046B8E4 /* AlbumArtistUITableViewCell.m in Sources */, | 889 | 9110DC571354A7490046B8E4 /* AlbumArtistUITableViewCell.m in Sources */, |
377 | 900 | 91018B0B13573BBB0051EFDC /* UIImage+Resize.m in Sources */, | 890 | 91018B0B13573BBB0051EFDC /* UIImage+Resize.m in Sources */, |
378 | @@ -909,7 +899,6 @@ | |||
379 | 909 | 93DFFE45135D71030061F29F /* MOC.m in Sources */, | 899 | 93DFFE45135D71030061F29F /* MOC.m in Sources */, |
380 | 910 | 93DFFE4D135D71760061F29F /* music.xcdatamodeld in Sources */, | 900 | 93DFFE4D135D71760061F29F /* music.xcdatamodeld in Sources */, |
381 | 911 | 93DFFE54135D72420061F29F /* NSManagedObjectContext+Additions.m in Sources */, | 901 | 93DFFE54135D72420061F29F /* NSManagedObjectContext+Additions.m in Sources */, |
382 | 912 | 93DF12D9136E968E00D6C085 /* MiniHudView.m in Sources */, | ||
383 | 913 | 937FAA11137CFC1B00507E51 /* AlbumArtLoader.m in Sources */, | 902 | 937FAA11137CFC1B00507E51 /* AlbumArtLoader.m in Sources */, |
384 | 914 | 937FAA12137CFC1B00507E51 /* AlbumArtLoadingOperation.m in Sources */, | 903 | 937FAA12137CFC1B00507E51 /* AlbumArtLoadingOperation.m in Sources */, |
385 | 915 | 937FAA15137CFC5000507E51 /* Downloader.m in Sources */, | 904 | 937FAA15137CFC5000507E51 /* Downloader.m in Sources */, |
386 | @@ -923,6 +912,7 @@ | |||
387 | 923 | 9674C2C513A7DC01004509E4 /* UORadialProgressControl.m in Sources */, | 912 | 9674C2C513A7DC01004509E4 /* UORadialProgressControl.m in Sources */, |
388 | 924 | 9646DB7D13A8FF4700CB42D2 /* CachedSongsPlaylist.m in Sources */, | 913 | 9646DB7D13A8FF4700CB42D2 /* CachedSongsPlaylist.m in Sources */, |
389 | 925 | 96FB790A13AA628700D8D4A4 /* UONetworkStatusCoordinator.m in Sources */, | 914 | 96FB790A13AA628700D8D4A4 /* UONetworkStatusCoordinator.m in Sources */, |
390 | 915 | 91E0778913ABAD6200AA7CB2 /* PlaylistSongIndex.m in Sources */, | ||
391 | 926 | ); | 916 | ); |
392 | 927 | runOnlyForDeploymentPostprocessing = 0; | 917 | runOnlyForDeploymentPostprocessing = 0; |
393 | 928 | }; | 918 | }; |
394 | 929 | 919 | ||
395 | === modified file 'musicstreaming/models/Album.m' | |||
396 | --- musicstreaming/models/Album.m 2011-06-14 17:06:21 +0000 | |||
397 | +++ musicstreaming/models/Album.m 2011-06-21 18:28:35 +0000 | |||
398 | @@ -30,7 +30,7 @@ | |||
399 | 30 | 30 | ||
400 | 31 | #import "Album.h" | 31 | #import "Album.h" |
401 | 32 | #import "Artist.h" | 32 | #import "Artist.h" |
403 | 33 | #import "NSMutableSet+Extras.h" | 33 | #import "NSMutableArray+Extras.h" |
404 | 34 | #import "NSString+Extras.h" | 34 | #import "NSString+Extras.h" |
405 | 35 | #import "AlbumParser.h" | 35 | #import "AlbumParser.h" |
406 | 36 | #import "Subsonic.h" | 36 | #import "Subsonic.h" |
407 | @@ -83,7 +83,7 @@ | |||
408 | 83 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | 83 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
409 | 84 | NSError *error = nil; | 84 | NSError *error = nil; |
410 | 85 | 85 | ||
412 | 86 | NSMutableSet *parameters = [NSMutableSet set]; | 86 | NSMutableArray *parameters = [NSMutableArray array]; |
413 | 87 | [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.albumId, nil]]; | 87 | [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.albumId, nil]]; |
414 | 88 | NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getAlbum.view" parameters:parameters]; | 88 | NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getAlbum.view" parameters:parameters]; |
415 | 89 | NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url]; | 89 | NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url]; |
416 | 90 | 90 | ||
417 | === modified file 'musicstreaming/models/Artist.m' | |||
418 | --- musicstreaming/models/Artist.m 2011-06-14 17:06:21 +0000 | |||
419 | +++ musicstreaming/models/Artist.m 2011-06-21 18:28:35 +0000 | |||
420 | @@ -31,7 +31,7 @@ | |||
421 | 31 | #import "Artist.h" | 31 | #import "Artist.h" |
422 | 32 | #import "Album.h" | 32 | #import "Album.h" |
423 | 33 | #import "Subsonic.h" | 33 | #import "Subsonic.h" |
425 | 34 | #import "NSMutableSet+Extras.h" | 34 | #import "NSMutableArray+Extras.h" |
426 | 35 | #import "NSString+Extras.h" | 35 | #import "NSString+Extras.h" |
427 | 36 | #import "ArtistParser.h" | 36 | #import "ArtistParser.h" |
428 | 37 | 37 | ||
429 | @@ -99,7 +99,7 @@ | |||
430 | 99 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | 99 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
431 | 100 | NSError *error = nil; | 100 | NSError *error = nil; |
432 | 101 | 101 | ||
434 | 102 | NSMutableSet *parameters = [NSMutableSet set]; | 102 | NSMutableArray *parameters = [NSMutableArray array]; |
435 | 103 | [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.artistId, nil]]; | 103 | [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.artistId, nil]]; |
436 | 104 | NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getMusicDirectory.view" parameters:parameters]; | 104 | NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getMusicDirectory.view" parameters:parameters]; |
437 | 105 | NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url]; | 105 | NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url]; |
438 | 106 | 106 | ||
439 | === modified file 'musicstreaming/models/Playlist.h' | |||
440 | --- musicstreaming/models/Playlist.h 2011-06-15 16:49:27 +0000 | |||
441 | +++ musicstreaming/models/Playlist.h 2011-06-21 18:28:35 +0000 | |||
442 | @@ -19,26 +19,29 @@ | |||
443 | 19 | 19 | ||
444 | 20 | #import <Foundation/Foundation.h> | 20 | #import <Foundation/Foundation.h> |
445 | 21 | 21 | ||
447 | 22 | @class Song; | 22 | @class Song, PlaylistSongIndex; |
448 | 23 | 23 | ||
449 | 24 | @interface Playlist : NSManagedObject | 24 | @interface Playlist : NSManagedObject |
450 | 25 | { | 25 | { |
451 | 26 | } | 26 | } |
452 | 27 | @property(nonatomic,retain) NSString *name; | ||
453 | 27 | @property(nonatomic,retain) NSString *playlistId; | 28 | @property(nonatomic,retain) NSString *playlistId; |
456 | 28 | @property(nonatomic,retain) NSString *name; | 29 | @property(nonatomic,retain) NSSet *playlistSongIndexes; |
457 | 29 | @property(nonatomic,retain) NSSet *songs; | 30 | @property(nonatomic,readonly) NSArray *songs; |
458 | 30 | 31 | ||
461 | 31 | + (BOOL)playlistWithIdExists:(NSString*)aPlaylistId; | 32 | + (BOOL)playlistWithNameExists:(NSString*)aPlaylistName; |
462 | 32 | + (Playlist*)playlistWithId:(NSString*)aPlaylistId; | 33 | + (Playlist*)playlistWithName:(NSString*)aPlaylistName; |
463 | 33 | - (BOOL)matchesSearchQuery:(NSString *)query; | 34 | - (BOOL)matchesSearchQuery:(NSString *)query; |
464 | 34 | - (NSError*)loadSongs; | 35 | - (NSError*)loadSongs; |
465 | 35 | - (BOOL)isEditable; | 36 | - (BOOL)isEditable; |
466 | 37 | - (void)addSong:(Song *)song; | ||
467 | 38 | - (void)removeSong:(Song *)song; | ||
468 | 36 | @end | 39 | @end |
469 | 37 | 40 | ||
470 | 38 | // coalesce these into one @interface Album (CoreDataGeneratedAccessors) section | 41 | // coalesce these into one @interface Album (CoreDataGeneratedAccessors) section |
471 | 39 | @interface Playlist (CoreDataGeneratedAccessors) | 42 | @interface Playlist (CoreDataGeneratedAccessors) |
476 | 40 | - (void)addSongsObject:(Song *)value; | 43 | - (void)addPlaylistSongIndexesObject:(PlaylistSongIndex *)value; |
477 | 41 | - (void)removeSongsObject:(Song *)value; | 44 | - (void)removePlaylistSongIndexesObject:(PlaylistSongIndex *)value; |
478 | 42 | - (void)addSongs:(NSSet *)value; | 45 | - (void)addPlaylistSongIndexes:(NSSet *)value; |
479 | 43 | - (void)removeSongs:(NSSet *)value; | 46 | - (void)removePlaylistSongIndexes:(NSSet *)value; |
480 | 44 | @end | 47 | @end |
481 | 45 | 48 | ||
482 | === modified file 'musicstreaming/models/Playlist.m' | |||
483 | --- musicstreaming/models/Playlist.m 2011-06-15 16:49:27 +0000 | |||
484 | +++ musicstreaming/models/Playlist.m 2011-06-21 18:28:35 +0000 | |||
485 | @@ -19,25 +19,27 @@ | |||
486 | 19 | 19 | ||
487 | 20 | #import "Playlist.h" | 20 | #import "Playlist.h" |
488 | 21 | #import "Subsonic.h" | 21 | #import "Subsonic.h" |
490 | 22 | #import "NSMutableSet+Extras.h" | 22 | #import "NSMutableArray+Extras.h" |
491 | 23 | #import "PlaylistParser.h" | 23 | #import "PlaylistParser.h" |
492 | 24 | #import "PlaylistSongIndex.h" | ||
493 | 25 | #import "Song.h" | ||
494 | 24 | 26 | ||
495 | 25 | @implementation Playlist | 27 | @implementation Playlist |
496 | 26 | 28 | ||
498 | 27 | @dynamic playlistId, name, songs; | 29 | @dynamic playlistId, name, playlistSongIndexes; |
499 | 28 | 30 | ||
501 | 29 | + (BOOL)playlistWithIdExists:(NSString *)aPlaylistId | 31 | + (BOOL)playlistWithNameExists:(NSString *)aPlaylistName |
502 | 30 | { | 32 | { |
504 | 31 | return (nil != [Playlist playlistWithId:aPlaylistId]); | 33 | return (nil != [Playlist playlistWithName:aPlaylistName]); |
505 | 32 | } | 34 | } |
506 | 33 | 35 | ||
508 | 34 | + (Playlist *)playlistWithId:(NSString *)aPlaylistId | 36 | + (Playlist *)playlistWithName:(NSString *)aPlaylistName |
509 | 35 | { | 37 | { |
510 | 36 | NSFetchRequest * fetch = [[NSFetchRequest alloc] init]; | 38 | NSFetchRequest * fetch = [[NSFetchRequest alloc] init]; |
511 | 37 | NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()]; | 39 | NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()]; |
512 | 38 | [fetch setEntity:entityDescription]; | 40 | [fetch setEntity:entityDescription]; |
513 | 39 | 41 | ||
515 | 40 | NSPredicate *predicate = [NSPredicate predicateWithFormat:@"playlistId == %@", aPlaylistId]; | 42 | NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name == %@", aPlaylistName]; |
516 | 41 | [fetch setPredicate:predicate]; | 43 | [fetch setPredicate:predicate]; |
517 | 42 | 44 | ||
518 | 43 | NSError * error = nil; | 45 | NSError * error = nil; |
519 | @@ -59,7 +61,7 @@ | |||
520 | 59 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | 61 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
521 | 60 | NSError *error = nil; | 62 | NSError *error = nil; |
522 | 61 | 63 | ||
524 | 62 | NSMutableSet *parameters = [NSMutableSet set]; | 64 | NSMutableArray *parameters = [NSMutableArray array]; |
525 | 63 | [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.playlistId, nil]]; | 65 | [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.playlistId, nil]]; |
526 | 64 | NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getPlaylist.view" parameters:parameters]; | 66 | NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getPlaylist.view" parameters:parameters]; |
527 | 65 | NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url]; | 67 | NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url]; |
528 | @@ -81,6 +83,40 @@ | |||
529 | 81 | return [error autorelease]; | 83 | return [error autorelease]; |
530 | 82 | } | 84 | } |
531 | 83 | 85 | ||
532 | 86 | - (NSArray *)songs | ||
533 | 87 | { | ||
534 | 88 | // return playlistSongIndexes sorted by index | ||
535 | 89 | NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"index" ascending:YES]; | ||
536 | 90 | NSArray *results = [[self.playlistSongIndexes sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]] valueForKey:@"songEntity"]; | ||
537 | 91 | return results; | ||
538 | 92 | } | ||
539 | 93 | |||
540 | 94 | // Do the crazy PlaylistSongIndex lookup/clobber dance inside these methods | ||
541 | 95 | - (void)addSong:(Song *)song | ||
542 | 96 | { | ||
543 | 97 | PlaylistSongIndex *playlistSongIndex = [NSEntityDescription insertNewObjectForEntityForName:@"PlaylistSongIndex" inManagedObjectContext:PerThreadManagedObjectContext()]; | ||
544 | 98 | playlistSongIndex.playlistEntity = self; | ||
545 | 99 | playlistSongIndex.songEntity = song; | ||
546 | 100 | playlistSongIndex.index = [NSNumber numberWithUnsignedInt:[self.playlistSongIndexes count]]; | ||
547 | 101 | SaveContext(); | ||
548 | 102 | } | ||
549 | 103 | |||
550 | 104 | - (void)removeSong:(Song *)song | ||
551 | 105 | { | ||
552 | 106 | // Look up (potentially) all records where playlistEntity is self, and songEntity is song, and blow them away | ||
553 | 107 | NSSet *condemned = [self.playlistSongIndexes filteredSetUsingPredicate:[NSPredicate predicateWithFormat:@"songEntity = %@", song]]; | ||
554 | 108 | for (PlaylistSongIndex *playlistSongIndex in condemned) | ||
555 | 109 | { | ||
556 | 110 | [PerThreadManagedObjectContext() deleteObject:playlistSongIndex]; | ||
557 | 111 | } | ||
558 | 112 | SaveContext(); | ||
559 | 113 | |||
560 | 114 | [[self.playlistSongIndexes sortedArrayUsingDescriptors:[NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"index" ascending:YES]]] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { | ||
561 | 115 | ((PlaylistSongIndex *)obj).index = [NSNumber numberWithUnsignedInt:idx]; | ||
562 | 116 | }]; | ||
563 | 117 | SaveContext(); | ||
564 | 118 | } | ||
565 | 119 | |||
566 | 84 | - (NSString*)description | 120 | - (NSString*)description |
567 | 85 | { | 121 | { |
568 | 86 | return [NSString stringWithFormat:@"%@ (%@) MOC %@", self.name, self.playlistId, [self managedObjectContext]]; | 122 | return [NSString stringWithFormat:@"%@ (%@) MOC %@", self.name, self.playlistId, [self managedObjectContext]]; |
569 | 87 | 123 | ||
570 | === added file 'musicstreaming/models/PlaylistSongIndex.h' | |||
571 | --- musicstreaming/models/PlaylistSongIndex.h 1970-01-01 00:00:00 +0000 | |||
572 | +++ musicstreaming/models/PlaylistSongIndex.h 2011-06-21 18:28:35 +0000 | |||
573 | @@ -0,0 +1,32 @@ | |||
574 | 1 | // | ||
575 | 2 | // PlaylistSongIndex.h | ||
576 | 3 | // iSub | ||
577 | 4 | // | ||
578 | 5 | // Created by Zachery Bir on 6/17/11. | ||
579 | 6 | // Copyright 2011 Canonical Ltd. | ||
580 | 7 | // | ||
581 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
582 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
583 | 10 | // as published by the Free Software Foundation. | ||
584 | 11 | // | ||
585 | 12 | // This program is distributed in the hope that it will be useful, but | ||
586 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
587 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
588 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
589 | 16 | // | ||
590 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
591 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
592 | 19 | |||
593 | 20 | #import <Foundation/Foundation.h> | ||
594 | 21 | |||
595 | 22 | @class Playlist, Song; | ||
596 | 23 | |||
597 | 24 | @interface PlaylistSongIndex : NSManagedObject { | ||
598 | 25 | @private | ||
599 | 26 | |||
600 | 27 | } | ||
601 | 28 | @property (nonatomic, retain) NSNumber *index; | ||
602 | 29 | |||
603 | 30 | @property (nonatomic, retain) Playlist *playlistEntity; | ||
604 | 31 | @property (nonatomic, retain) Song *songEntity; | ||
605 | 32 | @end | ||
606 | 0 | 33 | ||
607 | === added file 'musicstreaming/models/PlaylistSongIndex.m' | |||
608 | --- musicstreaming/models/PlaylistSongIndex.m 1970-01-01 00:00:00 +0000 | |||
609 | +++ musicstreaming/models/PlaylistSongIndex.m 2011-06-21 18:28:35 +0000 | |||
610 | @@ -0,0 +1,27 @@ | |||
611 | 1 | // | ||
612 | 2 | // PlaylistSongIndex.m | ||
613 | 3 | // iSub | ||
614 | 4 | // | ||
615 | 5 | // Created by Zachery Bir on 6/17/11. | ||
616 | 6 | // Copyright 2011 Canonical Ltd. | ||
617 | 7 | // | ||
618 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
619 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
620 | 10 | // as published by the Free Software Foundation. | ||
621 | 11 | // | ||
622 | 12 | // This program is distributed in the hope that it will be useful, but | ||
623 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
624 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
625 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
626 | 16 | // | ||
627 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
628 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
629 | 19 | |||
630 | 20 | #import "PlaylistSongIndex.h" | ||
631 | 21 | |||
632 | 22 | |||
633 | 23 | @implementation PlaylistSongIndex | ||
634 | 24 | |||
635 | 25 | @dynamic index, playlistEntity, songEntity; | ||
636 | 26 | |||
637 | 27 | @end | ||
638 | 0 | 28 | ||
639 | === modified file 'musicstreaming/models/Song.h' | |||
640 | --- musicstreaming/models/Song.h 2011-06-13 19:00:38 +0000 | |||
641 | +++ musicstreaming/models/Song.h 2011-06-21 18:28:35 +0000 | |||
642 | @@ -28,7 +28,7 @@ | |||
643 | 28 | // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | 28 | // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
644 | 29 | // DAMAGE. | 29 | // DAMAGE. |
645 | 30 | 30 | ||
647 | 31 | @class Artist, Album, Playlist; | 31 | @class Artist, Album, PlaylistSongIndex; |
648 | 32 | 32 | ||
649 | 33 | @interface Song : NSManagedObject | 33 | @interface Song : NSManagedObject |
650 | 34 | { | 34 | { |
651 | @@ -43,11 +43,12 @@ | |||
652 | 43 | @property (nonatomic, retain) NSNumber *duration; | 43 | @property (nonatomic, retain) NSNumber *duration; |
653 | 44 | @property (nonatomic, retain) NSNumber *bitRate; | 44 | @property (nonatomic, retain) NSNumber *bitRate; |
654 | 45 | @property (nonatomic, retain) NSNumber *track; | 45 | @property (nonatomic, retain) NSNumber *track; |
655 | 46 | @property (nonatomic, retain) NSNumber *discNumber; | ||
656 | 46 | @property (nonatomic, retain) NSNumber *year; | 47 | @property (nonatomic, retain) NSNumber *year; |
657 | 47 | @property (nonatomic, retain) NSNumber *size; | 48 | @property (nonatomic, retain) NSNumber *size; |
658 | 48 | @property (nonatomic, retain) Artist *artistEntity; | 49 | @property (nonatomic, retain) Artist *artistEntity; |
659 | 49 | @property (nonatomic, retain) Album *albumEntity; | 50 | @property (nonatomic, retain) Album *albumEntity; |
661 | 50 | @property (nonatomic, retain) NSSet *playlistEntities; | 51 | @property (nonatomic, retain) NSSet *playlistSongIndexes; |
662 | 51 | @property (nonatomic, retain) NSString *cachedSongPath; | 52 | @property (nonatomic, retain) NSString *cachedSongPath; |
663 | 52 | 53 | ||
664 | 53 | + (BOOL)songWithIdExists:(NSString*)aSongId; | 54 | + (BOOL)songWithIdExists:(NSString*)aSongId; |
665 | @@ -59,8 +60,8 @@ | |||
666 | 59 | @end | 60 | @end |
667 | 60 | 61 | ||
668 | 61 | @interface Song (CoreDataGeneratedAccessors) | 62 | @interface Song (CoreDataGeneratedAccessors) |
673 | 62 | - (void)addPlaylistEntitiesObject:(Playlist *)value; | 63 | - (void)addPlaylistSongIndexesObject:(PlaylistSongIndex *)value; |
674 | 63 | - (void)removePlaylistEntitiesObject:(Playlist *)value; | 64 | - (void)removePlaylistSongIndexesObject:(PlaylistSongIndex *)value; |
675 | 64 | - (void)addPlaylistEntities:(NSSet *)value; | 65 | - (void)addPlaylistSongIndexes:(NSSet *)value; |
676 | 65 | - (void)removePlaylistEntities:(NSSet *)value; | 66 | - (void)removePlaylistSongIndexes:(NSSet *)value; |
677 | 66 | @end | 67 | @end |
678 | 67 | 68 | ||
679 | === modified file 'musicstreaming/models/Song.m' | |||
680 | --- musicstreaming/models/Song.m 2011-06-14 17:06:21 +0000 | |||
681 | +++ musicstreaming/models/Song.m 2011-06-21 18:28:35 +0000 | |||
682 | @@ -34,8 +34,8 @@ | |||
683 | 34 | #import "NSString+Extras.h" | 34 | #import "NSString+Extras.h" |
684 | 35 | 35 | ||
685 | 36 | @implementation Song | 36 | @implementation Song |
688 | 37 | @dynamic title, songId, artist, album, genre, coverArtId, path, duration, bitRate, track, year, size; | 37 | @dynamic title, songId, artist, album, genre, coverArtId, path, duration, bitRate, track, discNumber, year, size; |
689 | 38 | @dynamic artistEntity, albumEntity, playlistEntities, cachedSongPath; | 38 | @dynamic artistEntity, albumEntity, playlistSongIndexes, cachedSongPath; |
690 | 39 | 39 | ||
691 | 40 | + (BOOL)songWithIdExists:(NSString*)aSongId | 40 | + (BOOL)songWithIdExists:(NSString*)aSongId |
692 | 41 | { | 41 | { |
693 | @@ -77,7 +77,13 @@ | |||
694 | 77 | 77 | ||
695 | 78 | - (NSComparisonResult)compare:(Song*)s | 78 | - (NSComparisonResult)compare:(Song*)s |
696 | 79 | { | 79 | { |
698 | 80 | return [self.track compare:s.track]; | 80 | NSUInteger selfPathArray[] = {[self.discNumber integerValue], [self.track integerValue]}; |
699 | 81 | NSUInteger otherPathArray[] = {[s.discNumber integerValue], [s.track integerValue]}; | ||
700 | 82 | |||
701 | 83 | NSIndexPath *selfPath = [NSIndexPath indexPathWithIndexes:selfPathArray length:2]; | ||
702 | 84 | NSIndexPath *otherPath = [NSIndexPath indexPathWithIndexes:otherPathArray length:2]; | ||
703 | 85 | |||
704 | 86 | return [selfPath compare:otherPath]; | ||
705 | 81 | } | 87 | } |
706 | 82 | 88 | ||
707 | 83 | - (NSString*)description | 89 | - (NSString*)description |
708 | 84 | 90 | ||
709 | === modified file 'musicstreaming/music.xcdatamodeld/music.xcdatamodel/elements' | |||
710 | 85 | Binary files musicstreaming/music.xcdatamodeld/music.xcdatamodel/elements 2011-06-13 19:00:38 +0000 and musicstreaming/music.xcdatamodeld/music.xcdatamodel/elements 2011-06-21 18:28:35 +0000 differ | 91 | Binary files musicstreaming/music.xcdatamodeld/music.xcdatamodel/elements 2011-06-13 19:00:38 +0000 and musicstreaming/music.xcdatamodeld/music.xcdatamodel/elements 2011-06-21 18:28:35 +0000 differ |
711 | === modified file 'musicstreaming/music.xcdatamodeld/music.xcdatamodel/layout' | |||
712 | 86 | Binary files musicstreaming/music.xcdatamodeld/music.xcdatamodel/layout 2011-06-13 19:00:38 +0000 and musicstreaming/music.xcdatamodeld/music.xcdatamodel/layout 2011-06-21 18:28:35 +0000 differ | 92 | Binary files musicstreaming/music.xcdatamodeld/music.xcdatamodel/layout 2011-06-13 19:00:38 +0000 and musicstreaming/music.xcdatamodeld/music.xcdatamodel/layout 2011-06-21 18:28:35 +0000 differ |
713 | === modified file 'musicstreaming/utilities/AlbumParser.m' | |||
714 | --- musicstreaming/utilities/AlbumParser.m 2011-06-14 17:06:21 +0000 | |||
715 | +++ musicstreaming/utilities/AlbumParser.m 2011-06-21 18:28:35 +0000 | |||
716 | @@ -71,6 +71,7 @@ | |||
717 | 71 | song.duration = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"duration"]]; | 71 | song.duration = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"duration"]]; |
718 | 72 | song.bitRate = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"bitRate"]]; | 72 | song.bitRate = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"bitRate"]]; |
719 | 73 | song.track = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"track"]]; | 73 | song.track = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"track"]]; |
720 | 74 | song.discNumber = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"disc_number"]]; | ||
721 | 74 | song.year = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"year"]]; | 75 | song.year = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"year"]]; |
722 | 75 | song.size = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"size"]]; | 76 | song.size = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"size"]]; |
723 | 76 | 77 | ||
724 | 77 | 78 | ||
725 | === modified file 'musicstreaming/utilities/Globals.h' | |||
726 | --- musicstreaming/utilities/Globals.h 2011-06-07 09:20:03 +0000 | |||
727 | +++ musicstreaming/utilities/Globals.h 2011-06-21 18:28:35 +0000 | |||
728 | @@ -3,8 +3,19 @@ | |||
729 | 3 | // iSub | 3 | // iSub |
730 | 4 | // | 4 | // |
731 | 5 | // Created by Aaron Brethorst on 5/13/11. | 5 | // Created by Aaron Brethorst on 5/13/11. |
733 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
734 | 7 | // | ||
735 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
736 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
737 | 10 | // as published by the Free Software Foundation. | ||
738 | 11 | // | ||
739 | 12 | // This program is distributed in the hope that it will be useful, but | ||
740 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
741 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
742 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
743 | 7 | // | 16 | // |
744 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
745 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
746 | 8 | 19 | ||
747 | 9 | #import <Foundation/Foundation.h> | 20 | #import <Foundation/Foundation.h> |
748 | 10 | 21 | ||
749 | 11 | 22 | ||
750 | === modified file 'musicstreaming/utilities/Globals.m' | |||
751 | --- musicstreaming/utilities/Globals.m 2011-06-07 09:20:03 +0000 | |||
752 | +++ musicstreaming/utilities/Globals.m 2011-06-21 18:28:35 +0000 | |||
753 | @@ -3,8 +3,19 @@ | |||
754 | 3 | // iSub | 3 | // iSub |
755 | 4 | // | 4 | // |
756 | 5 | // Created by Aaron Brethorst on 5/13/11. | 5 | // Created by Aaron Brethorst on 5/13/11. |
758 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
759 | 7 | // | ||
760 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
761 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
762 | 10 | // as published by the Free Software Foundation. | ||
763 | 11 | // | ||
764 | 12 | // This program is distributed in the hope that it will be useful, but | ||
765 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
766 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
767 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
768 | 7 | // | 16 | // |
769 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
770 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
771 | 8 | 19 | ||
772 | 9 | #import "Globals.h" | 20 | #import "Globals.h" |
773 | 10 | 21 | ||
774 | 11 | 22 | ||
775 | === modified file 'musicstreaming/utilities/PlaylistListParser.m' | |||
776 | --- musicstreaming/utilities/PlaylistListParser.m 2011-05-27 18:23:44 +0000 | |||
777 | +++ musicstreaming/utilities/PlaylistListParser.m 2011-06-21 18:28:35 +0000 | |||
778 | @@ -37,15 +37,21 @@ | |||
779 | 37 | } | 37 | } |
780 | 38 | else if ([elementName isEqualToString:@"playlist"]) | 38 | else if ([elementName isEqualToString:@"playlist"]) |
781 | 39 | { | 39 | { |
791 | 40 | if (![Playlist playlistWithIdExists:[attributeDict objectForKey:@"id"]] && ![[attributeDict objectForKey:@"title"] isEqual:@".AppleDouble"]) | 40 | Playlist *playlist = nil; |
792 | 41 | { | 41 | |
793 | 42 | Playlist *playlist = [NSEntityDescription insertNewObjectForEntityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()]; | 42 | if (![Playlist playlistWithNameExists:[attributeDict objectForKey:@"name"]] && ![[attributeDict objectForKey:@"title"] isEqual:@".AppleDouble"]) |
794 | 43 | 43 | { | |
795 | 44 | playlist.name = [attributeDict objectForKey:@"name"]; | 44 | playlist = [NSEntityDescription insertNewObjectForEntityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()]; |
796 | 45 | playlist.playlistId = [attributeDict objectForKey:@"id"]; | 45 | } |
797 | 46 | 46 | else | |
798 | 47 | SaveContext(); | 47 | { |
799 | 48 | } | 48 | playlist = [Playlist playlistWithName:[attributeDict objectForKey:@"name"]]; |
800 | 49 | } | ||
801 | 50 | |||
802 | 51 | playlist.name = [attributeDict objectForKey:@"name"]; | ||
803 | 52 | playlist.playlistId = [attributeDict objectForKey:@"id"]; | ||
804 | 53 | |||
805 | 54 | SaveContext(); | ||
806 | 49 | } | 55 | } |
807 | 50 | } | 56 | } |
808 | 51 | 57 | ||
809 | 52 | 58 | ||
810 | === modified file 'musicstreaming/utilities/PlaylistParser.h' | |||
811 | --- musicstreaming/utilities/PlaylistParser.h 2011-05-27 18:23:44 +0000 | |||
812 | +++ musicstreaming/utilities/PlaylistParser.h 2011-06-21 18:28:35 +0000 | |||
813 | @@ -24,9 +24,9 @@ | |||
814 | 24 | @interface PlaylistParser : NSObject <NSXMLParserDelegate> | 24 | @interface PlaylistParser : NSObject <NSXMLParserDelegate> |
815 | 25 | { | 25 | { |
816 | 26 | Playlist *playlist; | 26 | Playlist *playlist; |
818 | 27 | NSMutableArray *songs; | 27 | NSMutableSet *songs; |
819 | 28 | NSNumberFormatter *numberFormatter; | 28 | NSNumberFormatter *numberFormatter; |
820 | 29 | } | 29 | } |
821 | 30 | @property(nonatomic,retain) NSManagedObjectID *playlistObjectId; | 30 | @property(nonatomic,retain) NSManagedObjectID *playlistObjectId; |
823 | 31 | @property(nonatomic,retain) NSMutableArray *songs; | 31 | @property(nonatomic,retain) NSMutableSet *songs; |
824 | 32 | @end | 32 | @end |
825 | 33 | 33 | ||
826 | === modified file 'musicstreaming/utilities/PlaylistParser.m' | |||
827 | --- musicstreaming/utilities/PlaylistParser.m 2011-05-27 18:23:44 +0000 | |||
828 | +++ musicstreaming/utilities/PlaylistParser.m 2011-06-21 18:28:35 +0000 | |||
829 | @@ -20,6 +20,7 @@ | |||
830 | 20 | #import "PlaylistParser.h" | 20 | #import "PlaylistParser.h" |
831 | 21 | #import "Playlist.h" | 21 | #import "Playlist.h" |
832 | 22 | #import "Song.h" | 22 | #import "Song.h" |
833 | 23 | #import "PlaylistSongIndex.h" | ||
834 | 23 | #import "NSDictionary+Extras.h" | 24 | #import "NSDictionary+Extras.h" |
835 | 24 | 25 | ||
836 | 25 | @implementation PlaylistParser | 26 | @implementation PlaylistParser |
837 | @@ -30,7 +31,7 @@ | |||
838 | 30 | { | 31 | { |
839 | 31 | if ((self = [super init])) | 32 | if ((self = [super init])) |
840 | 32 | { | 33 | { |
842 | 33 | songs = [[NSMutableArray alloc] init]; | 34 | songs = [[NSMutableSet alloc] init]; |
843 | 34 | numberFormatter = [[NSNumberFormatter alloc] init]; | 35 | numberFormatter = [[NSNumberFormatter alloc] init]; |
844 | 35 | } | 36 | } |
845 | 36 | return self; | 37 | return self; |
846 | @@ -76,11 +77,14 @@ | |||
847 | 76 | 77 | ||
848 | 77 | } | 78 | } |
849 | 78 | 79 | ||
854 | 79 | // do something with the order of songs. | 80 | PlaylistSongIndex *playlistSongIndex = [NSEntityDescription insertNewObjectForEntityForName:@"PlaylistSongIndex" inManagedObjectContext:PerThreadManagedObjectContext()]; |
855 | 80 | [song addPlaylistEntitiesObject:playlist]; | 81 | playlistSongIndex.playlistEntity = playlist; |
856 | 81 | [playlist addSongsObject:song]; | 82 | playlistSongIndex.songEntity = song; |
857 | 82 | SaveContext(); | 83 | playlistSongIndex.index = [NSNumber numberWithUnsignedInt:[songs count]]; |
858 | 84 | [songs addObject:playlistSongIndex]; | ||
859 | 83 | } | 85 | } |
860 | 86 | playlist.playlistSongIndexes = songs; | ||
861 | 87 | SaveContext(); | ||
862 | 84 | } | 88 | } |
863 | 85 | 89 | ||
864 | 86 | - (void) dealloc | 90 | - (void) dealloc |
865 | 87 | 91 | ||
866 | === modified file 'musicstreaming/utilities/Subsonic.h' | |||
867 | --- musicstreaming/utilities/Subsonic.h 2011-06-14 17:06:21 +0000 | |||
868 | +++ musicstreaming/utilities/Subsonic.h 2011-06-21 18:28:35 +0000 | |||
869 | @@ -42,7 +42,7 @@ | |||
870 | 42 | + (Subsonic *)sharedSubsonic; | 42 | + (Subsonic *)sharedSubsonic; |
871 | 43 | - (NSURL *)getCredsURL; | 43 | - (NSURL *)getCredsURL; |
872 | 44 | - (NSURL *)getBaseURL:(NSString *)action; | 44 | - (NSURL *)getBaseURL:(NSString *)action; |
874 | 45 | - (NSURL *)getBaseURL:(NSString *)action parameters:(NSSet*)extraParameters; | 45 | - (NSURL *)getBaseURL:(NSString *)action parameters:(NSArray*)extraParameters; |
875 | 46 | - (NSURL *)getStreamingURLForSongId:(NSString*)songId; | 46 | - (NSURL *)getStreamingURLForSongId:(NSString*)songId; |
876 | 47 | - (void)removeCredentials; | 47 | - (void)removeCredentials; |
877 | 48 | - (void)storeUsername:(NSString*)username password:(NSString*)password; | 48 | - (void)storeUsername:(NSString*)username password:(NSString*)password; |
878 | 49 | 49 | ||
879 | === modified file 'musicstreaming/utilities/Subsonic.m' | |||
880 | --- musicstreaming/utilities/Subsonic.m 2011-06-14 17:06:21 +0000 | |||
881 | +++ musicstreaming/utilities/Subsonic.m 2011-06-21 18:28:35 +0000 | |||
882 | @@ -22,7 +22,7 @@ | |||
883 | 22 | #include <netinet/in.h> | 22 | #include <netinet/in.h> |
884 | 23 | #include <netdb.h> | 23 | #include <netdb.h> |
885 | 24 | #include <arpa/inet.h> | 24 | #include <arpa/inet.h> |
887 | 25 | #import "NSMutableSet+Extras.h" | 25 | #import "NSMutableArray+Extras.h" |
888 | 26 | #import "Reachability.h" | 26 | #import "Reachability.h" |
889 | 27 | 27 | ||
890 | 28 | @interface Subsonic () | 28 | @interface Subsonic () |
891 | @@ -42,9 +42,7 @@ | |||
892 | 42 | if ((self = [super init])) | 42 | if ((self = [super init])) |
893 | 43 | { | 43 | { |
894 | 44 | self.defaultURL = @"https://streaming.one.ubuntu.com/rest"; | 44 | self.defaultURL = @"https://streaming.one.ubuntu.com/rest"; |
895 | 45 | // self.defaultURL = @"http://10.59.1.19:35204/musicstreaming/rest"; | ||
896 | 46 | self.credsURL = @"https://one.ubuntu.com/phones/creds/ios?scheme=x-ubuntuone-music"; | 45 | self.credsURL = @"https://one.ubuntu.com/phones/creds/ios?scheme=x-ubuntuone-music"; |
897 | 47 | // self.credsURL = @"http://10.59.1.19:41858/phones/creds/ios?scheme=x-ubuntuone-music"; | ||
898 | 48 | self.reachability = [Reachability reachabilityWithHostName:[[NSURL URLWithString:self.defaultURL] host]]; | 46 | self.reachability = [Reachability reachabilityWithHostName:[[NSURL URLWithString:self.defaultURL] host]]; |
899 | 49 | [self.reachability startNotifer]; | 47 | [self.reachability startNotifer]; |
900 | 50 | } | 48 | } |
901 | @@ -98,7 +96,7 @@ | |||
902 | 98 | 96 | ||
903 | 99 | - (NSURL *)getStreamingURLForSongId:(NSString*)songId | 97 | - (NSURL *)getStreamingURLForSongId:(NSString*)songId |
904 | 100 | { | 98 | { |
906 | 101 | NSMutableSet *parameters = [NSMutableSet set]; | 99 | NSMutableArray *parameters = [NSMutableArray array]; |
907 | 102 | [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", songId, nil]]; | 100 | [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", songId, nil]]; |
908 | 103 | return [self getBaseURL:@"stream.view" parameters:parameters]; | 101 | return [self getBaseURL:@"stream.view" parameters:parameters]; |
909 | 104 | } | 102 | } |
910 | @@ -113,11 +111,11 @@ | |||
911 | 113 | return [self getBaseURL:action parameters:nil]; | 111 | return [self getBaseURL:action parameters:nil]; |
912 | 114 | } | 112 | } |
913 | 115 | 113 | ||
915 | 116 | - (NSURL *)getBaseURL:(NSString *)action parameters:(NSSet*)extraParameters | 114 | - (NSURL *)getBaseURL:(NSString *)action parameters:(NSArray*)extraParameters |
916 | 117 | { | 115 | { |
917 | 118 | if (self.defaultUserName && self.defaultPassword) | 116 | if (self.defaultUserName && self.defaultPassword) |
918 | 119 | { | 117 | { |
920 | 120 | NSMutableSet *params = [NSMutableSet setWithSet:extraParameters]; | 118 | NSMutableArray *params = [NSMutableArray arrayWithArray:extraParameters]; |
921 | 121 | 119 | ||
922 | 122 | [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"u", self.defaultUserName, nil]]; | 120 | [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"u", self.defaultUserName, nil]]; |
923 | 123 | [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"p", self.defaultPassword, nil]]; | 121 | [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"p", self.defaultPassword, nil]]; |
924 | @@ -125,7 +123,6 @@ | |||
925 | 125 | [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"c", @"iSub", nil]]; | 123 | [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"c", @"iSub", nil]]; |
926 | 126 | 124 | ||
927 | 127 | NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@?%@", self.defaultURL, action, [params urlEncodedString]]]; | 125 | NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@?%@", self.defaultURL, action, [params urlEncodedString]]]; |
928 | 128 | NSLog(@"URL generated: %@", url); | ||
929 | 129 | return url; | 126 | return url; |
930 | 130 | } | 127 | } |
931 | 131 | else | 128 | else |
932 | 132 | 129 | ||
933 | === modified file 'musicstreaming/utilities/operations/AbstractNetworkOperation.h' | |||
934 | --- musicstreaming/utilities/operations/AbstractNetworkOperation.h 2011-05-13 05:54:19 +0000 | |||
935 | +++ musicstreaming/utilities/operations/AbstractNetworkOperation.h 2011-06-21 18:28:35 +0000 | |||
936 | @@ -3,8 +3,19 @@ | |||
937 | 3 | // iSub | 3 | // iSub |
938 | 4 | // | 4 | // |
939 | 5 | // Created by Aaron Brethorst on 5/12/11. | 5 | // Created by Aaron Brethorst on 5/12/11. |
941 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
942 | 7 | // | ||
943 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
944 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
945 | 10 | // as published by the Free Software Foundation. | ||
946 | 11 | // | ||
947 | 12 | // This program is distributed in the hope that it will be useful, but | ||
948 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
949 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
950 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
951 | 7 | // | 16 | // |
952 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
953 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
954 | 8 | 19 | ||
955 | 9 | #import <Foundation/Foundation.h> | 20 | #import <Foundation/Foundation.h> |
956 | 10 | 21 | ||
957 | 11 | 22 | ||
958 | === modified file 'musicstreaming/utilities/operations/AbstractNetworkOperation.m' | |||
959 | --- musicstreaming/utilities/operations/AbstractNetworkOperation.m 2011-06-16 16:52:07 +0000 | |||
960 | +++ musicstreaming/utilities/operations/AbstractNetworkOperation.m 2011-06-21 18:28:35 +0000 | |||
961 | @@ -3,8 +3,19 @@ | |||
962 | 3 | // iSub | 3 | // iSub |
963 | 4 | // | 4 | // |
964 | 5 | // Created by Aaron Brethorst on 5/12/11. | 5 | // Created by Aaron Brethorst on 5/12/11. |
966 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
967 | 7 | // | ||
968 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
969 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
970 | 10 | // as published by the Free Software Foundation. | ||
971 | 11 | // | ||
972 | 12 | // This program is distributed in the hope that it will be useful, but | ||
973 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
974 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
975 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
976 | 7 | // | 16 | // |
977 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
978 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
979 | 8 | 19 | ||
980 | 9 | #import "AbstractNetworkOperation.h" | 20 | #import "AbstractNetworkOperation.h" |
981 | 10 | 21 | ||
982 | 11 | 22 | ||
983 | === modified file 'musicstreaming/utilities/operations/AlbumArtLoader.h' | |||
984 | --- musicstreaming/utilities/operations/AlbumArtLoader.h 2011-05-27 18:20:22 +0000 | |||
985 | +++ musicstreaming/utilities/operations/AlbumArtLoader.h 2011-06-21 18:28:35 +0000 | |||
986 | @@ -3,8 +3,19 @@ | |||
987 | 3 | // iSub | 3 | // iSub |
988 | 4 | // | 4 | // |
989 | 5 | // Created by Aaron Brethorst on 5/4/11. | 5 | // Created by Aaron Brethorst on 5/4/11. |
991 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
992 | 7 | // | ||
993 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
994 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
995 | 10 | // as published by the Free Software Foundation. | ||
996 | 11 | // | ||
997 | 12 | // This program is distributed in the hope that it will be useful, but | ||
998 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
999 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1000 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
1001 | 7 | // | 16 | // |
1002 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
1003 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1004 | 8 | 19 | ||
1005 | 9 | #import <UIKit/UIKit.h> | 20 | #import <UIKit/UIKit.h> |
1006 | 10 | #import "AlbumArtLoadingOperation.h" | 21 | #import "AlbumArtLoadingOperation.h" |
1007 | 11 | 22 | ||
1008 | === modified file 'musicstreaming/utilities/operations/AlbumArtLoader.m' | |||
1009 | --- musicstreaming/utilities/operations/AlbumArtLoader.m 2011-06-07 09:20:03 +0000 | |||
1010 | +++ musicstreaming/utilities/operations/AlbumArtLoader.m 2011-06-21 18:28:35 +0000 | |||
1011 | @@ -3,12 +3,23 @@ | |||
1012 | 3 | // iSub | 3 | // iSub |
1013 | 4 | // | 4 | // |
1014 | 5 | // Created by Aaron Brethorst on 5/4/11. | 5 | // Created by Aaron Brethorst on 5/4/11. |
1016 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
1017 | 7 | // | ||
1018 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
1019 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
1020 | 10 | // as published by the Free Software Foundation. | ||
1021 | 11 | // | ||
1022 | 12 | // This program is distributed in the hope that it will be useful, but | ||
1023 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1024 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1025 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
1026 | 7 | // | 16 | // |
1027 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
1028 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1029 | 8 | 19 | ||
1030 | 9 | #import "AlbumArtLoader.h" | 20 | #import "AlbumArtLoader.h" |
1031 | 10 | #import "Subsonic.h" | 21 | #import "Subsonic.h" |
1033 | 11 | #import "NSMutableSet+Extras.h" | 22 | #import "NSMutableArray+Extras.h" |
1034 | 12 | #import "UIImage+Resize.h" | 23 | #import "UIImage+Resize.h" |
1035 | 13 | 24 | ||
1036 | 14 | @interface AlbumArtLoader () | 25 | @interface AlbumArtLoader () |
1037 | @@ -117,7 +128,7 @@ | |||
1038 | 117 | 128 | ||
1039 | 118 | - (NSString*)URLFromCoverArtID:(NSString*)artID | 129 | - (NSString*)URLFromCoverArtID:(NSString*)artID |
1040 | 119 | { | 130 | { |
1042 | 120 | NSMutableSet *parameters = [NSMutableSet set]; | 131 | NSMutableArray *parameters = [NSMutableArray array]; |
1043 | 121 | [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", artID, nil]]; | 132 | [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", artID, nil]]; |
1044 | 122 | 133 | ||
1045 | 123 | // Always get the largest we can handle | 134 | // Always get the largest we can handle |
1046 | 124 | 135 | ||
1047 | === modified file 'musicstreaming/utilities/operations/AlbumArtLoadingOperation.h' | |||
1048 | --- musicstreaming/utilities/operations/AlbumArtLoadingOperation.h 2011-05-27 18:20:22 +0000 | |||
1049 | +++ musicstreaming/utilities/operations/AlbumArtLoadingOperation.h 2011-06-21 18:28:35 +0000 | |||
1050 | @@ -3,8 +3,19 @@ | |||
1051 | 3 | // iSub | 3 | // iSub |
1052 | 4 | // | 4 | // |
1053 | 5 | // Created by Aaron Brethorst on 5/4/11. | 5 | // Created by Aaron Brethorst on 5/4/11. |
1055 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
1056 | 7 | // | ||
1057 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
1058 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
1059 | 10 | // as published by the Free Software Foundation. | ||
1060 | 11 | // | ||
1061 | 12 | // This program is distributed in the hope that it will be useful, but | ||
1062 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1063 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1064 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
1065 | 7 | // | 16 | // |
1066 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
1067 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1068 | 8 | 19 | ||
1069 | 9 | #import <UIKit/UIKit.h> | 20 | #import <UIKit/UIKit.h> |
1070 | 10 | #import "AbstractNetworkOperation.h" | 21 | #import "AbstractNetworkOperation.h" |
1071 | 11 | 22 | ||
1072 | === modified file 'musicstreaming/utilities/operations/AlbumArtLoadingOperation.m' | |||
1073 | --- musicstreaming/utilities/operations/AlbumArtLoadingOperation.m 2011-06-07 09:20:03 +0000 | |||
1074 | +++ musicstreaming/utilities/operations/AlbumArtLoadingOperation.m 2011-06-21 18:28:35 +0000 | |||
1075 | @@ -3,8 +3,19 @@ | |||
1076 | 3 | // iSub | 3 | // iSub |
1077 | 4 | // | 4 | // |
1078 | 5 | // Created by Aaron Brethorst on 5/4/11. | 5 | // Created by Aaron Brethorst on 5/4/11. |
1080 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
1081 | 7 | // | ||
1082 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
1083 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
1084 | 10 | // as published by the Free Software Foundation. | ||
1085 | 11 | // | ||
1086 | 12 | // This program is distributed in the hope that it will be useful, but | ||
1087 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1088 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1089 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
1090 | 7 | // | 16 | // |
1091 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
1092 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1093 | 8 | 19 | ||
1094 | 9 | // adapted from http://www.dribin.org/dave/blog/archives/2009/05/05/concurrent_operations/ | 20 | // adapted from http://www.dribin.org/dave/blog/archives/2009/05/05/concurrent_operations/ |
1095 | 10 | 21 | ||
1096 | 11 | 22 | ||
1097 | === modified file 'musicstreaming/utilities/operations/DownloadOperation.h' | |||
1098 | --- musicstreaming/utilities/operations/DownloadOperation.h 2011-05-13 06:58:25 +0000 | |||
1099 | +++ musicstreaming/utilities/operations/DownloadOperation.h 2011-06-21 18:28:35 +0000 | |||
1100 | @@ -3,8 +3,19 @@ | |||
1101 | 3 | // iSub | 3 | // iSub |
1102 | 4 | // | 4 | // |
1103 | 5 | // Created by Aaron Brethorst on 5/12/11. | 5 | // Created by Aaron Brethorst on 5/12/11. |
1105 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
1106 | 7 | // | ||
1107 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
1108 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
1109 | 10 | // as published by the Free Software Foundation. | ||
1110 | 11 | // | ||
1111 | 12 | // This program is distributed in the hope that it will be useful, but | ||
1112 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1113 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1114 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
1115 | 7 | // | 16 | // |
1116 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
1117 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1118 | 8 | 19 | ||
1119 | 9 | #import <UIKit/UIKit.h> | 20 | #import <UIKit/UIKit.h> |
1120 | 10 | #import "AbstractNetworkOperation.h" | 21 | #import "AbstractNetworkOperation.h" |
1121 | 11 | 22 | ||
1122 | === modified file 'musicstreaming/utilities/operations/DownloadOperation.m' | |||
1123 | --- musicstreaming/utilities/operations/DownloadOperation.m 2011-05-13 06:58:25 +0000 | |||
1124 | +++ musicstreaming/utilities/operations/DownloadOperation.m 2011-06-21 18:28:35 +0000 | |||
1125 | @@ -3,8 +3,19 @@ | |||
1126 | 3 | // iSub | 3 | // iSub |
1127 | 4 | // | 4 | // |
1128 | 5 | // Created by Aaron Brethorst on 5/12/11. | 5 | // Created by Aaron Brethorst on 5/12/11. |
1130 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
1131 | 7 | // | ||
1132 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
1133 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
1134 | 10 | // as published by the Free Software Foundation. | ||
1135 | 11 | // | ||
1136 | 12 | // This program is distributed in the hope that it will be useful, but | ||
1137 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1138 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1139 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
1140 | 7 | // | 16 | // |
1141 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
1142 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1143 | 8 | 19 | ||
1144 | 9 | #import "DownloadOperation.h" | 20 | #import "DownloadOperation.h" |
1145 | 10 | 21 | ||
1146 | 11 | 22 | ||
1147 | === modified file 'musicstreaming/utilities/operations/Downloader.h' | |||
1148 | --- musicstreaming/utilities/operations/Downloader.h 2011-06-13 19:00:38 +0000 | |||
1149 | +++ musicstreaming/utilities/operations/Downloader.h 2011-06-21 18:28:35 +0000 | |||
1150 | @@ -3,8 +3,19 @@ | |||
1151 | 3 | // iSub | 3 | // iSub |
1152 | 4 | // | 4 | // |
1153 | 5 | // Created by Aaron Brethorst on 5/12/11. | 5 | // Created by Aaron Brethorst on 5/12/11. |
1155 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
1156 | 7 | // | ||
1157 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
1158 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
1159 | 10 | // as published by the Free Software Foundation. | ||
1160 | 11 | // | ||
1161 | 12 | // This program is distributed in the hope that it will be useful, but | ||
1162 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1163 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1164 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
1165 | 7 | // | 16 | // |
1166 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
1167 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1168 | 8 | 19 | ||
1169 | 9 | #import <UIKit/UIKit.h> | 20 | #import <UIKit/UIKit.h> |
1170 | 10 | #import "DownloadOperation.h" | 21 | #import "DownloadOperation.h" |
1171 | 11 | 22 | ||
1172 | === modified file 'musicstreaming/utilities/operations/Downloader.m' | |||
1173 | --- musicstreaming/utilities/operations/Downloader.m 2011-06-14 17:20:13 +0000 | |||
1174 | +++ musicstreaming/utilities/operations/Downloader.m 2011-06-21 18:28:35 +0000 | |||
1175 | @@ -3,8 +3,19 @@ | |||
1176 | 3 | // iSub | 3 | // iSub |
1177 | 4 | // | 4 | // |
1178 | 5 | // Created by Aaron Brethorst on 5/12/11. | 5 | // Created by Aaron Brethorst on 5/12/11. |
1180 | 6 | // Copyright 2011 Canonical. All rights reserved. | 6 | // Copyright 2011 Canonical Ltd. |
1181 | 7 | // | ||
1182 | 8 | // This program is free software: you can redistribute it and/or modify it | ||
1183 | 9 | // under the terms of the GNU Affero General Public License version 3, | ||
1184 | 10 | // as published by the Free Software Foundation. | ||
1185 | 11 | // | ||
1186 | 12 | // This program is distributed in the hope that it will be useful, but | ||
1187 | 13 | // WITHOUT ANY WARRANTY; without even the implied warranties of | ||
1188 | 14 | // MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR | ||
1189 | 15 | // PURPOSE. See the GNU Affero General Public License for more details. | ||
1190 | 7 | // | 16 | // |
1191 | 17 | // You should have received a copy of the GNU Affero General Public License | ||
1192 | 18 | // along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
1193 | 8 | 19 | ||
1194 | 9 | #import "Downloader.h" | 20 | #import "Downloader.h" |
1195 | 10 | #import "DownloadOperation.h" | 21 | #import "DownloadOperation.h" |
1196 | 11 | 22 | ||
1197 | === modified file 'musicstreaming/view_controllers/ArtistViewController.m' | |||
1198 | --- musicstreaming/view_controllers/ArtistViewController.m 2011-06-16 19:12:54 +0000 | |||
1199 | +++ musicstreaming/view_controllers/ArtistViewController.m 2011-06-21 18:28:35 +0000 | |||
1200 | @@ -120,7 +120,6 @@ | |||
1201 | 120 | - (void)finishLoadingData | 120 | - (void)finishLoadingData |
1202 | 121 | { | 121 | { |
1203 | 122 | [self.tableView reloadData]; | 122 | [self.tableView reloadData]; |
1204 | 123 | [self hideLoadingUI]; | ||
1205 | 124 | [super finishLoadingData]; | 123 | [super finishLoadingData]; |
1206 | 125 | } | 124 | } |
1207 | 126 | 125 | ||
1208 | 127 | 126 | ||
1209 | === modified file 'musicstreaming/view_controllers/PlaylistEditAlbumViewController.m' | |||
1210 | --- musicstreaming/view_controllers/PlaylistEditAlbumViewController.m 2011-05-27 18:37:16 +0000 | |||
1211 | +++ musicstreaming/view_controllers/PlaylistEditAlbumViewController.m 2011-06-21 18:28:35 +0000 | |||
1212 | @@ -87,11 +87,11 @@ | |||
1213 | 87 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; | 87 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; |
1214 | 88 | 88 | ||
1215 | 89 | if (cell.accessoryType == UITableViewCellAccessoryNone) { | 89 | if (cell.accessoryType == UITableViewCellAccessoryNone) { |
1217 | 90 | [self.originator.playlist addSongsObject:selection]; | 90 | [self.originator.playlist addSong:selection]; |
1218 | 91 | cell.accessoryType = UITableViewCellAccessoryCheckmark; | 91 | cell.accessoryType = UITableViewCellAccessoryCheckmark; |
1219 | 92 | 92 | ||
1220 | 93 | } else { | 93 | } else { |
1222 | 94 | [self.originator.playlist removeSongsObject:selection]; | 94 | [self.originator.playlist removeSong:selection]; |
1223 | 95 | cell.accessoryType = UITableViewCellAccessoryNone; | 95 | cell.accessoryType = UITableViewCellAccessoryNone; |
1224 | 96 | } | 96 | } |
1225 | 97 | 97 | ||
1226 | 98 | 98 | ||
1227 | === modified file 'musicstreaming/view_controllers/PlaylistEditSongListViewController.m' | |||
1228 | --- musicstreaming/view_controllers/PlaylistEditSongListViewController.m 2011-05-27 18:37:16 +0000 | |||
1229 | +++ musicstreaming/view_controllers/PlaylistEditSongListViewController.m 2011-06-21 18:28:35 +0000 | |||
1230 | @@ -19,6 +19,7 @@ | |||
1231 | 19 | 19 | ||
1232 | 20 | #import "PlaylistEditSongListViewController.h" | 20 | #import "PlaylistEditSongListViewController.h" |
1233 | 21 | #import "PlaylistEditViewController.h" | 21 | #import "PlaylistEditViewController.h" |
1234 | 22 | #import "PlaylistSongIndex.h" | ||
1235 | 22 | #import "Playlist.h" | 23 | #import "Playlist.h" |
1236 | 23 | #import "Song.h" | 24 | #import "Song.h" |
1237 | 24 | 25 | ||
1238 | @@ -104,11 +105,12 @@ | |||
1239 | 104 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; | 105 | UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; |
1240 | 105 | 106 | ||
1241 | 106 | if (cell.accessoryType == UITableViewCellAccessoryNone) { | 107 | if (cell.accessoryType == UITableViewCellAccessoryNone) { |
1243 | 107 | [self.originator.playlist addSongsObject:selection]; | 108 | [self.originator.playlist addSong:selection]; |
1244 | 108 | cell.accessoryType = UITableViewCellAccessoryCheckmark; | 109 | cell.accessoryType = UITableViewCellAccessoryCheckmark; |
1245 | 109 | 110 | ||
1246 | 110 | } else { | 111 | } else { |
1248 | 111 | [self.originator.playlist removeSongsObject:selection]; | 112 | |
1249 | 113 | [self.originator.playlist removeSong:selection]; | ||
1250 | 112 | cell.accessoryType = UITableViewCellAccessoryNone; | 114 | cell.accessoryType = UITableViewCellAccessoryNone; |
1251 | 113 | } | 115 | } |
1252 | 114 | 116 | ||
1253 | 115 | 117 | ||
1254 | === modified file 'musicstreaming/view_controllers/PlaylistEditViewController.h' | |||
1255 | --- musicstreaming/view_controllers/PlaylistEditViewController.h 2011-04-19 01:55:39 +0000 | |||
1256 | +++ musicstreaming/view_controllers/PlaylistEditViewController.h 2011-06-21 18:28:35 +0000 | |||
1257 | @@ -22,16 +22,14 @@ | |||
1258 | 22 | @class Playlist; | 22 | @class Playlist; |
1259 | 23 | @class SubsonicTableViewController; | 23 | @class SubsonicTableViewController; |
1260 | 24 | 24 | ||
1262 | 25 | @interface PlaylistEditViewController : UIViewController <UITabBarControllerDelegate> | 25 | @interface PlaylistEditViewController : UITabBarController |
1263 | 26 | { | 26 | { |
1264 | 27 | Playlist *playlist; | 27 | Playlist *playlist; |
1265 | 28 | SubsonicTableViewController *originator; | 28 | SubsonicTableViewController *originator; |
1266 | 29 | UITabBarController *tabBarController; | ||
1267 | 30 | } | 29 | } |
1269 | 31 | + (UINavigationController *)navigableViewControllerWithPlaylist:(Playlist *)playlist originator:(SubsonicTableViewController *)originator; | 30 | + (PlaylistEditViewController *)playlistEditViewControllerWithPlaylist:(Playlist *)playlist originator:(SubsonicTableViewController *)originator; |
1270 | 32 | - (id)initWithPlaylist:(Playlist *)aPlaylist; | 31 | - (id)initWithPlaylist:(Playlist *)aPlaylist; |
1271 | 33 | - (void)finish:(id)sender; | 32 | - (void)finish:(id)sender; |
1272 | 34 | @property(nonatomic,retain) Playlist *playlist; | 33 | @property(nonatomic,retain) Playlist *playlist; |
1273 | 35 | @property(nonatomic,retain) SubsonicTableViewController *originator; | 34 | @property(nonatomic,retain) SubsonicTableViewController *originator; |
1274 | 36 | @property(nonatomic,retain) IBOutlet UITabBarController *tabBarController; | ||
1275 | 37 | @end | 35 | @end |
1276 | 38 | 36 | ||
1277 | === modified file 'musicstreaming/view_controllers/PlaylistEditViewController.m' | |||
1278 | --- musicstreaming/view_controllers/PlaylistEditViewController.m 2011-05-27 18:37:16 +0000 | |||
1279 | +++ musicstreaming/view_controllers/PlaylistEditViewController.m 2011-06-21 18:28:35 +0000 | |||
1280 | @@ -27,51 +27,33 @@ | |||
1281 | 27 | #import "Playlist.h" | 27 | #import "Playlist.h" |
1282 | 28 | #import "Song.h" | 28 | #import "Song.h" |
1283 | 29 | #import "SongListParser.h" | 29 | #import "SongListParser.h" |
1285 | 30 | #import "NSMutableSet+Extras.h" | 30 | #import "NSMutableArray+Extras.h" |
1286 | 31 | 31 | ||
1287 | 32 | @implementation PlaylistEditViewController | 32 | @implementation PlaylistEditViewController |
1289 | 33 | @synthesize playlist, originator, tabBarController; | 33 | @synthesize playlist, originator; |
1290 | 34 | 34 | ||
1292 | 35 | + (UINavigationController *)navigableViewControllerWithPlaylist:(Playlist *)playlist originator:(SubsonicTableViewController *)originator | 35 | + (PlaylistEditViewController *)playlistEditViewControllerWithPlaylist:(Playlist *)playlist originator:(SubsonicTableViewController *)originator |
1293 | 36 | { | 36 | { |
1294 | 37 | PlaylistEditViewController *playlistEditViewController = [[[PlaylistEditViewController alloc] initWithPlaylist:playlist] autorelease]; | 37 | PlaylistEditViewController *playlistEditViewController = [[[PlaylistEditViewController alloc] initWithPlaylist:playlist] autorelease]; |
1295 | 38 | playlistEditViewController.originator = originator; | 38 | playlistEditViewController.originator = originator; |
1299 | 39 | UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:playlistEditViewController] autorelease]; | 39 | return playlistEditViewController; |
1297 | 40 | nav.navigationBarHidden = YES; | ||
1298 | 41 | return nav; | ||
1300 | 42 | } | 40 | } |
1301 | 43 | 41 | ||
1302 | 44 | - (id)initWithPlaylist:(Playlist *)aPlaylist | 42 | - (id)initWithPlaylist:(Playlist *)aPlaylist |
1303 | 45 | { | 43 | { |
1305 | 46 | if ((self = [super initWithNibName:@"PlaylistEditViewController" bundle:nil])) | 44 | if ((self = [super initWithNibName:nil bundle:nil])) |
1306 | 47 | { | 45 | { |
1307 | 48 | self.playlist = aPlaylist; | 46 | self.playlist = aPlaylist; |
1308 | 49 | self.originator = nil; | 47 | self.originator = nil; |
1309 | 48 | |||
1310 | 49 | // Hacky way to avoid the strange push-down of the tab bar buttons | ||
1311 | 50 | // self.view.frame = CGRectMake(0, 0, 320, 460); | ||
1312 | 51 | |||
1313 | 52 | [self setViewControllers:[NSArray arrayWithObjects:[PlaylistEditArtistListViewController navigableViewControllerWithOriginator:self], [PlaylistEditAlbumListViewController navigableViewControllerWithOriginator:self], [PlaylistEditSongListViewController navigableViewControllerWithOriginator:self], nil] animated:YES]; | ||
1314 | 50 | } | 53 | } |
1315 | 51 | return self; | 54 | return self; |
1316 | 52 | } | 55 | } |
1317 | 53 | 56 | ||
1318 | 54 | - (void)viewDidLoad | ||
1319 | 55 | { | ||
1320 | 56 | [super viewDidLoad]; | ||
1321 | 57 | |||
1322 | 58 | // Hacky way to avoid the strange push-down of the tab bar buttons | ||
1323 | 59 | tabBarController.view.frame = CGRectMake(0, 0, 320, 460); | ||
1324 | 60 | |||
1325 | 61 | [self.view addSubview:[tabBarController view]]; | ||
1326 | 62 | |||
1327 | 63 | [tabBarController setViewControllers:[NSArray arrayWithObjects:[PlaylistEditArtistListViewController navigableViewControllerWithOriginator:self], [PlaylistEditAlbumListViewController navigableViewControllerWithOriginator:self], [PlaylistEditSongListViewController navigableViewControllerWithOriginator:self], nil] animated:YES]; | ||
1328 | 64 | |||
1329 | 65 | tabBarController.delegate = self; | ||
1330 | 66 | } | ||
1331 | 67 | |||
1332 | 68 | #pragma mark - UITabBarControllerDelegate | ||
1333 | 69 | |||
1334 | 70 | - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController | ||
1335 | 71 | { | ||
1336 | 72 | self.navigationItem.title = viewController.title; | ||
1337 | 73 | } | ||
1338 | 74 | |||
1339 | 75 | #pragma mark - Memory management | 57 | #pragma mark - Memory management |
1340 | 76 | 58 | ||
1341 | 77 | - (void)dealloc | 59 | - (void)dealloc |
1342 | @@ -84,7 +66,7 @@ | |||
1343 | 84 | 66 | ||
1344 | 85 | - (void)finish:(id)sender | 67 | - (void)finish:(id)sender |
1345 | 86 | { | 68 | { |
1347 | 87 | NSMutableSet *extraParameters = [NSMutableSet set]; | 69 | NSMutableArray *extraParameters = [NSMutableArray array]; |
1348 | 88 | if (nil != self.playlist.playlistId) | 70 | if (nil != self.playlist.playlistId) |
1349 | 89 | { | 71 | { |
1350 | 90 | [extraParameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"playlistId", self.playlist.playlistId, nil]]; | 72 | [extraParameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"playlistId", self.playlist.playlistId, nil]]; |
1351 | 91 | 73 | ||
1352 | === modified file 'musicstreaming/view_controllers/PlaylistListViewController.m' | |||
1353 | --- musicstreaming/view_controllers/PlaylistListViewController.m 2011-06-16 19:12:54 +0000 | |||
1354 | +++ musicstreaming/view_controllers/PlaylistListViewController.m 2011-06-21 18:28:35 +0000 | |||
1355 | @@ -46,17 +46,17 @@ | |||
1356 | 46 | { | 46 | { |
1357 | 47 | if ((self = [super initWithTitle:title])) | 47 | if ((self = [super initWithTitle:title])) |
1358 | 48 | { | 48 | { |
1370 | 49 | // UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,40)]; | 49 | UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,40)]; |
1371 | 50 | // header.autoresizingMask = UIViewAutoresizingFlexibleWidth; | 50 | header.autoresizingMask = UIViewAutoresizingFlexibleWidth; |
1372 | 51 | // | 51 | |
1373 | 52 | // UIButton *createButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; | 52 | UIButton *createButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; |
1374 | 53 | // createButton.frame = CGRectMake(5, 5, 310, 30); | 53 | createButton.frame = CGRectMake(5, 5, 310, 30); |
1375 | 54 | // [createButton setTitle:NSLocalizedString(@"Create new playlist", @"") forState:UIControlStateNormal]; | 54 | [createButton setTitle:NSLocalizedString(@"Create new playlist", @"") forState:UIControlStateNormal]; |
1376 | 55 | // [createButton addTarget:self action:@selector(createNewPlaylist) forControlEvents:UIControlEventTouchUpInside]; | 55 | [createButton addTarget:self action:@selector(createNewPlaylist) forControlEvents:UIControlEventTouchUpInside]; |
1377 | 56 | // [header addSubview:createButton]; | 56 | [header addSubview:createButton]; |
1378 | 57 | // | 57 | |
1379 | 58 | // self.tableView.tableHeaderView = header; | 58 | self.tableView.tableHeaderView = header; |
1380 | 59 | // [header release]; | 59 | [header release]; |
1381 | 60 | } | 60 | } |
1382 | 61 | return self; | 61 | return self; |
1383 | 62 | } | 62 | } |
1384 | @@ -142,8 +142,8 @@ | |||
1385 | 142 | { | 142 | { |
1386 | 143 | Playlist *playlist = [NSEntityDescription insertNewObjectForEntityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()]; | 143 | Playlist *playlist = [NSEntityDescription insertNewObjectForEntityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()]; |
1387 | 144 | playlist.name = [(AlertPrompt *)alertPrompt enteredText]; | 144 | playlist.name = [(AlertPrompt *)alertPrompt enteredText]; |
1390 | 145 | UINavigationController *playlistEditViewController = [PlaylistEditViewController navigableViewControllerWithPlaylist:playlist originator:self]; | 145 | SaveContext(); |
1391 | 146 | playlistEditViewController.navigationBar.barStyle = UIBarStyleBlack; | 146 | PlaylistEditViewController *playlistEditViewController = [PlaylistEditViewController playlistEditViewControllerWithPlaylist:playlist originator:self]; |
1392 | 147 | [self.navigationController presentModalViewController:playlistEditViewController animated:YES]; | 147 | [self.navigationController presentModalViewController:playlistEditViewController animated:YES]; |
1393 | 148 | } | 148 | } |
1394 | 149 | else | 149 | else |
1395 | 150 | 150 | ||
1396 | === modified file 'musicstreaming/view_controllers/PlaylistViewController.m' | |||
1397 | --- musicstreaming/view_controllers/PlaylistViewController.m 2011-06-16 19:12:54 +0000 | |||
1398 | +++ musicstreaming/view_controllers/PlaylistViewController.m 2011-06-21 18:28:35 +0000 | |||
1399 | @@ -22,7 +22,11 @@ | |||
1400 | 22 | #import "Playlist.h" | 22 | #import "Playlist.h" |
1401 | 23 | #import "PlaylistParser.h" | 23 | #import "PlaylistParser.h" |
1402 | 24 | #import "Song.h" | 24 | #import "Song.h" |
1404 | 25 | #import "NSMutableSet+Extras.h" | 25 | #import "NSMutableArray+Extras.h" |
1405 | 26 | |||
1406 | 27 | @interface PlaylistViewController () | ||
1407 | 28 | - (void)deleteLocalPlaylist; | ||
1408 | 29 | @end | ||
1409 | 26 | 30 | ||
1410 | 27 | @implementation PlaylistViewController | 31 | @implementation PlaylistViewController |
1411 | 28 | 32 | ||
1412 | @@ -80,9 +84,9 @@ | |||
1413 | 80 | [self.songs removeAllObjects]; | 84 | [self.songs removeAllObjects]; |
1414 | 81 | if ([self.playlist isKindOfClass:[NSManagedObject class]]) | 85 | if ([self.playlist isKindOfClass:[NSManagedObject class]]) |
1415 | 82 | [PerThreadManagedObjectContext() refreshObject:self.playlist mergeChanges:YES]; //force the playlist to reload its set of songs from the persistent store. | 86 | [PerThreadManagedObjectContext() refreshObject:self.playlist mergeChanges:YES]; //force the playlist to reload its set of songs from the persistent store. |
1417 | 83 | [self.songs addObjectsFromArray:[self.playlist.songs allObjects]]; | 87 | [self.songs addObjectsFromArray:self.playlist.songs]; |
1418 | 84 | // this should sort based on something else (like the index on the playlist or something) | 88 | // this should sort based on something else (like the index on the playlist or something) |
1420 | 85 | [self.songs sortUsingSelector:@selector(compare:)]; | 89 | // [self.songs sortUsingSelector:@selector(compare:)]; |
1421 | 86 | } | 90 | } |
1422 | 87 | 91 | ||
1423 | 88 | [self.tableView reloadData]; | 92 | [self.tableView reloadData]; |
1424 | @@ -93,13 +97,16 @@ | |||
1425 | 93 | { | 97 | { |
1426 | 94 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | 98 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
1427 | 95 | 99 | ||
1431 | 96 | NSError *error = [self.playlist loadSongs]; | 100 | if (self.playlist.playlistId) // Protect against CouchDB access being down, at least allow for local playlists. |
1429 | 97 | |||
1430 | 98 | if (error) | ||
1432 | 99 | { | 101 | { |
1434 | 100 | [self performSelectorOnMainThread:@selector(failedLoadingData:) withObject:error waitUntilDone:NO]; | 102 | NSError *error = [self.playlist loadSongs]; |
1435 | 103 | |||
1436 | 104 | if (error) | ||
1437 | 105 | { | ||
1438 | 106 | [self performSelectorOnMainThread:@selector(failedLoadingData:) withObject:error waitUntilDone:NO]; | ||
1439 | 107 | } | ||
1440 | 101 | } | 108 | } |
1442 | 102 | 109 | ||
1443 | 103 | [self performSelectorOnMainThread:@selector(loadLocalData) withObject:nil waitUntilDone:NO]; | 110 | [self performSelectorOnMainThread:@selector(loadLocalData) withObject:nil waitUntilDone:NO]; |
1444 | 104 | [self performSelectorOnMainThread:@selector(finishLoadingData) withObject:nil waitUntilDone:NO]; | 111 | [self performSelectorOnMainThread:@selector(finishLoadingData) withObject:nil waitUntilDone:NO]; |
1445 | 105 | [pool release]; | 112 | [pool release]; |
1446 | @@ -204,38 +211,46 @@ | |||
1447 | 204 | 211 | ||
1448 | 205 | - (void)editPlaylist | 212 | - (void)editPlaylist |
1449 | 206 | { | 213 | { |
1454 | 207 | return; | 214 | PlaylistEditViewController *playlistEditViewController = [PlaylistEditViewController playlistEditViewControllerWithPlaylist:self.playlist originator:self]; |
1451 | 208 | // Need to figure out what to do here | ||
1452 | 209 | UINavigationController *playlistEditViewController = [PlaylistEditViewController navigableViewControllerWithPlaylist:self.playlist originator:self]; | ||
1453 | 210 | playlistEditViewController.navigationBar.barStyle = UIBarStyleBlack; | ||
1455 | 211 | [self.navigationController presentModalViewController:playlistEditViewController animated:YES]; | 215 | [self.navigationController presentModalViewController:playlistEditViewController animated:YES]; |
1456 | 212 | } | 216 | } |
1457 | 213 | 217 | ||
1458 | 214 | - (void)clearPlaylist | 218 | - (void)clearPlaylist |
1459 | 215 | { | 219 | { |
1463 | 216 | return; | 220 | self.playlist.playlistSongIndexes = nil; |
1461 | 217 | // Need to figure out what to do here | ||
1462 | 218 | self.playlist.songs = [NSMutableArray array]; | ||
1464 | 219 | self.songs = nil; | 221 | self.songs = nil; |
1465 | 222 | SaveContext(); | ||
1466 | 220 | [self.tableView reloadData]; | 223 | [self.tableView reloadData]; |
1467 | 221 | } | 224 | } |
1468 | 222 | 225 | ||
1469 | 223 | - (void)deletePlaylist | 226 | - (void)deletePlaylist |
1470 | 224 | { | 227 | { |
1478 | 225 | // Need to figure out what to do here | 228 | if (self.playlist.playlistId) |
1479 | 226 | NSMutableSet *extraParameters = [NSMutableSet set]; | 229 | { |
1480 | 227 | [extraParameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.playlist.playlistId, nil]]; | 230 | NSMutableArray *extraParameters = [NSMutableArray array]; |
1481 | 228 | NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"deletePlaylist.view" parameters:extraParameters]; | 231 | [extraParameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.playlist.playlistId, nil]]; |
1482 | 229 | NSURLRequest *request = [[[NSURLRequest alloc] initWithURL:url] autorelease]; | 232 | NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"deletePlaylist.view" parameters:extraParameters]; |
1483 | 230 | NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:self]; | 233 | NSURLRequest *request = [[[NSURLRequest alloc] initWithURL:url] autorelease]; |
1484 | 231 | [connection start]; | 234 | NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:self]; |
1485 | 235 | [connection start]; | ||
1486 | 236 | } | ||
1487 | 237 | else | ||
1488 | 238 | { | ||
1489 | 239 | [self deleteLocalPlaylist]; | ||
1490 | 240 | } | ||
1491 | 232 | } | 241 | } |
1492 | 233 | 242 | ||
1493 | 234 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response | 243 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response |
1494 | 235 | { | 244 | { |
1498 | 236 | [PerThreadManagedObjectContext() deleteObject:self.playlist]; | 245 | [self deleteLocalPlaylist]; |
1499 | 237 | [self.playlistListViewController performSelector:@selector(reload:) withObject:nil afterDelay:0.25]; | 246 | } |
1500 | 238 | [self.navigationController popViewControllerAnimated:YES]; | 247 | |
1501 | 248 | - (void)deleteLocalPlaylist | ||
1502 | 249 | { | ||
1503 | 250 | [PerThreadManagedObjectContext() deleteObject:self.playlist]; | ||
1504 | 251 | SaveContext(); | ||
1505 | 252 | [self.playlistListViewController performSelector:@selector(reload:) withObject:nil afterDelay:0.25]; | ||
1506 | 253 | [self.navigationController popViewControllerAnimated:YES]; | ||
1507 | 239 | } | 254 | } |
1508 | 240 | 255 | ||
1509 | 241 | - (void)resetTableData:(id)sender | 256 | - (void)resetTableData:(id)sender |
1510 | 242 | 257 | ||
1511 | === modified file 'musicstreaming/view_controllers/SongViewController.m' | |||
1512 | --- musicstreaming/view_controllers/SongViewController.m 2011-06-13 17:22:43 +0000 | |||
1513 | +++ musicstreaming/view_controllers/SongViewController.m 2011-06-21 18:28:35 +0000 | |||
1514 | @@ -38,7 +38,6 @@ | |||
1515 | 38 | #import <MediaPlayer/MediaPlayer.h> | 38 | #import <MediaPlayer/MediaPlayer.h> |
1516 | 39 | #import <CFNetwork/CFNetwork.h> | 39 | #import <CFNetwork/CFNetwork.h> |
1517 | 40 | #import "NSNumber+Extras.h" | 40 | #import "NSNumber+Extras.h" |
1518 | 41 | #import "NSMutableSet+Extras.h" | ||
1519 | 42 | 41 | ||
1520 | 43 | @interface SongViewController (Private) | 42 | @interface SongViewController (Private) |
1521 | 44 | //KVO-driven stuff | 43 | //KVO-driven stuff |
1522 | 45 | 44 | ||
1523 | === modified file 'musicstreaming/view_controllers/SubsonicTableViewController.h' | |||
1524 | --- musicstreaming/view_controllers/SubsonicTableViewController.h 2011-06-16 19:12:54 +0000 | |||
1525 | +++ musicstreaming/view_controllers/SubsonicTableViewController.h 2011-06-21 18:28:35 +0000 | |||
1526 | @@ -21,13 +21,11 @@ | |||
1527 | 21 | #import "PullRefreshTableViewController.h" | 21 | #import "PullRefreshTableViewController.h" |
1528 | 22 | #import "Subsonic.h" | 22 | #import "Subsonic.h" |
1529 | 23 | #import "Song.h" | 23 | #import "Song.h" |
1530 | 24 | #import "MiniHudView.h" | ||
1531 | 25 | 24 | ||
1532 | 26 | @class Album; | 25 | @class Album; |
1533 | 27 | 26 | ||
1534 | 28 | @interface SubsonicTableViewController : PullRefreshTableViewController <UIAlertViewDelegate, UISearchDisplayDelegate, UISearchBarDelegate> | 27 | @interface SubsonicTableViewController : PullRefreshTableViewController <UIAlertViewDelegate, UISearchDisplayDelegate, UISearchBarDelegate> |
1535 | 29 | { | 28 | { |
1536 | 30 | MiniHudView *hudView; | ||
1537 | 31 | BOOL showProgressHUD; | 29 | BOOL showProgressHUD; |
1538 | 32 | NSTimer *respondToRemoteTimer; | 30 | NSTimer *respondToRemoteTimer; |
1539 | 33 | NSMutableArray *tableData; | 31 | NSMutableArray *tableData; |
1540 | 34 | 32 | ||
1541 | === modified file 'musicstreaming/view_controllers/SubsonicTableViewController.m' | |||
1542 | --- musicstreaming/view_controllers/SubsonicTableViewController.m 2011-06-16 19:14:45 +0000 | |||
1543 | +++ musicstreaming/view_controllers/SubsonicTableViewController.m 2011-06-21 18:28:35 +0000 | |||
1544 | @@ -22,7 +22,6 @@ | |||
1545 | 22 | #import "SongViewController.h" | 22 | #import "SongViewController.h" |
1546 | 23 | #import "Subsonic.h" | 23 | #import "Subsonic.h" |
1547 | 24 | #import "Album.h" | 24 | #import "Album.h" |
1548 | 25 | #import "NSMutableSet+Extras.h" | ||
1549 | 26 | #import "Reachability.h" | 25 | #import "Reachability.h" |
1550 | 27 | #import "UONetworkStatusCoordinator.h" | 26 | #import "UONetworkStatusCoordinator.h" |
1551 | 28 | 27 | ||
1552 | @@ -65,7 +64,7 @@ | |||
1553 | 65 | { | 64 | { |
1554 | 66 | [super viewDidLoad]; | 65 | [super viewDidLoad]; |
1555 | 67 | 66 | ||
1557 | 68 | showProgressHUD = YES; | 67 | showProgressHUD = YES; |
1558 | 69 | respondToRemoteTimer = NULL; | 68 | respondToRemoteTimer = NULL; |
1559 | 70 | 69 | ||
1560 | 71 | if (0 == [self.tableData count]) | 70 | if (0 == [self.tableData count]) |
1561 | @@ -304,6 +303,7 @@ | |||
1562 | 304 | { | 303 | { |
1563 | 305 | [self hideLoadingUI]; | 304 | [self hideLoadingUI]; |
1564 | 306 | NSLog(@"Error loading data: %@", error); | 305 | NSLog(@"Error loading data: %@", error); |
1565 | 306 | // TODO: Get better error messages communicated to the user. | ||
1566 | 307 | // [self showError:NSLocalizedString(@"Unable to load your music. Please check your Internet connection or account credentials and try again.",@"")]; | 307 | // [self showError:NSLocalizedString(@"Unable to load your music. Please check your Internet connection or account credentials and try again.",@"")]; |
1567 | 308 | } | 308 | } |
1568 | 309 | 309 | ||
1569 | @@ -377,18 +377,6 @@ | |||
1570 | 377 | [self showMessage:errorMessage withTitle:NSLocalizedString(@"Error",@"")]; | 377 | [self showMessage:errorMessage withTitle:NSLocalizedString(@"Error",@"")]; |
1571 | 378 | } | 378 | } |
1572 | 379 | 379 | ||
1573 | 380 | #pragma mark - MiniHudView | ||
1574 | 381 | |||
1575 | 382 | - (MiniHudView*)hudView | ||
1576 | 383 | { | ||
1577 | 384 | if (nil == hudView) | ||
1578 | 385 | { | ||
1579 | 386 | hudView = [[MiniHudView alloc] initWithFrame:CGRectMake(270, 386, 30, 30)]; | ||
1580 | 387 | [[UIApplication sharedApplication].keyWindow addSubview:self.hudView]; | ||
1581 | 388 | } | ||
1582 | 389 | return hudView; | ||
1583 | 390 | } | ||
1584 | 391 | |||
1585 | 392 | - (void)showLoadingUI | 380 | - (void)showLoadingUI |
1586 | 393 | { | 381 | { |
1587 | 394 | if (showProgressHUD) | 382 | if (showProgressHUD) |
1588 | @@ -406,11 +394,7 @@ | |||
1589 | 406 | 394 | ||
1590 | 407 | - (void)hideLoadingUI | 395 | - (void)hideLoadingUI |
1591 | 408 | { | 396 | { |
1597 | 409 | if (showProgressHUD) | 397 | if (!showProgressHUD) |
1593 | 410 | { | ||
1594 | 411 | [self.hudView hide:YES]; | ||
1595 | 412 | } | ||
1596 | 413 | else | ||
1598 | 414 | { | 398 | { |
1599 | 415 | [self stopLoading]; | 399 | [self stopLoading]; |
1600 | 416 | showProgressHUD = YES; | 400 | showProgressHUD = YES; |
1601 | @@ -434,10 +418,8 @@ | |||
1602 | 434 | - (void)dealloc | 418 | - (void)dealloc |
1603 | 435 | { | 419 | { |
1604 | 436 | [[NSNotificationCenter defaultCenter] removeObserver:self]; | 420 | [[NSNotificationCenter defaultCenter] removeObserver:self]; |
1605 | 437 | [hudView hide:NO]; | ||
1606 | 438 | RELEASE_SAFELY(parserDelegate); | 421 | RELEASE_SAFELY(parserDelegate); |
1607 | 439 | RELEASE_SAFELY(viewName); | 422 | RELEASE_SAFELY(viewName); |
1608 | 440 | RELEASE_SAFELY(hudView); | ||
1609 | 441 | RELEASE_SAFELY(tableData); | 423 | RELEASE_SAFELY(tableData); |
1610 | 442 | RELEASE_SAFELY(searchResults); | 424 | RELEASE_SAFELY(searchResults); |
1611 | 443 | 425 | ||
1612 | 444 | 426 | ||
1613 | === modified file 'musicstreaming/view_controllers/SubsonicViewController.m' | |||
1614 | --- musicstreaming/view_controllers/SubsonicViewController.m 2011-06-16 15:26:22 +0000 | |||
1615 | +++ musicstreaming/view_controllers/SubsonicViewController.m 2011-06-21 18:28:35 +0000 | |||
1616 | @@ -72,19 +72,16 @@ | |||
1617 | 72 | case UIEventSubtypeRemoteControlPause: | 72 | case UIEventSubtypeRemoteControlPause: |
1618 | 73 | case UIEventSubtypeRemoteControlTogglePlayPause: | 73 | case UIEventSubtypeRemoteControlTogglePlayPause: |
1619 | 74 | { | 74 | { |
1620 | 75 | NSLog(@"Got a remote command to play/pause"); | ||
1621 | 76 | [[StreamingPlayer sharedStreamingPlayer] playPauseSong]; | 75 | [[StreamingPlayer sharedStreamingPlayer] playPauseSong]; |
1622 | 77 | break; | 76 | break; |
1623 | 78 | } | 77 | } |
1624 | 79 | case UIEventSubtypeRemoteControlNextTrack: | 78 | case UIEventSubtypeRemoteControlNextTrack: |
1625 | 80 | { | 79 | { |
1626 | 81 | NSLog(@"Got a remote command to skip to the next track"); | ||
1627 | 82 | [[StreamingPlayer sharedStreamingPlayer] jumpAhead:self.jumpBy]; | 80 | [[StreamingPlayer sharedStreamingPlayer] jumpAhead:self.jumpBy]; |
1628 | 83 | break; | 81 | break; |
1629 | 84 | } | 82 | } |
1630 | 85 | case UIEventSubtypeRemoteControlPreviousTrack: | 83 | case UIEventSubtypeRemoteControlPreviousTrack: |
1631 | 86 | { | 84 | { |
1632 | 87 | NSLog(@"Got a remote command to go to previous track"); | ||
1633 | 88 | [[StreamingPlayer sharedStreamingPlayer] prevSong]; | 85 | [[StreamingPlayer sharedStreamingPlayer] prevSong]; |
1634 | 89 | break; | 86 | break; |
1635 | 90 | } | 87 | } |
1636 | 91 | 88 | ||
1637 | === removed file 'musicstreaming/xibs/PlaylistEditViewController.xib' | |||
1638 | --- musicstreaming/xibs/PlaylistEditViewController.xib 2011-05-18 14:10:38 +0000 | |||
1639 | +++ musicstreaming/xibs/PlaylistEditViewController.xib 1970-01-01 00:00:00 +0000 | |||
1640 | @@ -1,314 +0,0 @@ | |||
1641 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
1642 | 2 | <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> | ||
1643 | 3 | <data> | ||
1644 | 4 | <int key="IBDocument.SystemTarget">1056</int> | ||
1645 | 5 | <string key="IBDocument.SystemVersion">10J869</string> | ||
1646 | 6 | <string key="IBDocument.InterfaceBuilderVersion">1306</string> | ||
1647 | 7 | <string key="IBDocument.AppKitVersion">1038.35</string> | ||
1648 | 8 | <string key="IBDocument.HIToolboxVersion">461.00</string> | ||
1649 | 9 | <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> | ||
1650 | 10 | <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
1651 | 11 | <string key="NS.object.0">301</string> | ||
1652 | 12 | </object> | ||
1653 | 13 | <object class="NSArray" key="IBDocument.IntegratedClassDependencies"> | ||
1654 | 14 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1655 | 15 | <string>IBUITabBar</string> | ||
1656 | 16 | <string>IBUITabBarController</string> | ||
1657 | 17 | <string>IBUIViewController</string> | ||
1658 | 18 | <string>IBUIView</string> | ||
1659 | 19 | <string>IBUITabBarItem</string> | ||
1660 | 20 | <string>IBProxyObject</string> | ||
1661 | 21 | </object> | ||
1662 | 22 | <object class="NSArray" key="IBDocument.PluginDependencies"> | ||
1663 | 23 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1664 | 24 | <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
1665 | 25 | </object> | ||
1666 | 26 | <object class="NSMutableDictionary" key="IBDocument.Metadata"> | ||
1667 | 27 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1668 | 28 | <object class="NSArray" key="dict.sortedKeys" id="0"> | ||
1669 | 29 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1670 | 30 | </object> | ||
1671 | 31 | <reference key="dict.values" ref="0"/> | ||
1672 | 32 | </object> | ||
1673 | 33 | <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000"> | ||
1674 | 34 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1675 | 35 | <object class="IBProxyObject" id="372490531"> | ||
1676 | 36 | <string key="IBProxiedObjectIdentifier">IBFilesOwner</string> | ||
1677 | 37 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1678 | 38 | </object> | ||
1679 | 39 | <object class="IBProxyObject" id="975951072"> | ||
1680 | 40 | <string key="IBProxiedObjectIdentifier">IBFirstResponder</string> | ||
1681 | 41 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1682 | 42 | </object> | ||
1683 | 43 | <object class="IBUIView" id="191373211"> | ||
1684 | 44 | <reference key="NSNextResponder"/> | ||
1685 | 45 | <int key="NSvFlags">274</int> | ||
1686 | 46 | <string key="NSFrame">{{0, 20}, {320, 460}}</string> | ||
1687 | 47 | <reference key="NSSuperview"/> | ||
1688 | 48 | <reference key="NSNextKeyView"/> | ||
1689 | 49 | <object class="NSColor" key="IBUIBackgroundColor"> | ||
1690 | 50 | <int key="NSColorSpace">3</int> | ||
1691 | 51 | <bytes key="NSWhite">MQA</bytes> | ||
1692 | 52 | <object class="NSColorSpace" key="NSCustomColorSpace"> | ||
1693 | 53 | <int key="NSID">2</int> | ||
1694 | 54 | </object> | ||
1695 | 55 | </object> | ||
1696 | 56 | <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> | ||
1697 | 57 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1698 | 58 | </object> | ||
1699 | 59 | <object class="IBUITabBarController" id="1031713869"> | ||
1700 | 60 | <object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/> | ||
1701 | 61 | <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> | ||
1702 | 62 | <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics"> | ||
1703 | 63 | <int key="IBUIInterfaceOrientation">1</int> | ||
1704 | 64 | <int key="interfaceOrientation">1</int> | ||
1705 | 65 | </object> | ||
1706 | 66 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1707 | 67 | <bool key="IBUIHorizontal">NO</bool> | ||
1708 | 68 | <object class="IBUIViewController" key="IBUISelectedViewController" id="232609108"> | ||
1709 | 69 | <object class="IBUITabBarItem" key="IBUITabBarItem" id="647383633"> | ||
1710 | 70 | <string key="IBUITitle">Songs</string> | ||
1711 | 71 | <object class="NSCustomResource" key="IBUIImage"> | ||
1712 | 72 | <string key="NSClassName">NSImage</string> | ||
1713 | 73 | <string key="NSResourceName">songs.png</string> | ||
1714 | 74 | </object> | ||
1715 | 75 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1716 | 76 | </object> | ||
1717 | 77 | <reference key="IBUIParentViewController" ref="1031713869"/> | ||
1718 | 78 | <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/> | ||
1719 | 79 | <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics"> | ||
1720 | 80 | <int key="IBUIInterfaceOrientation">1</int> | ||
1721 | 81 | <int key="interfaceOrientation">1</int> | ||
1722 | 82 | </object> | ||
1723 | 83 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1724 | 84 | <bool key="IBUIHorizontal">NO</bool> | ||
1725 | 85 | </object> | ||
1726 | 86 | <object class="NSMutableArray" key="IBUIViewControllers"> | ||
1727 | 87 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1728 | 88 | <object class="IBUIViewController" id="264906486"> | ||
1729 | 89 | <object class="IBUITabBarItem" key="IBUITabBarItem" id="798442073"> | ||
1730 | 90 | <string key="IBUITitle">Artists</string> | ||
1731 | 91 | <object class="NSCustomResource" key="IBUIImage"> | ||
1732 | 92 | <string key="NSClassName">NSImage</string> | ||
1733 | 93 | <string key="NSResourceName">artists.png</string> | ||
1734 | 94 | </object> | ||
1735 | 95 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1736 | 96 | </object> | ||
1737 | 97 | <reference key="IBUIParentViewController" ref="1031713869"/> | ||
1738 | 98 | <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics"> | ||
1739 | 99 | <int key="IBUIInterfaceOrientation">1</int> | ||
1740 | 100 | <int key="interfaceOrientation">1</int> | ||
1741 | 101 | </object> | ||
1742 | 102 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1743 | 103 | <bool key="IBUIHorizontal">NO</bool> | ||
1744 | 104 | </object> | ||
1745 | 105 | <object class="IBUIViewController" id="135598923"> | ||
1746 | 106 | <object class="IBUITabBarItem" key="IBUITabBarItem" id="738429249"> | ||
1747 | 107 | <string key="IBUITitle">Albums</string> | ||
1748 | 108 | <object class="NSCustomResource" key="IBUIImage"> | ||
1749 | 109 | <string key="NSClassName">NSImage</string> | ||
1750 | 110 | <string key="NSResourceName">albums.png</string> | ||
1751 | 111 | </object> | ||
1752 | 112 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1753 | 113 | </object> | ||
1754 | 114 | <reference key="IBUIParentViewController" ref="1031713869"/> | ||
1755 | 115 | <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics"> | ||
1756 | 116 | <int key="IBUIInterfaceOrientation">1</int> | ||
1757 | 117 | <int key="interfaceOrientation">1</int> | ||
1758 | 118 | </object> | ||
1759 | 119 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1760 | 120 | <bool key="IBUIHorizontal">NO</bool> | ||
1761 | 121 | </object> | ||
1762 | 122 | <reference ref="232609108"/> | ||
1763 | 123 | </object> | ||
1764 | 124 | <object class="IBUITabBar" key="IBUITabBar" id="259355173"> | ||
1765 | 125 | <reference key="NSNextResponder"/> | ||
1766 | 126 | <int key="NSvFlags">266</int> | ||
1767 | 127 | <string key="NSFrame">{{0, 431}, {320, 49}}</string> | ||
1768 | 128 | <reference key="NSSuperview"/> | ||
1769 | 129 | <reference key="NSNextKeyView"/> | ||
1770 | 130 | <object class="NSColor" key="IBUIBackgroundColor"> | ||
1771 | 131 | <int key="NSColorSpace">3</int> | ||
1772 | 132 | <bytes key="NSWhite">MCAwAA</bytes> | ||
1773 | 133 | </object> | ||
1774 | 134 | <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1775 | 135 | </object> | ||
1776 | 136 | </object> | ||
1777 | 137 | </object> | ||
1778 | 138 | <object class="IBObjectContainer" key="IBDocument.Objects"> | ||
1779 | 139 | <object class="NSMutableArray" key="connectionRecords"> | ||
1780 | 140 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1781 | 141 | <object class="IBConnectionRecord"> | ||
1782 | 142 | <object class="IBCocoaTouchOutletConnection" key="connection"> | ||
1783 | 143 | <string key="label">view</string> | ||
1784 | 144 | <reference key="source" ref="372490531"/> | ||
1785 | 145 | <reference key="destination" ref="191373211"/> | ||
1786 | 146 | </object> | ||
1787 | 147 | <int key="connectionID">3</int> | ||
1788 | 148 | </object> | ||
1789 | 149 | <object class="IBConnectionRecord"> | ||
1790 | 150 | <object class="IBCocoaTouchOutletConnection" key="connection"> | ||
1791 | 151 | <string key="label">tabBarController</string> | ||
1792 | 152 | <reference key="source" ref="372490531"/> | ||
1793 | 153 | <reference key="destination" ref="1031713869"/> | ||
1794 | 154 | </object> | ||
1795 | 155 | <int key="connectionID">12</int> | ||
1796 | 156 | </object> | ||
1797 | 157 | </object> | ||
1798 | 158 | <object class="IBMutableOrderedSet" key="objectRecords"> | ||
1799 | 159 | <object class="NSArray" key="orderedObjects"> | ||
1800 | 160 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1801 | 161 | <object class="IBObjectRecord"> | ||
1802 | 162 | <int key="objectID">0</int> | ||
1803 | 163 | <reference key="object" ref="0"/> | ||
1804 | 164 | <reference key="children" ref="1000"/> | ||
1805 | 165 | <nil key="parent"/> | ||
1806 | 166 | </object> | ||
1807 | 167 | <object class="IBObjectRecord"> | ||
1808 | 168 | <int key="objectID">1</int> | ||
1809 | 169 | <reference key="object" ref="191373211"/> | ||
1810 | 170 | <reference key="parent" ref="0"/> | ||
1811 | 171 | </object> | ||
1812 | 172 | <object class="IBObjectRecord"> | ||
1813 | 173 | <int key="objectID">-1</int> | ||
1814 | 174 | <reference key="object" ref="372490531"/> | ||
1815 | 175 | <reference key="parent" ref="0"/> | ||
1816 | 176 | <string key="objectName">File's Owner</string> | ||
1817 | 177 | </object> | ||
1818 | 178 | <object class="IBObjectRecord"> | ||
1819 | 179 | <int key="objectID">-2</int> | ||
1820 | 180 | <reference key="object" ref="975951072"/> | ||
1821 | 181 | <reference key="parent" ref="0"/> | ||
1822 | 182 | </object> | ||
1823 | 183 | <object class="IBObjectRecord"> | ||
1824 | 184 | <int key="objectID">4</int> | ||
1825 | 185 | <reference key="object" ref="1031713869"/> | ||
1826 | 186 | <object class="NSMutableArray" key="children"> | ||
1827 | 187 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1828 | 188 | <reference ref="259355173"/> | ||
1829 | 189 | <reference ref="264906486"/> | ||
1830 | 190 | <reference ref="135598923"/> | ||
1831 | 191 | <reference ref="232609108"/> | ||
1832 | 192 | </object> | ||
1833 | 193 | <reference key="parent" ref="0"/> | ||
1834 | 194 | <string key="objectName">Tab Bar Controller</string> | ||
1835 | 195 | </object> | ||
1836 | 196 | <object class="IBObjectRecord"> | ||
1837 | 197 | <int key="objectID">5</int> | ||
1838 | 198 | <reference key="object" ref="259355173"/> | ||
1839 | 199 | <reference key="parent" ref="1031713869"/> | ||
1840 | 200 | </object> | ||
1841 | 201 | <object class="IBObjectRecord"> | ||
1842 | 202 | <int key="objectID">6</int> | ||
1843 | 203 | <reference key="object" ref="264906486"/> | ||
1844 | 204 | <object class="NSMutableArray" key="children"> | ||
1845 | 205 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1846 | 206 | <reference ref="798442073"/> | ||
1847 | 207 | </object> | ||
1848 | 208 | <reference key="parent" ref="1031713869"/> | ||
1849 | 209 | </object> | ||
1850 | 210 | <object class="IBObjectRecord"> | ||
1851 | 211 | <int key="objectID">7</int> | ||
1852 | 212 | <reference key="object" ref="135598923"/> | ||
1853 | 213 | <object class="NSMutableArray" key="children"> | ||
1854 | 214 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1855 | 215 | <reference ref="738429249"/> | ||
1856 | 216 | </object> | ||
1857 | 217 | <reference key="parent" ref="1031713869"/> | ||
1858 | 218 | </object> | ||
1859 | 219 | <object class="IBObjectRecord"> | ||
1860 | 220 | <int key="objectID">8</int> | ||
1861 | 221 | <reference key="object" ref="738429249"/> | ||
1862 | 222 | <reference key="parent" ref="135598923"/> | ||
1863 | 223 | </object> | ||
1864 | 224 | <object class="IBObjectRecord"> | ||
1865 | 225 | <int key="objectID">9</int> | ||
1866 | 226 | <reference key="object" ref="798442073"/> | ||
1867 | 227 | <reference key="parent" ref="264906486"/> | ||
1868 | 228 | </object> | ||
1869 | 229 | <object class="IBObjectRecord"> | ||
1870 | 230 | <int key="objectID">10</int> | ||
1871 | 231 | <reference key="object" ref="232609108"/> | ||
1872 | 232 | <object class="NSMutableArray" key="children"> | ||
1873 | 233 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1874 | 234 | <reference ref="647383633"/> | ||
1875 | 235 | </object> | ||
1876 | 236 | <reference key="parent" ref="1031713869"/> | ||
1877 | 237 | </object> | ||
1878 | 238 | <object class="IBObjectRecord"> | ||
1879 | 239 | <int key="objectID">11</int> | ||
1880 | 240 | <reference key="object" ref="647383633"/> | ||
1881 | 241 | <reference key="parent" ref="232609108"/> | ||
1882 | 242 | </object> | ||
1883 | 243 | </object> | ||
1884 | 244 | </object> | ||
1885 | 245 | <object class="NSMutableDictionary" key="flattenedProperties"> | ||
1886 | 246 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1887 | 247 | <object class="NSArray" key="dict.sortedKeys"> | ||
1888 | 248 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1889 | 249 | <string>-1.CustomClassName</string> | ||
1890 | 250 | <string>-2.CustomClassName</string> | ||
1891 | 251 | <string>1.IBEditorWindowLastContentRect</string> | ||
1892 | 252 | <string>1.IBPluginDependency</string> | ||
1893 | 253 | <string>10.IBPluginDependency</string> | ||
1894 | 254 | <string>11.IBPluginDependency</string> | ||
1895 | 255 | <string>4.IBPluginDependency</string> | ||
1896 | 256 | <string>5.IBPluginDependency</string> | ||
1897 | 257 | <string>6.IBPluginDependency</string> | ||
1898 | 258 | <string>7.IBPluginDependency</string> | ||
1899 | 259 | </object> | ||
1900 | 260 | <object class="NSMutableArray" key="dict.values"> | ||
1901 | 261 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1902 | 262 | <string>PlaylistEditViewController</string> | ||
1903 | 263 | <string>UIResponder</string> | ||
1904 | 264 | <string>{{354, 412}, {320, 480}}</string> | ||
1905 | 265 | <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
1906 | 266 | <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
1907 | 267 | <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
1908 | 268 | <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
1909 | 269 | <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
1910 | 270 | <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
1911 | 271 | <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
1912 | 272 | </object> | ||
1913 | 273 | </object> | ||
1914 | 274 | <object class="NSMutableDictionary" key="unlocalizedProperties"> | ||
1915 | 275 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1916 | 276 | <reference key="dict.sortedKeys" ref="0"/> | ||
1917 | 277 | <reference key="dict.values" ref="0"/> | ||
1918 | 278 | </object> | ||
1919 | 279 | <nil key="activeLocalization"/> | ||
1920 | 280 | <object class="NSMutableDictionary" key="localizations"> | ||
1921 | 281 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1922 | 282 | <reference key="dict.sortedKeys" ref="0"/> | ||
1923 | 283 | <reference key="dict.values" ref="0"/> | ||
1924 | 284 | </object> | ||
1925 | 285 | <nil key="sourceID"/> | ||
1926 | 286 | <int key="maxID">16</int> | ||
1927 | 287 | </object> | ||
1928 | 288 | <object class="IBClassDescriber" key="IBDocument.Classes"/> | ||
1929 | 289 | <int key="IBDocument.localizationMode">0</int> | ||
1930 | 290 | <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
1931 | 291 | <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies"> | ||
1932 | 292 | <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string> | ||
1933 | 293 | <integer value="3100" key="NS.object.0"/> | ||
1934 | 294 | </object> | ||
1935 | 295 | <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> | ||
1936 | 296 | <int key="IBDocument.defaultPropertyAccessControl">3</int> | ||
1937 | 297 | <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes"> | ||
1938 | 298 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1939 | 299 | <object class="NSArray" key="dict.sortedKeys"> | ||
1940 | 300 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1941 | 301 | <string>albums.png</string> | ||
1942 | 302 | <string>artists.png</string> | ||
1943 | 303 | <string>songs.png</string> | ||
1944 | 304 | </object> | ||
1945 | 305 | <object class="NSMutableArray" key="dict.values"> | ||
1946 | 306 | <bool key="EncodedWithXMLCoder">YES</bool> | ||
1947 | 307 | <string>{30, 30}</string> | ||
1948 | 308 | <string>{30, 30}</string> | ||
1949 | 309 | <string>{30, 30}</string> | ||
1950 | 310 | </object> | ||
1951 | 311 | </object> | ||
1952 | 312 | <string key="IBCocoaTouchPluginVersion">301</string> | ||
1953 | 313 | </data> | ||
1954 | 314 | </archive> |
Also fixed the playlist edit views and hardened against playlist connectivity for creation, editing, and deletion.