Merge lp:~urbanape/ubuntuone-ios-client/2.0-9-prerelease into lp:ubuntuone-ios-client

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
Reviewer Review Type Date Requested Status
Jason Foreman (community) Approve
Review via email: mp+65364@code.launchpad.net

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 :

Also fixed the playlist edit views and hardened against playlist connectivity for creation, editing, and deletion.

199. By Zachery Bir

Remove unneeded code, and an unneeded .xib, properly organize the PlaylistEditViewController 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
=== modified file 'musicstreaming/categories/NSMutableArray+Extras.h'
--- musicstreaming/categories/NSMutableArray+Extras.h 2011-03-29 14:22:42 +0000
+++ musicstreaming/categories/NSMutableArray+Extras.h 2011-06-21 18:28:35 +0000
@@ -21,4 +21,6 @@
2121
22@interface NSMutableArray (Extras)22@interface NSMutableArray (Extras)
23- (void)shuffle;23- (void)shuffle;
24- (void)addKeyValueObjectFromArray:(NSArray *)array;
25- (NSString*)urlEncodedString;
24@end26@end
2527
=== modified file 'musicstreaming/categories/NSMutableArray+Extras.m'
--- musicstreaming/categories/NSMutableArray+Extras.m 2011-03-29 14:22:42 +0000
+++ musicstreaming/categories/NSMutableArray+Extras.m 2011-06-21 18:28:35 +0000
@@ -19,6 +19,19 @@
1919
20#import "NSMutableArray+Extras.h"20#import "NSMutableArray+Extras.h"
2121
22// helper function: get the string form of any object
23static NSString *toString(id object)
24{
25 return [NSString stringWithFormat: @"%@", object];
26}
27
28// helper function: get the url encoded string form of any object
29static NSString *urlEncode(id object)
30{
31 NSString *string = toString(object);
32 return [string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
33}
34
22@implementation NSMutableArray (Extras)35@implementation NSMutableArray (Extras)
23- (void)shuffle36- (void)shuffle
24{37{
@@ -32,4 +45,25 @@
32 [self exchangeObjectAtIndex:i withObjectAtIndex:n];45 [self exchangeObjectAtIndex:i withObjectAtIndex:n];
33 }46 }
34}47}
48
49- (void)addKeyValueObjectFromArray:(NSArray *)array
50{
51 [self addObject:[NSDictionary dictionaryWithObjects:array
52 forKeys:[NSArray arrayWithObjects:@"key", @"value", nil]]];
53}
54
55- (NSString*)urlEncodedString
56{
57 NSMutableArray *parts = [NSMutableArray array];
58
59 for (id object in self)
60 {
61 id key = [object objectForKey:@"key"];
62 id value = [object objectForKey:@"value"];
63 NSString *part = [NSString stringWithFormat:@"%@=%@",urlEncode(key),urlEncode(value)];
64 [parts addObject:part];
65 }
66 return [parts componentsJoinedByString:@"&"];
67}
68
35@end69@end
3670
=== removed file 'musicstreaming/categories/NSMutableSet+Extras.h'
--- musicstreaming/categories/NSMutableSet+Extras.h 2011-04-08 01:55:24 +0000
+++ musicstreaming/categories/NSMutableSet+Extras.h 1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
1//
2// NSMutableSet+Extras.h
3// iSub
4//
5// Created by Zachery Bir on 4/7/11.
6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20#import <Foundation/Foundation.h>
21
22
23@interface NSMutableSet (Extras)
24- (void)addKeyValueObjectFromArray:(NSArray *)array;
25- (NSString*)urlEncodedString;
26@end
270
=== removed file 'musicstreaming/categories/NSMutableSet+Extras.m'
--- musicstreaming/categories/NSMutableSet+Extras.m 2011-04-08 01:55:24 +0000
+++ musicstreaming/categories/NSMutableSet+Extras.m 1970-01-01 00:00:00 +0000
@@ -1,57 +0,0 @@
1//
2// NSMutableSet+Extras.m
3// iSub
4//
5// Created by Zachery Bir on 4/7/11.
6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20#import "NSMutableSet+Extras.h"
21
22// helper function: get the string form of any object
23static NSString *toString(id object)
24{
25 return [NSString stringWithFormat: @"%@", object];
26}
27
28// helper function: get the url encoded string form of any object
29static NSString *urlEncode(id object)
30{
31 NSString *string = toString(object);
32 return [string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
33}
34
35@implementation NSMutableSet (Extras)
36
37- (void)addKeyValueObjectFromArray:(NSArray *)array
38{
39 [self addObject:[NSDictionary dictionaryWithObjects:array
40 forKeys:[NSArray arrayWithObjects:@"key", @"value", nil]]];
41}
42
43- (NSString*)urlEncodedString
44{
45 NSMutableArray *parts = [NSMutableArray array];
46
47 for (id object in self)
48 {
49 id key = [object objectForKey:@"key"];
50 id value = [object objectForKey:@"value"];
51 NSString *part = [NSString stringWithFormat:@"%@=%@",urlEncode(key),urlEncode(value)];
52 [parts addObject:part];
53 }
54 return [parts componentsJoinedByString:@"&"];
55}
56
57@end
580
=== removed file 'musicstreaming/controls/MiniHudView.h'
--- musicstreaming/controls/MiniHudView.h 2011-05-02 07:47:25 +0000
+++ musicstreaming/controls/MiniHudView.h 1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
1//
2// MiniHudView.h
3// iSub
4//
5// Created by Aaron Brethorst on 5/2/11.
6// Copyright 2011 Canonical. All rights reserved.
7//
8
9#import <UIKit/UIKit.h>
10
11@interface MiniHudView : UIView
12{
13 UIActivityIndicatorView *spinner;
14}
15- (void)show:(BOOL)yn;
16- (void)hide:(BOOL)yn;
17@end
180
=== removed file 'musicstreaming/controls/MiniHudView.m'
--- musicstreaming/controls/MiniHudView.m 2011-05-02 07:47:25 +0000
+++ musicstreaming/controls/MiniHudView.m 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
1//
2// MiniHudView.m
3// iSub
4//
5// Created by Aaron Brethorst on 5/2/11.
6// Copyright 2011 Canonical. All rights reserved.
7//
8
9#import "MiniHudView.h"
10#import <QuartzCore/QuartzCore.h>
11
12@implementation MiniHudView
13
14- (id)initWithFrame:(CGRect)aFrame
15{
16 if ((self = [super initWithFrame:aFrame]))
17 {
18 self.opaque = NO;
19 self.backgroundColor = [UIColor colorWithWhite:0.3 alpha:0.9f];
20 self.layer.cornerRadius = 8.0f;
21
22 spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
23 spinner.frame = CGRectMake(5, 5, 20, 20);
24 [self addSubview:spinner];
25
26 self.hidden = YES;
27 }
28 return self;
29}
30
31- (void)layoutSubviews
32{
33 [super layoutSubviews];
34}
35
36- (void)show:(BOOL)yn
37{
38 [spinner startAnimating];
39 self.hidden = NO;
40}
41
42- (void)hide:(BOOL)yn
43{
44 [spinner stopAnimating];
45 self.hidden = YES;
46}
47
48- (void)dealloc
49{
50 [spinner release];
51 [super dealloc];
52}
53
54@end
550
=== modified file 'musicstreaming/iSub-Info.plist'
--- musicstreaming/iSub-Info.plist 2011-06-07 09:20:03 +0000
+++ musicstreaming/iSub-Info.plist 2011-06-21 18:28:35 +0000
@@ -41,7 +41,7 @@
41 </dict>41 </dict>
42 </array>42 </array>
43 <key>CFBundleVersion</key>43 <key>CFBundleVersion</key>
44 <string>6</string>44 <string>10</string>
45 <key>LSRequiresIPhoneOS</key>45 <key>LSRequiresIPhoneOS</key>
46 <false/>46 <false/>
47 <key>NSMainNibFile</key>47 <key>NSMainNibFile</key>
4848
=== modified file 'musicstreaming/iSub.xcodeproj/project.pbxproj'
--- musicstreaming/iSub.xcodeproj/project.pbxproj 2011-06-16 16:39:50 +0000
+++ musicstreaming/iSub.xcodeproj/project.pbxproj 2011-06-21 18:28:35 +0000
@@ -21,14 +21,12 @@
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 */; };
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 */; };
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 */; };
24 91018B25135922BF0051EFDC /* PlaylistEditViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 91018B24135922BE0051EFDC /* PlaylistEditViewController.xib */; };
25 91018B4B135A724B0051EFDC /* PlaylistEditAlbumListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B42135A724B0051EFDC /* PlaylistEditAlbumListViewController.m */; };24 91018B4B135A724B0051EFDC /* PlaylistEditAlbumListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B42135A724B0051EFDC /* PlaylistEditAlbumListViewController.m */; };
26 91018B4C135A724B0051EFDC /* PlaylistEditAlbumViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B44135A724B0051EFDC /* PlaylistEditAlbumViewController.m */; };25 91018B4C135A724B0051EFDC /* PlaylistEditAlbumViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B44135A724B0051EFDC /* PlaylistEditAlbumViewController.m */; };
27 91018B4D135A724B0051EFDC /* PlaylistEditArtistListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B46135A724B0051EFDC /* PlaylistEditArtistListViewController.m */; };26 91018B4D135A724B0051EFDC /* PlaylistEditArtistListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B46135A724B0051EFDC /* PlaylistEditArtistListViewController.m */; };
28 91018B4E135A724B0051EFDC /* PlaylistEditArtistViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B48135A724B0051EFDC /* PlaylistEditArtistViewController.m */; };27 91018B4E135A724B0051EFDC /* PlaylistEditArtistViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B48135A724B0051EFDC /* PlaylistEditArtistViewController.m */; };
29 91018B4F135A724B0051EFDC /* PlaylistEditSongListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B4A135A724B0051EFDC /* PlaylistEditSongListViewController.m */; };28 91018B4F135A724B0051EFDC /* PlaylistEditSongListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 91018B4A135A724B0051EFDC /* PlaylistEditSongListViewController.m */; };
30 9110DC38134C045A0046B8E4 /* AlbumParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC37134C04590046B8E4 /* AlbumParser.m */; };29 9110DC38134C045A0046B8E4 /* AlbumParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC37134C04590046B8E4 /* AlbumParser.m */; };
31 9110DC41134E4EEF0046B8E4 /* NSMutableSet+Extras.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC40134E4EEF0046B8E4 /* NSMutableSet+Extras.m */; };
32 9110DC44134EAC740046B8E4 /* AlbumListParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC43134EAC730046B8E4 /* AlbumListParser.m */; };30 9110DC44134EAC740046B8E4 /* AlbumListParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC43134EAC730046B8E4 /* AlbumListParser.m */; };
33 9110DC571354A7490046B8E4 /* AlbumArtistUITableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC561354A7470046B8E4 /* AlbumArtistUITableViewCell.m */; };31 9110DC571354A7490046B8E4 /* AlbumArtistUITableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9110DC561354A7470046B8E4 /* AlbumArtistUITableViewCell.m */; };
34 9112B0241383FF27003C1D93 /* albums.png in Resources */ = {isa = PBXBuildFile; fileRef = 9112B01E1383FF27003C1D93 /* albums.png */; };32 9112B0241383FF27003C1D93 /* albums.png in Resources */ = {isa = PBXBuildFile; fileRef = 9112B01E1383FF27003C1D93 /* albums.png */; };
@@ -61,6 +59,7 @@
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 */; };
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 */; };
63 91BE401C138E8D3A00D44D68 /* RIButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 91BE401B138E8D3A00D44D68 /* RIButtonItem.m */; };61 91BE401C138E8D3A00D44D68 /* RIButtonItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 91BE401B138E8D3A00D44D68 /* RIButtonItem.m */; };
62 91E0778913ABAD6200AA7CB2 /* PlaylistSongIndex.m in Sources */ = {isa = PBXBuildFile; fileRef = 91E0778813ABAD6200AA7CB2 /* PlaylistSongIndex.m */; };
64 91E88609132DA82000618994 /* PlaylistParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 91E88608132DA82000618994 /* PlaylistParser.m */; };63 91E88609132DA82000618994 /* PlaylistParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 91E88608132DA82000618994 /* PlaylistParser.m */; };
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 */; };
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 */; };
@@ -100,7 +99,6 @@
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 */; };
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 */; };
102 93D6B54B1252CE57007880B0 /* URLQueryStringParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D6B54A1252CE57007880B0 /* URLQueryStringParser.m */; };101 93D6B54B1252CE57007880B0 /* URLQueryStringParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 93D6B54A1252CE57007880B0 /* URLQueryStringParser.m */; };
103 93DF12D9136E968E00D6C085 /* MiniHudView.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DF12D8136E968E00D6C085 /* MiniHudView.m */; };
104 93DFFE3F135D70B60061F29F /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93DFFE3E135D70B60061F29F /* CoreData.framework */; };102 93DFFE3F135D70B60061F29F /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93DFFE3E135D70B60061F29F /* CoreData.framework */; };
105 93DFFE45135D71030061F29F /* MOC.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DFFE44135D71030061F29F /* MOC.m */; };103 93DFFE45135D71030061F29F /* MOC.m in Sources */ = {isa = PBXBuildFile; fileRef = 93DFFE44135D71030061F29F /* MOC.m */; };
106 93DFFE4D135D71760061F29F /* music.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 93DFFE4C135D71760061F29F /* music.xcdatamodeld */; };104 93DFFE4D135D71760061F29F /* music.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 93DFFE4C135D71760061F29F /* music.xcdatamodeld */; };
@@ -163,7 +161,6 @@
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>"; };
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>"; };
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>"; };
166 91018B24135922BE0051EFDC /* PlaylistEditViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PlaylistEditViewController.xib; sourceTree = "<group>"; };
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>"; };
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>"; };
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>"; };
@@ -176,8 +173,6 @@
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>"; };
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>"; };
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>"; };
179 9110DC3F134E4EEF0046B8E4 /* NSMutableSet+Extras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableSet+Extras.h"; sourceTree = "<group>"; };
180 9110DC40134E4EEF0046B8E4 /* NSMutableSet+Extras.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableSet+Extras.m"; sourceTree = "<group>"; };
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>"; };
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>"; };
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; };
@@ -226,6 +221,8 @@
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>"; };
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>"; };
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>"; };
224 91E0778713ABAD6100AA7CB2 /* PlaylistSongIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaylistSongIndex.h; sourceTree = "<group>"; };
225 91E0778813ABAD6200AA7CB2 /* PlaylistSongIndex.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlaylistSongIndex.m; sourceTree = "<group>"; };
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>"; };
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>"; };
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>"; };
@@ -288,8 +285,6 @@
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>"; };
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>"; };
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>"; };
291 93DF12D7136E968E00D6C085 /* MiniHudView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MiniHudView.h; sourceTree = "<group>"; };
292 93DF12D8136E968E00D6C085 /* MiniHudView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MiniHudView.m; sourceTree = "<group>"; };
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; };
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>"; };
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>"; };
@@ -549,8 +544,6 @@
549 93D6B213124F0F62007880B0 /* NSNumber+Extras.m */,544 93D6B213124F0F62007880B0 /* NSNumber+Extras.m */,
550 93D6B2D1124FDA56007880B0 /* NSMutableArray+Extras.h */,545 93D6B2D1124FDA56007880B0 /* NSMutableArray+Extras.h */,
551 93D6B2D2124FDA56007880B0 /* NSMutableArray+Extras.m */,546 93D6B2D2124FDA56007880B0 /* NSMutableArray+Extras.m */,
552 9110DC3F134E4EEF0046B8E4 /* NSMutableSet+Extras.h */,
553 9110DC40134E4EEF0046B8E4 /* NSMutableSet+Extras.m */,
554 91018B0913573BBB0051EFDC /* UIImage+Resize.h */,547 91018B0913573BBB0051EFDC /* UIImage+Resize.h */,
555 91018B0A13573BBB0051EFDC /* UIImage+Resize.m */,548 91018B0A13573BBB0051EFDC /* UIImage+Resize.m */,
556 91018B0C13573D150051EFDC /* UIImage+Alpha.h */,549 91018B0C13573D150051EFDC /* UIImage+Alpha.h */,
@@ -593,8 +586,6 @@
593 936F230912284D1900070F43 /* NamedTextFieldCell.m */,586 936F230912284D1900070F43 /* NamedTextFieldCell.m */,
594 912D1262134A162000721EE4 /* AlertPrompt.h */,587 912D1262134A162000721EE4 /* AlertPrompt.h */,
595 912D1263134A162000721EE4 /* AlertPrompt.m */,588 912D1263134A162000721EE4 /* AlertPrompt.m */,
596 93DF12D7136E968E00D6C085 /* MiniHudView.h */,
597 93DF12D8136E968E00D6C085 /* MiniHudView.m */,
598 );589 );
599 name = Controls;590 name = Controls;
600 path = controls;591 path = controls;
@@ -607,14 +598,16 @@
607 93DFFE44135D71030061F29F /* MOC.m */,598 93DFFE44135D71030061F29F /* MOC.m */,
608 93F3344E1247FA2C006C6707 /* Album.h */,599 93F3344E1247FA2C006C6707 /* Album.h */,
609 93F3344F1247FA2C006C6707 /* Album.m */,600 93F3344F1247FA2C006C6707 /* Album.m */,
601 93F334501247FA2C006C6707 /* Artist.h */,
610 93F334511247FA2C006C6707 /* Artist.m */,602 93F334511247FA2C006C6707 /* Artist.m */,
611 93F334501247FA2C006C6707 /* Artist.h */,
612 936F208E12273D9000070F43 /* Song.h */,603 936F208E12273D9000070F43 /* Song.h */,
613 936F208F12273D9000070F43 /* Song.m */,604 936F208F12273D9000070F43 /* Song.m */,
614 936F20661227364200070F43 /* Playlist.h */,605 936F20661227364200070F43 /* Playlist.h */,
615 936F20671227364200070F43 /* Playlist.m */,606 936F20671227364200070F43 /* Playlist.m */,
616 9646DB7B13A8FF4700CB42D2 /* CachedSongsPlaylist.h */,607 9646DB7B13A8FF4700CB42D2 /* CachedSongsPlaylist.h */,
617 9646DB7C13A8FF4700CB42D2 /* CachedSongsPlaylist.m */,608 9646DB7C13A8FF4700CB42D2 /* CachedSongsPlaylist.m */,
609 91E0778713ABAD6100AA7CB2 /* PlaylistSongIndex.h */,
610 91E0778813ABAD6200AA7CB2 /* PlaylistSongIndex.m */,
618 );611 );
619 name = Models;612 name = Models;
620 path = models;613 path = models;
@@ -670,7 +663,6 @@
670 93F334641247FB02006C6707 /* SongViewController.xib */,663 93F334641247FB02006C6707 /* SongViewController.xib */,
671 93F334651247FB02006C6707 /* MainWindow.xib */,664 93F334651247FB02006C6707 /* MainWindow.xib */,
672 93F334661247FB02006C6707 /* SearchableTableViewController.xib */,665 93F334661247FB02006C6707 /* SearchableTableViewController.xib */,
673 91018B24135922BE0051EFDC /* PlaylistEditViewController.xib */,
674 );666 );
675 name = Xibs;667 name = Xibs;
676 path = xibs;668 path = xibs;
@@ -825,7 +817,6 @@
825 932E7AA01255265A00E7C8FF /* about.css in Resources */,817 932E7AA01255265A00E7C8FF /* about.css in Resources */,
826 932E7AA11255265A00E7C8FF /* about.html in Resources */,818 932E7AA11255265A00E7C8FF /* about.html in Resources */,
827 932E7B0B12552CD500E7C8FF /* arrow.png in Resources */,819 932E7B0B12552CD500E7C8FF /* arrow.png in Resources */,
828 91018B25135922BF0051EFDC /* PlaylistEditViewController.xib in Resources */,
829 9112B0241383FF27003C1D93 /* albums.png in Resources */,820 9112B0241383FF27003C1D93 /* albums.png in Resources */,
830 9112B0251383FF27003C1D93 /* artists.png in Resources */,821 9112B0251383FF27003C1D93 /* artists.png in Resources */,
831 9112B0261383FF27003C1D93 /* playlists.png in Resources */,822 9112B0261383FF27003C1D93 /* playlists.png in Resources */,
@@ -894,7 +885,6 @@
894 912D1264134A162000721EE4 /* AlertPrompt.m in Sources */,885 912D1264134A162000721EE4 /* AlertPrompt.m in Sources */,
895 912D1267134B609700721EE4 /* PlaylistEditViewController.m in Sources */,886 912D1267134B609700721EE4 /* PlaylistEditViewController.m in Sources */,
896 9110DC38134C045A0046B8E4 /* AlbumParser.m in Sources */,887 9110DC38134C045A0046B8E4 /* AlbumParser.m in Sources */,
897 9110DC41134E4EEF0046B8E4 /* NSMutableSet+Extras.m in Sources */,
898 9110DC44134EAC740046B8E4 /* AlbumListParser.m in Sources */,888 9110DC44134EAC740046B8E4 /* AlbumListParser.m in Sources */,
899 9110DC571354A7490046B8E4 /* AlbumArtistUITableViewCell.m in Sources */,889 9110DC571354A7490046B8E4 /* AlbumArtistUITableViewCell.m in Sources */,
900 91018B0B13573BBB0051EFDC /* UIImage+Resize.m in Sources */,890 91018B0B13573BBB0051EFDC /* UIImage+Resize.m in Sources */,
@@ -909,7 +899,6 @@
909 93DFFE45135D71030061F29F /* MOC.m in Sources */,899 93DFFE45135D71030061F29F /* MOC.m in Sources */,
910 93DFFE4D135D71760061F29F /* music.xcdatamodeld in Sources */,900 93DFFE4D135D71760061F29F /* music.xcdatamodeld in Sources */,
911 93DFFE54135D72420061F29F /* NSManagedObjectContext+Additions.m in Sources */,901 93DFFE54135D72420061F29F /* NSManagedObjectContext+Additions.m in Sources */,
912 93DF12D9136E968E00D6C085 /* MiniHudView.m in Sources */,
913 937FAA11137CFC1B00507E51 /* AlbumArtLoader.m in Sources */,902 937FAA11137CFC1B00507E51 /* AlbumArtLoader.m in Sources */,
914 937FAA12137CFC1B00507E51 /* AlbumArtLoadingOperation.m in Sources */,903 937FAA12137CFC1B00507E51 /* AlbumArtLoadingOperation.m in Sources */,
915 937FAA15137CFC5000507E51 /* Downloader.m in Sources */,904 937FAA15137CFC5000507E51 /* Downloader.m in Sources */,
@@ -923,6 +912,7 @@
923 9674C2C513A7DC01004509E4 /* UORadialProgressControl.m in Sources */,912 9674C2C513A7DC01004509E4 /* UORadialProgressControl.m in Sources */,
924 9646DB7D13A8FF4700CB42D2 /* CachedSongsPlaylist.m in Sources */,913 9646DB7D13A8FF4700CB42D2 /* CachedSongsPlaylist.m in Sources */,
925 96FB790A13AA628700D8D4A4 /* UONetworkStatusCoordinator.m in Sources */,914 96FB790A13AA628700D8D4A4 /* UONetworkStatusCoordinator.m in Sources */,
915 91E0778913ABAD6200AA7CB2 /* PlaylistSongIndex.m in Sources */,
926 );916 );
927 runOnlyForDeploymentPostprocessing = 0;917 runOnlyForDeploymentPostprocessing = 0;
928 };918 };
929919
=== modified file 'musicstreaming/models/Album.m'
--- musicstreaming/models/Album.m 2011-06-14 17:06:21 +0000
+++ musicstreaming/models/Album.m 2011-06-21 18:28:35 +0000
@@ -30,7 +30,7 @@
3030
31#import "Album.h"31#import "Album.h"
32#import "Artist.h"32#import "Artist.h"
33#import "NSMutableSet+Extras.h"33#import "NSMutableArray+Extras.h"
34#import "NSString+Extras.h"34#import "NSString+Extras.h"
35#import "AlbumParser.h"35#import "AlbumParser.h"
36#import "Subsonic.h"36#import "Subsonic.h"
@@ -83,7 +83,7 @@
83 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];83 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
84 NSError *error = nil;84 NSError *error = nil;
85 85
86 NSMutableSet *parameters = [NSMutableSet set];86 NSMutableArray *parameters = [NSMutableArray array];
87 [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.albumId, nil]];87 [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.albumId, nil]];
88 NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getAlbum.view" parameters:parameters];88 NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getAlbum.view" parameters:parameters];
89 NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];89 NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
9090
=== modified file 'musicstreaming/models/Artist.m'
--- musicstreaming/models/Artist.m 2011-06-14 17:06:21 +0000
+++ musicstreaming/models/Artist.m 2011-06-21 18:28:35 +0000
@@ -31,7 +31,7 @@
31#import "Artist.h"31#import "Artist.h"
32#import "Album.h"32#import "Album.h"
33#import "Subsonic.h"33#import "Subsonic.h"
34#import "NSMutableSet+Extras.h"34#import "NSMutableArray+Extras.h"
35#import "NSString+Extras.h"35#import "NSString+Extras.h"
36#import "ArtistParser.h"36#import "ArtistParser.h"
3737
@@ -99,7 +99,7 @@
99 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];99 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
100 NSError *error = nil;100 NSError *error = nil;
101 101
102 NSMutableSet *parameters = [NSMutableSet set];102 NSMutableArray *parameters = [NSMutableArray array];
103 [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.artistId, nil]];103 [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.artistId, nil]];
104 NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getMusicDirectory.view" parameters:parameters];104 NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getMusicDirectory.view" parameters:parameters];
105 NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];105 NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
106106
=== modified file 'musicstreaming/models/Playlist.h'
--- musicstreaming/models/Playlist.h 2011-06-15 16:49:27 +0000
+++ musicstreaming/models/Playlist.h 2011-06-21 18:28:35 +0000
@@ -19,26 +19,29 @@
1919
20#import <Foundation/Foundation.h>20#import <Foundation/Foundation.h>
2121
22@class Song;22@class Song, PlaylistSongIndex;
2323
24@interface Playlist : NSManagedObject24@interface Playlist : NSManagedObject
25{25{
26}26}
27@property(nonatomic,retain) NSString *name;
27@property(nonatomic,retain) NSString *playlistId;28@property(nonatomic,retain) NSString *playlistId;
28@property(nonatomic,retain) NSString *name;29@property(nonatomic,retain) NSSet *playlistSongIndexes;
29@property(nonatomic,retain) NSSet *songs;30@property(nonatomic,readonly) NSArray *songs;
3031
31+ (BOOL)playlistWithIdExists:(NSString*)aPlaylistId;32+ (BOOL)playlistWithNameExists:(NSString*)aPlaylistName;
32+ (Playlist*)playlistWithId:(NSString*)aPlaylistId;33+ (Playlist*)playlistWithName:(NSString*)aPlaylistName;
33- (BOOL)matchesSearchQuery:(NSString *)query;34- (BOOL)matchesSearchQuery:(NSString *)query;
34- (NSError*)loadSongs;35- (NSError*)loadSongs;
35- (BOOL)isEditable;36- (BOOL)isEditable;
37- (void)addSong:(Song *)song;
38- (void)removeSong:(Song *)song;
36@end39@end
3740
38// coalesce these into one @interface Album (CoreDataGeneratedAccessors) section41// coalesce these into one @interface Album (CoreDataGeneratedAccessors) section
39@interface Playlist (CoreDataGeneratedAccessors)42@interface Playlist (CoreDataGeneratedAccessors)
40- (void)addSongsObject:(Song *)value;43- (void)addPlaylistSongIndexesObject:(PlaylistSongIndex *)value;
41- (void)removeSongsObject:(Song *)value;44- (void)removePlaylistSongIndexesObject:(PlaylistSongIndex *)value;
42- (void)addSongs:(NSSet *)value;45- (void)addPlaylistSongIndexes:(NSSet *)value;
43- (void)removeSongs:(NSSet *)value;46- (void)removePlaylistSongIndexes:(NSSet *)value;
44@end47@end
4548
=== modified file 'musicstreaming/models/Playlist.m'
--- musicstreaming/models/Playlist.m 2011-06-15 16:49:27 +0000
+++ musicstreaming/models/Playlist.m 2011-06-21 18:28:35 +0000
@@ -19,25 +19,27 @@
1919
20#import "Playlist.h"20#import "Playlist.h"
21#import "Subsonic.h"21#import "Subsonic.h"
22#import "NSMutableSet+Extras.h"22#import "NSMutableArray+Extras.h"
23#import "PlaylistParser.h"23#import "PlaylistParser.h"
24#import "PlaylistSongIndex.h"
25#import "Song.h"
2426
25@implementation Playlist27@implementation Playlist
2628
27@dynamic playlistId, name, songs;29@dynamic playlistId, name, playlistSongIndexes;
2830
29+ (BOOL)playlistWithIdExists:(NSString *)aPlaylistId31+ (BOOL)playlistWithNameExists:(NSString *)aPlaylistName
30{32{
31 return (nil != [Playlist playlistWithId:aPlaylistId]);33 return (nil != [Playlist playlistWithName:aPlaylistName]);
32}34}
3335
34+ (Playlist *)playlistWithId:(NSString *)aPlaylistId36+ (Playlist *)playlistWithName:(NSString *)aPlaylistName
35{37{
36 NSFetchRequest * fetch = [[NSFetchRequest alloc] init];38 NSFetchRequest * fetch = [[NSFetchRequest alloc] init];
37 NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()];39 NSEntityDescription *entityDescription = [NSEntityDescription entityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()];
38 [fetch setEntity:entityDescription];40 [fetch setEntity:entityDescription];
39 41
40 NSPredicate *predicate = [NSPredicate predicateWithFormat:@"playlistId == %@", aPlaylistId];42 NSPredicate *predicate = [NSPredicate predicateWithFormat:@"name == %@", aPlaylistName];
41 [fetch setPredicate:predicate];43 [fetch setPredicate:predicate];
42 44
43 NSError * error = nil;45 NSError * error = nil;
@@ -59,7 +61,7 @@
59 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];61 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
60 NSError *error = nil;62 NSError *error = nil;
61 63
62 NSMutableSet *parameters = [NSMutableSet set];64 NSMutableArray *parameters = [NSMutableArray array];
63 [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.playlistId, nil]];65 [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.playlistId, nil]];
64 NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getPlaylist.view" parameters:parameters];66 NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"getPlaylist.view" parameters:parameters];
65 NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];67 NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithContentsOfURL:url];
@@ -81,6 +83,40 @@
81 return [error autorelease];83 return [error autorelease];
82}84}
8385
86- (NSArray *)songs
87{
88 // return playlistSongIndexes sorted by index
89 NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"index" ascending:YES];
90 NSArray *results = [[self.playlistSongIndexes sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]] valueForKey:@"songEntity"];
91 return results;
92}
93
94// Do the crazy PlaylistSongIndex lookup/clobber dance inside these methods
95- (void)addSong:(Song *)song
96{
97 PlaylistSongIndex *playlistSongIndex = [NSEntityDescription insertNewObjectForEntityForName:@"PlaylistSongIndex" inManagedObjectContext:PerThreadManagedObjectContext()];
98 playlistSongIndex.playlistEntity = self;
99 playlistSongIndex.songEntity = song;
100 playlistSongIndex.index = [NSNumber numberWithUnsignedInt:[self.playlistSongIndexes count]];
101 SaveContext();
102}
103
104- (void)removeSong:(Song *)song
105{
106 // Look up (potentially) all records where playlistEntity is self, and songEntity is song, and blow them away
107 NSSet *condemned = [self.playlistSongIndexes filteredSetUsingPredicate:[NSPredicate predicateWithFormat:@"songEntity = %@", song]];
108 for (PlaylistSongIndex *playlistSongIndex in condemned)
109 {
110 [PerThreadManagedObjectContext() deleteObject:playlistSongIndex];
111 }
112 SaveContext();
113
114 [[self.playlistSongIndexes sortedArrayUsingDescriptors:[NSArray arrayWithObject:[NSSortDescriptor sortDescriptorWithKey:@"index" ascending:YES]]] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
115 ((PlaylistSongIndex *)obj).index = [NSNumber numberWithUnsignedInt:idx];
116 }];
117 SaveContext();
118}
119
84- (NSString*)description120- (NSString*)description
85{121{
86 return [NSString stringWithFormat:@"%@ (%@) MOC %@", self.name, self.playlistId, [self managedObjectContext]];122 return [NSString stringWithFormat:@"%@ (%@) MOC %@", self.name, self.playlistId, [self managedObjectContext]];
87123
=== added file 'musicstreaming/models/PlaylistSongIndex.h'
--- musicstreaming/models/PlaylistSongIndex.h 1970-01-01 00:00:00 +0000
+++ musicstreaming/models/PlaylistSongIndex.h 2011-06-21 18:28:35 +0000
@@ -0,0 +1,32 @@
1//
2// PlaylistSongIndex.h
3// iSub
4//
5// Created by Zachery Bir on 6/17/11.
6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20#import <Foundation/Foundation.h>
21
22@class Playlist, Song;
23
24@interface PlaylistSongIndex : NSManagedObject {
25@private
26
27}
28@property (nonatomic, retain) NSNumber *index;
29
30@property (nonatomic, retain) Playlist *playlistEntity;
31@property (nonatomic, retain) Song *songEntity;
32@end
033
=== added file 'musicstreaming/models/PlaylistSongIndex.m'
--- musicstreaming/models/PlaylistSongIndex.m 1970-01-01 00:00:00 +0000
+++ musicstreaming/models/PlaylistSongIndex.m 2011-06-21 18:28:35 +0000
@@ -0,0 +1,27 @@
1//
2// PlaylistSongIndex.m
3// iSub
4//
5// Created by Zachery Bir on 6/17/11.
6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20#import "PlaylistSongIndex.h"
21
22
23@implementation PlaylistSongIndex
24
25@dynamic index, playlistEntity, songEntity;
26
27@end
028
=== modified file 'musicstreaming/models/Song.h'
--- musicstreaming/models/Song.h 2011-06-13 19:00:38 +0000
+++ musicstreaming/models/Song.h 2011-06-21 18:28:35 +0000
@@ -28,7 +28,7 @@
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
29// DAMAGE.29// DAMAGE.
3030
31@class Artist, Album, Playlist;31@class Artist, Album, PlaylistSongIndex;
3232
33@interface Song : NSManagedObject33@interface Song : NSManagedObject
34{34{
@@ -43,11 +43,12 @@
43@property (nonatomic, retain) NSNumber *duration;43@property (nonatomic, retain) NSNumber *duration;
44@property (nonatomic, retain) NSNumber *bitRate;44@property (nonatomic, retain) NSNumber *bitRate;
45@property (nonatomic, retain) NSNumber *track;45@property (nonatomic, retain) NSNumber *track;
46@property (nonatomic, retain) NSNumber *discNumber;
46@property (nonatomic, retain) NSNumber *year;47@property (nonatomic, retain) NSNumber *year;
47@property (nonatomic, retain) NSNumber *size;48@property (nonatomic, retain) NSNumber *size;
48@property (nonatomic, retain) Artist *artistEntity;49@property (nonatomic, retain) Artist *artistEntity;
49@property (nonatomic, retain) Album *albumEntity;50@property (nonatomic, retain) Album *albumEntity;
50@property (nonatomic, retain) NSSet *playlistEntities;51@property (nonatomic, retain) NSSet *playlistSongIndexes;
51@property (nonatomic, retain) NSString *cachedSongPath;52@property (nonatomic, retain) NSString *cachedSongPath;
5253
53+ (BOOL)songWithIdExists:(NSString*)aSongId;54+ (BOOL)songWithIdExists:(NSString*)aSongId;
@@ -59,8 +60,8 @@
59@end60@end
6061
61@interface Song (CoreDataGeneratedAccessors)62@interface Song (CoreDataGeneratedAccessors)
62- (void)addPlaylistEntitiesObject:(Playlist *)value;63- (void)addPlaylistSongIndexesObject:(PlaylistSongIndex *)value;
63- (void)removePlaylistEntitiesObject:(Playlist *)value;64- (void)removePlaylistSongIndexesObject:(PlaylistSongIndex *)value;
64- (void)addPlaylistEntities:(NSSet *)value;65- (void)addPlaylistSongIndexes:(NSSet *)value;
65- (void)removePlaylistEntities:(NSSet *)value;66- (void)removePlaylistSongIndexes:(NSSet *)value;
66@end67@end
6768
=== modified file 'musicstreaming/models/Song.m'
--- musicstreaming/models/Song.m 2011-06-14 17:06:21 +0000
+++ musicstreaming/models/Song.m 2011-06-21 18:28:35 +0000
@@ -34,8 +34,8 @@
34#import "NSString+Extras.h"34#import "NSString+Extras.h"
3535
36@implementation Song36@implementation Song
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;
38@dynamic artistEntity, albumEntity, playlistEntities, cachedSongPath;38@dynamic artistEntity, albumEntity, playlistSongIndexes, cachedSongPath;
3939
40+ (BOOL)songWithIdExists:(NSString*)aSongId40+ (BOOL)songWithIdExists:(NSString*)aSongId
41{41{
@@ -77,7 +77,13 @@
7777
78- (NSComparisonResult)compare:(Song*)s78- (NSComparisonResult)compare:(Song*)s
79{79{
80 return [self.track compare:s.track];80 NSUInteger selfPathArray[] = {[self.discNumber integerValue], [self.track integerValue]};
81 NSUInteger otherPathArray[] = {[s.discNumber integerValue], [s.track integerValue]};
82
83 NSIndexPath *selfPath = [NSIndexPath indexPathWithIndexes:selfPathArray length:2];
84 NSIndexPath *otherPath = [NSIndexPath indexPathWithIndexes:otherPathArray length:2];
85
86 return [selfPath compare:otherPath];
81}87}
8288
83- (NSString*)description89- (NSString*)description
8490
=== modified file 'musicstreaming/music.xcdatamodeld/music.xcdatamodel/elements'
85Binary 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 differ91Binary 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
=== modified file 'musicstreaming/music.xcdatamodeld/music.xcdatamodel/layout'
86Binary 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 differ92Binary 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
=== modified file 'musicstreaming/utilities/AlbumParser.m'
--- musicstreaming/utilities/AlbumParser.m 2011-06-14 17:06:21 +0000
+++ musicstreaming/utilities/AlbumParser.m 2011-06-21 18:28:35 +0000
@@ -71,6 +71,7 @@
71 song.duration = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"duration"]];71 song.duration = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"duration"]];
72 song.bitRate = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"bitRate"]];72 song.bitRate = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"bitRate"]];
73 song.track = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"track"]];73 song.track = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"track"]];
74 song.discNumber = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"disc_number"]];
74 song.year = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"year"]];75 song.year = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"year"]];
75 song.size = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"size"]];76 song.size = [numberFormatter numberFromString:[attributeDict nilifiedValueForKey:@"size"]];
76 77
7778
=== modified file 'musicstreaming/utilities/Globals.h'
--- musicstreaming/utilities/Globals.h 2011-06-07 09:20:03 +0000
+++ musicstreaming/utilities/Globals.h 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/13/11.5// Created by Aaron Brethorst on 5/13/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import <Foundation/Foundation.h>20#import <Foundation/Foundation.h>
1021
1122
=== modified file 'musicstreaming/utilities/Globals.m'
--- musicstreaming/utilities/Globals.m 2011-06-07 09:20:03 +0000
+++ musicstreaming/utilities/Globals.m 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/13/11.5// Created by Aaron Brethorst on 5/13/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import "Globals.h"20#import "Globals.h"
1021
1122
=== modified file 'musicstreaming/utilities/PlaylistListParser.m'
--- musicstreaming/utilities/PlaylistListParser.m 2011-05-27 18:23:44 +0000
+++ musicstreaming/utilities/PlaylistListParser.m 2011-06-21 18:28:35 +0000
@@ -37,15 +37,21 @@
37 }37 }
38 else if ([elementName isEqualToString:@"playlist"]) 38 else if ([elementName isEqualToString:@"playlist"])
39 {39 {
40 if (![Playlist playlistWithIdExists:[attributeDict objectForKey:@"id"]] && ![[attributeDict objectForKey:@"title"] isEqual:@".AppleDouble"])40 Playlist *playlist = nil;
41 {41
42 Playlist *playlist = [NSEntityDescription insertNewObjectForEntityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()];42 if (![Playlist playlistWithNameExists:[attributeDict objectForKey:@"name"]] && ![[attributeDict objectForKey:@"title"] isEqual:@".AppleDouble"])
43 43 {
44 playlist.name = [attributeDict objectForKey:@"name"];44 playlist = [NSEntityDescription insertNewObjectForEntityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()];
45 playlist.playlistId = [attributeDict objectForKey:@"id"];45 }
46 46 else
47 SaveContext();47 {
48 }48 playlist = [Playlist playlistWithName:[attributeDict objectForKey:@"name"]];
49 }
50
51 playlist.name = [attributeDict objectForKey:@"name"];
52 playlist.playlistId = [attributeDict objectForKey:@"id"];
53
54 SaveContext();
49 }55 }
50}56}
5157
5258
=== modified file 'musicstreaming/utilities/PlaylistParser.h'
--- musicstreaming/utilities/PlaylistParser.h 2011-05-27 18:23:44 +0000
+++ musicstreaming/utilities/PlaylistParser.h 2011-06-21 18:28:35 +0000
@@ -24,9 +24,9 @@
24@interface PlaylistParser : NSObject <NSXMLParserDelegate>24@interface PlaylistParser : NSObject <NSXMLParserDelegate>
25{25{
26 Playlist *playlist;26 Playlist *playlist;
27 NSMutableArray *songs;27 NSMutableSet *songs;
28 NSNumberFormatter *numberFormatter;28 NSNumberFormatter *numberFormatter;
29}29}
30@property(nonatomic,retain) NSManagedObjectID *playlistObjectId;30@property(nonatomic,retain) NSManagedObjectID *playlistObjectId;
31@property(nonatomic,retain) NSMutableArray *songs;31@property(nonatomic,retain) NSMutableSet *songs;
32@end32@end
3333
=== modified file 'musicstreaming/utilities/PlaylistParser.m'
--- musicstreaming/utilities/PlaylistParser.m 2011-05-27 18:23:44 +0000
+++ musicstreaming/utilities/PlaylistParser.m 2011-06-21 18:28:35 +0000
@@ -20,6 +20,7 @@
20#import "PlaylistParser.h"20#import "PlaylistParser.h"
21#import "Playlist.h"21#import "Playlist.h"
22#import "Song.h"22#import "Song.h"
23#import "PlaylistSongIndex.h"
23#import "NSDictionary+Extras.h"24#import "NSDictionary+Extras.h"
2425
25@implementation PlaylistParser26@implementation PlaylistParser
@@ -30,7 +31,7 @@
30{31{
31 if ((self = [super init]))32 if ((self = [super init]))
32 {33 {
33 songs = [[NSMutableArray alloc] init];34 songs = [[NSMutableSet alloc] init];
34 numberFormatter = [[NSNumberFormatter alloc] init];35 numberFormatter = [[NSNumberFormatter alloc] init];
35 } 36 }
36 return self;37 return self;
@@ -76,11 +77,14 @@
76 77
77 }78 }
7879
79 // do something with the order of songs.80 PlaylistSongIndex *playlistSongIndex = [NSEntityDescription insertNewObjectForEntityForName:@"PlaylistSongIndex" inManagedObjectContext:PerThreadManagedObjectContext()];
80 [song addPlaylistEntitiesObject:playlist];81 playlistSongIndex.playlistEntity = playlist;
81 [playlist addSongsObject:song]; 82 playlistSongIndex.songEntity = song;
82 SaveContext();83 playlistSongIndex.index = [NSNumber numberWithUnsignedInt:[songs count]];
84 [songs addObject:playlistSongIndex];
83 }85 }
86 playlist.playlistSongIndexes = songs;
87 SaveContext();
84}88}
8589
86- (void) dealloc 90- (void) dealloc
8791
=== modified file 'musicstreaming/utilities/Subsonic.h'
--- musicstreaming/utilities/Subsonic.h 2011-06-14 17:06:21 +0000
+++ musicstreaming/utilities/Subsonic.h 2011-06-21 18:28:35 +0000
@@ -42,7 +42,7 @@
42+ (Subsonic *)sharedSubsonic;42+ (Subsonic *)sharedSubsonic;
43- (NSURL *)getCredsURL;43- (NSURL *)getCredsURL;
44- (NSURL *)getBaseURL:(NSString *)action;44- (NSURL *)getBaseURL:(NSString *)action;
45- (NSURL *)getBaseURL:(NSString *)action parameters:(NSSet*)extraParameters;45- (NSURL *)getBaseURL:(NSString *)action parameters:(NSArray*)extraParameters;
46- (NSURL *)getStreamingURLForSongId:(NSString*)songId;46- (NSURL *)getStreamingURLForSongId:(NSString*)songId;
47- (void)removeCredentials;47- (void)removeCredentials;
48- (void)storeUsername:(NSString*)username password:(NSString*)password;48- (void)storeUsername:(NSString*)username password:(NSString*)password;
4949
=== modified file 'musicstreaming/utilities/Subsonic.m'
--- musicstreaming/utilities/Subsonic.m 2011-06-14 17:06:21 +0000
+++ musicstreaming/utilities/Subsonic.m 2011-06-21 18:28:35 +0000
@@ -22,7 +22,7 @@
22#include <netinet/in.h> 22#include <netinet/in.h>
23#include <netdb.h>23#include <netdb.h>
24#include <arpa/inet.h>24#include <arpa/inet.h>
25#import "NSMutableSet+Extras.h"25#import "NSMutableArray+Extras.h"
26#import "Reachability.h"26#import "Reachability.h"
2727
28@interface Subsonic ()28@interface Subsonic ()
@@ -42,9 +42,7 @@
42 if ((self = [super init]))42 if ((self = [super init]))
43 {43 {
44 self.defaultURL = @"https://streaming.one.ubuntu.com/rest";44 self.defaultURL = @"https://streaming.one.ubuntu.com/rest";
45// self.defaultURL = @"http://10.59.1.19:35204/musicstreaming/rest";
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";
47// self.credsURL = @"http://10.59.1.19:41858/phones/creds/ios?scheme=x-ubuntuone-music";
48 self.reachability = [Reachability reachabilityWithHostName:[[NSURL URLWithString:self.defaultURL] host]];46 self.reachability = [Reachability reachabilityWithHostName:[[NSURL URLWithString:self.defaultURL] host]];
49 [self.reachability startNotifer];47 [self.reachability startNotifer];
50 }48 }
@@ -98,7 +96,7 @@
9896
99- (NSURL *)getStreamingURLForSongId:(NSString*)songId97- (NSURL *)getStreamingURLForSongId:(NSString*)songId
100{98{
101 NSMutableSet *parameters = [NSMutableSet set];99 NSMutableArray *parameters = [NSMutableArray array];
102 [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", songId, nil]];100 [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", songId, nil]];
103 return [self getBaseURL:@"stream.view" parameters:parameters];101 return [self getBaseURL:@"stream.view" parameters:parameters];
104}102}
@@ -113,11 +111,11 @@
113 return [self getBaseURL:action parameters:nil];111 return [self getBaseURL:action parameters:nil];
114}112}
115113
116- (NSURL *)getBaseURL:(NSString *)action parameters:(NSSet*)extraParameters114- (NSURL *)getBaseURL:(NSString *)action parameters:(NSArray*)extraParameters
117{115{
118 if (self.defaultUserName && self.defaultPassword)116 if (self.defaultUserName && self.defaultPassword)
119 {117 {
120 NSMutableSet *params = [NSMutableSet setWithSet:extraParameters];118 NSMutableArray *params = [NSMutableArray arrayWithArray:extraParameters];
121 119
122 [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"u", self.defaultUserName, nil]];120 [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"u", self.defaultUserName, nil]];
123 [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"p", self.defaultPassword, nil]];121 [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"p", self.defaultPassword, nil]];
@@ -125,7 +123,6 @@
125 [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"c", @"iSub", nil]];123 [params addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"c", @"iSub", nil]];
126 124
127 NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@?%@", self.defaultURL, action, [params urlEncodedString]]];125 NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@?%@", self.defaultURL, action, [params urlEncodedString]]];
128 NSLog(@"URL generated: %@", url);
129 return url;126 return url;
130 }127 }
131 else128 else
132129
=== modified file 'musicstreaming/utilities/operations/AbstractNetworkOperation.h'
--- musicstreaming/utilities/operations/AbstractNetworkOperation.h 2011-05-13 05:54:19 +0000
+++ musicstreaming/utilities/operations/AbstractNetworkOperation.h 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/12/11.5// Created by Aaron Brethorst on 5/12/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import <Foundation/Foundation.h>20#import <Foundation/Foundation.h>
1021
1122
=== modified file 'musicstreaming/utilities/operations/AbstractNetworkOperation.m'
--- musicstreaming/utilities/operations/AbstractNetworkOperation.m 2011-06-16 16:52:07 +0000
+++ musicstreaming/utilities/operations/AbstractNetworkOperation.m 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/12/11.5// Created by Aaron Brethorst on 5/12/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import "AbstractNetworkOperation.h"20#import "AbstractNetworkOperation.h"
1021
1122
=== modified file 'musicstreaming/utilities/operations/AlbumArtLoader.h'
--- musicstreaming/utilities/operations/AlbumArtLoader.h 2011-05-27 18:20:22 +0000
+++ musicstreaming/utilities/operations/AlbumArtLoader.h 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/4/11.5// Created by Aaron Brethorst on 5/4/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import <UIKit/UIKit.h>20#import <UIKit/UIKit.h>
10#import "AlbumArtLoadingOperation.h"21#import "AlbumArtLoadingOperation.h"
1122
=== modified file 'musicstreaming/utilities/operations/AlbumArtLoader.m'
--- musicstreaming/utilities/operations/AlbumArtLoader.m 2011-06-07 09:20:03 +0000
+++ musicstreaming/utilities/operations/AlbumArtLoader.m 2011-06-21 18:28:35 +0000
@@ -3,12 +3,23 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/4/11.5// Created by Aaron Brethorst on 5/4/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import "AlbumArtLoader.h"20#import "AlbumArtLoader.h"
10#import "Subsonic.h"21#import "Subsonic.h"
11#import "NSMutableSet+Extras.h"22#import "NSMutableArray+Extras.h"
12#import "UIImage+Resize.h"23#import "UIImage+Resize.h"
1324
14@interface AlbumArtLoader ()25@interface AlbumArtLoader ()
@@ -117,7 +128,7 @@
117128
118- (NSString*)URLFromCoverArtID:(NSString*)artID129- (NSString*)URLFromCoverArtID:(NSString*)artID
119{130{
120 NSMutableSet *parameters = [NSMutableSet set];131 NSMutableArray *parameters = [NSMutableArray array];
121 [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", artID, nil]];132 [parameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", artID, nil]];
122133
123 // Always get the largest we can handle134 // Always get the largest we can handle
124135
=== modified file 'musicstreaming/utilities/operations/AlbumArtLoadingOperation.h'
--- musicstreaming/utilities/operations/AlbumArtLoadingOperation.h 2011-05-27 18:20:22 +0000
+++ musicstreaming/utilities/operations/AlbumArtLoadingOperation.h 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/4/11.5// Created by Aaron Brethorst on 5/4/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import <UIKit/UIKit.h>20#import <UIKit/UIKit.h>
10#import "AbstractNetworkOperation.h"21#import "AbstractNetworkOperation.h"
1122
=== modified file 'musicstreaming/utilities/operations/AlbumArtLoadingOperation.m'
--- musicstreaming/utilities/operations/AlbumArtLoadingOperation.m 2011-06-07 09:20:03 +0000
+++ musicstreaming/utilities/operations/AlbumArtLoadingOperation.m 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/4/11.5// Created by Aaron Brethorst on 5/4/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
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/
1021
1122
=== modified file 'musicstreaming/utilities/operations/DownloadOperation.h'
--- musicstreaming/utilities/operations/DownloadOperation.h 2011-05-13 06:58:25 +0000
+++ musicstreaming/utilities/operations/DownloadOperation.h 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/12/11.5// Created by Aaron Brethorst on 5/12/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import <UIKit/UIKit.h>20#import <UIKit/UIKit.h>
10#import "AbstractNetworkOperation.h"21#import "AbstractNetworkOperation.h"
1122
=== modified file 'musicstreaming/utilities/operations/DownloadOperation.m'
--- musicstreaming/utilities/operations/DownloadOperation.m 2011-05-13 06:58:25 +0000
+++ musicstreaming/utilities/operations/DownloadOperation.m 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/12/11.5// Created by Aaron Brethorst on 5/12/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import "DownloadOperation.h"20#import "DownloadOperation.h"
1021
1122
=== modified file 'musicstreaming/utilities/operations/Downloader.h'
--- musicstreaming/utilities/operations/Downloader.h 2011-06-13 19:00:38 +0000
+++ musicstreaming/utilities/operations/Downloader.h 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/12/11.5// Created by Aaron Brethorst on 5/12/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import <UIKit/UIKit.h>20#import <UIKit/UIKit.h>
10#import "DownloadOperation.h"21#import "DownloadOperation.h"
1122
=== modified file 'musicstreaming/utilities/operations/Downloader.m'
--- musicstreaming/utilities/operations/Downloader.m 2011-06-14 17:20:13 +0000
+++ musicstreaming/utilities/operations/Downloader.m 2011-06-21 18:28:35 +0000
@@ -3,8 +3,19 @@
3// iSub3// iSub
4//4//
5// Created by Aaron Brethorst on 5/12/11.5// Created by Aaron Brethorst on 5/12/11.
6// Copyright 2011 Canonical. All rights reserved.6// Copyright 2011 Canonical Ltd.
7//
8// This program is free software: you can redistribute it and/or modify it
9// under the terms of the GNU Affero General Public License version 3,
10// as published by the Free Software Foundation.
11//
12// This program is distributed in the hope that it will be useful, but
13// WITHOUT ANY WARRANTY; without even the implied warranties of
14// MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15// PURPOSE. See the GNU Affero General Public License for more details.
7//16//
17// You should have received a copy of the GNU Affero General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
819
9#import "Downloader.h"20#import "Downloader.h"
10#import "DownloadOperation.h"21#import "DownloadOperation.h"
1122
=== modified file 'musicstreaming/view_controllers/ArtistViewController.m'
--- musicstreaming/view_controllers/ArtistViewController.m 2011-06-16 19:12:54 +0000
+++ musicstreaming/view_controllers/ArtistViewController.m 2011-06-21 18:28:35 +0000
@@ -120,7 +120,6 @@
120- (void)finishLoadingData120- (void)finishLoadingData
121{121{
122 [self.tableView reloadData];122 [self.tableView reloadData];
123 [self hideLoadingUI];
124 [super finishLoadingData];123 [super finishLoadingData];
125}124}
126125
127126
=== modified file 'musicstreaming/view_controllers/PlaylistEditAlbumViewController.m'
--- musicstreaming/view_controllers/PlaylistEditAlbumViewController.m 2011-05-27 18:37:16 +0000
+++ musicstreaming/view_controllers/PlaylistEditAlbumViewController.m 2011-06-21 18:28:35 +0000
@@ -87,11 +87,11 @@
87 UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];87 UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
8888
89 if (cell.accessoryType == UITableViewCellAccessoryNone) {89 if (cell.accessoryType == UITableViewCellAccessoryNone) {
90 [self.originator.playlist addSongsObject:selection];90 [self.originator.playlist addSong:selection];
91 cell.accessoryType = UITableViewCellAccessoryCheckmark;91 cell.accessoryType = UITableViewCellAccessoryCheckmark;
9292
93 } else {93 } else {
94 [self.originator.playlist removeSongsObject:selection];94 [self.originator.playlist removeSong:selection];
95 cell.accessoryType = UITableViewCellAccessoryNone;95 cell.accessoryType = UITableViewCellAccessoryNone;
96 }96 }
9797
9898
=== modified file 'musicstreaming/view_controllers/PlaylistEditSongListViewController.m'
--- musicstreaming/view_controllers/PlaylistEditSongListViewController.m 2011-05-27 18:37:16 +0000
+++ musicstreaming/view_controllers/PlaylistEditSongListViewController.m 2011-06-21 18:28:35 +0000
@@ -19,6 +19,7 @@
1919
20#import "PlaylistEditSongListViewController.h"20#import "PlaylistEditSongListViewController.h"
21#import "PlaylistEditViewController.h"21#import "PlaylistEditViewController.h"
22#import "PlaylistSongIndex.h"
22#import "Playlist.h"23#import "Playlist.h"
23#import "Song.h"24#import "Song.h"
2425
@@ -104,11 +105,12 @@
104 UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];105 UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
105106
106 if (cell.accessoryType == UITableViewCellAccessoryNone) {107 if (cell.accessoryType == UITableViewCellAccessoryNone) {
107 [self.originator.playlist addSongsObject:selection];108 [self.originator.playlist addSong:selection];
108 cell.accessoryType = UITableViewCellAccessoryCheckmark;109 cell.accessoryType = UITableViewCellAccessoryCheckmark;
109110
110 } else {111 } else {
111 [self.originator.playlist removeSongsObject:selection];112
113 [self.originator.playlist removeSong:selection];
112 cell.accessoryType = UITableViewCellAccessoryNone;114 cell.accessoryType = UITableViewCellAccessoryNone;
113 }115 }
114116
115117
=== modified file 'musicstreaming/view_controllers/PlaylistEditViewController.h'
--- musicstreaming/view_controllers/PlaylistEditViewController.h 2011-04-19 01:55:39 +0000
+++ musicstreaming/view_controllers/PlaylistEditViewController.h 2011-06-21 18:28:35 +0000
@@ -22,16 +22,14 @@
22@class Playlist;22@class Playlist;
23@class SubsonicTableViewController;23@class SubsonicTableViewController;
2424
25@interface PlaylistEditViewController : UIViewController <UITabBarControllerDelegate>25@interface PlaylistEditViewController : UITabBarController
26{26{
27 Playlist *playlist;27 Playlist *playlist;
28 SubsonicTableViewController *originator;28 SubsonicTableViewController *originator;
29 UITabBarController *tabBarController;
30}29}
31+ (UINavigationController *)navigableViewControllerWithPlaylist:(Playlist *)playlist originator:(SubsonicTableViewController *)originator;30+ (PlaylistEditViewController *)playlistEditViewControllerWithPlaylist:(Playlist *)playlist originator:(SubsonicTableViewController *)originator;
32- (id)initWithPlaylist:(Playlist *)aPlaylist;31- (id)initWithPlaylist:(Playlist *)aPlaylist;
33- (void)finish:(id)sender;32- (void)finish:(id)sender;
34@property(nonatomic,retain) Playlist *playlist;33@property(nonatomic,retain) Playlist *playlist;
35@property(nonatomic,retain) SubsonicTableViewController *originator;34@property(nonatomic,retain) SubsonicTableViewController *originator;
36@property(nonatomic,retain) IBOutlet UITabBarController *tabBarController;
37@end35@end
3836
=== modified file 'musicstreaming/view_controllers/PlaylistEditViewController.m'
--- musicstreaming/view_controllers/PlaylistEditViewController.m 2011-05-27 18:37:16 +0000
+++ musicstreaming/view_controllers/PlaylistEditViewController.m 2011-06-21 18:28:35 +0000
@@ -27,51 +27,33 @@
27#import "Playlist.h"27#import "Playlist.h"
28#import "Song.h"28#import "Song.h"
29#import "SongListParser.h"29#import "SongListParser.h"
30#import "NSMutableSet+Extras.h"30#import "NSMutableArray+Extras.h"
3131
32@implementation PlaylistEditViewController32@implementation PlaylistEditViewController
33@synthesize playlist, originator, tabBarController;33@synthesize playlist, originator;
3434
35+ (UINavigationController *)navigableViewControllerWithPlaylist:(Playlist *)playlist originator:(SubsonicTableViewController *)originator35+ (PlaylistEditViewController *)playlistEditViewControllerWithPlaylist:(Playlist *)playlist originator:(SubsonicTableViewController *)originator
36{36{
37 PlaylistEditViewController *playlistEditViewController = [[[PlaylistEditViewController alloc] initWithPlaylist:playlist] autorelease];37 PlaylistEditViewController *playlistEditViewController = [[[PlaylistEditViewController alloc] initWithPlaylist:playlist] autorelease];
38 playlistEditViewController.originator = originator;38 playlistEditViewController.originator = originator;
39 UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:playlistEditViewController] autorelease];39 return playlistEditViewController;
40 nav.navigationBarHidden = YES;
41 return nav;
42}40}
4341
44- (id)initWithPlaylist:(Playlist *)aPlaylist42- (id)initWithPlaylist:(Playlist *)aPlaylist
45{43{
46 if ((self = [super initWithNibName:@"PlaylistEditViewController" bundle:nil]))44 if ((self = [super initWithNibName:nil bundle:nil]))
47 {45 {
48 self.playlist = aPlaylist;46 self.playlist = aPlaylist;
49 self.originator = nil;47 self.originator = nil;
48
49 // Hacky way to avoid the strange push-down of the tab bar buttons
50// self.view.frame = CGRectMake(0, 0, 320, 460);
51
52 [self setViewControllers:[NSArray arrayWithObjects:[PlaylistEditArtistListViewController navigableViewControllerWithOriginator:self], [PlaylistEditAlbumListViewController navigableViewControllerWithOriginator:self], [PlaylistEditSongListViewController navigableViewControllerWithOriginator:self], nil] animated:YES];
50 }53 }
51 return self;54 return self;
52}55}
5356
54- (void)viewDidLoad
55{
56 [super viewDidLoad];
57
58 // Hacky way to avoid the strange push-down of the tab bar buttons
59 tabBarController.view.frame = CGRectMake(0, 0, 320, 460);
60
61 [self.view addSubview:[tabBarController view]];
62
63 [tabBarController setViewControllers:[NSArray arrayWithObjects:[PlaylistEditArtistListViewController navigableViewControllerWithOriginator:self], [PlaylistEditAlbumListViewController navigableViewControllerWithOriginator:self], [PlaylistEditSongListViewController navigableViewControllerWithOriginator:self], nil] animated:YES];
64
65 tabBarController.delegate = self;
66}
67
68#pragma mark - UITabBarControllerDelegate
69
70- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
71{
72 self.navigationItem.title = viewController.title;
73}
74
75#pragma mark - Memory management57#pragma mark - Memory management
7658
77- (void)dealloc59- (void)dealloc
@@ -84,7 +66,7 @@
8466
85- (void)finish:(id)sender67- (void)finish:(id)sender
86{68{
87 NSMutableSet *extraParameters = [NSMutableSet set];69 NSMutableArray *extraParameters = [NSMutableArray array];
88 if (nil != self.playlist.playlistId)70 if (nil != self.playlist.playlistId)
89 {71 {
90 [extraParameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"playlistId", self.playlist.playlistId, nil]];72 [extraParameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"playlistId", self.playlist.playlistId, nil]];
9173
=== modified file 'musicstreaming/view_controllers/PlaylistListViewController.m'
--- musicstreaming/view_controllers/PlaylistListViewController.m 2011-06-16 19:12:54 +0000
+++ musicstreaming/view_controllers/PlaylistListViewController.m 2011-06-21 18:28:35 +0000
@@ -46,17 +46,17 @@
46{46{
47 if ((self = [super initWithTitle:title]))47 if ((self = [super initWithTitle:title]))
48 {48 {
49// UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,40)];49 UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,40)];
50// header.autoresizingMask = UIViewAutoresizingFlexibleWidth;50 header.autoresizingMask = UIViewAutoresizingFlexibleWidth;
51// 51
52// UIButton *createButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];52 UIButton *createButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
53// createButton.frame = CGRectMake(5, 5, 310, 30);53 createButton.frame = CGRectMake(5, 5, 310, 30);
54// [createButton setTitle:NSLocalizedString(@"Create new playlist", @"") forState:UIControlStateNormal];54 [createButton setTitle:NSLocalizedString(@"Create new playlist", @"") forState:UIControlStateNormal];
55// [createButton addTarget:self action:@selector(createNewPlaylist) forControlEvents:UIControlEventTouchUpInside];55 [createButton addTarget:self action:@selector(createNewPlaylist) forControlEvents:UIControlEventTouchUpInside];
56// [header addSubview:createButton];56 [header addSubview:createButton];
57// 57
58// self.tableView.tableHeaderView = header;58 self.tableView.tableHeaderView = header;
59// [header release];59 [header release];
60 }60 }
61 return self;61 return self;
62}62}
@@ -142,8 +142,8 @@
142 {142 {
143 Playlist *playlist = [NSEntityDescription insertNewObjectForEntityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()];143 Playlist *playlist = [NSEntityDescription insertNewObjectForEntityForName:@"Playlist" inManagedObjectContext:PerThreadManagedObjectContext()];
144 playlist.name = [(AlertPrompt *)alertPrompt enteredText];144 playlist.name = [(AlertPrompt *)alertPrompt enteredText];
145 UINavigationController *playlistEditViewController = [PlaylistEditViewController navigableViewControllerWithPlaylist:playlist originator:self];145 SaveContext();
146 playlistEditViewController.navigationBar.barStyle = UIBarStyleBlack;146 PlaylistEditViewController *playlistEditViewController = [PlaylistEditViewController playlistEditViewControllerWithPlaylist:playlist originator:self];
147 [self.navigationController presentModalViewController:playlistEditViewController animated:YES];147 [self.navigationController presentModalViewController:playlistEditViewController animated:YES];
148 }148 }
149 else149 else
150150
=== modified file 'musicstreaming/view_controllers/PlaylistViewController.m'
--- musicstreaming/view_controllers/PlaylistViewController.m 2011-06-16 19:12:54 +0000
+++ musicstreaming/view_controllers/PlaylistViewController.m 2011-06-21 18:28:35 +0000
@@ -22,7 +22,11 @@
22#import "Playlist.h"22#import "Playlist.h"
23#import "PlaylistParser.h"23#import "PlaylistParser.h"
24#import "Song.h"24#import "Song.h"
25#import "NSMutableSet+Extras.h"25#import "NSMutableArray+Extras.h"
26
27@interface PlaylistViewController ()
28- (void)deleteLocalPlaylist;
29@end
2630
27@implementation PlaylistViewController31@implementation PlaylistViewController
2832
@@ -80,9 +84,9 @@
80 [self.songs removeAllObjects];84 [self.songs removeAllObjects];
81 if ([self.playlist isKindOfClass:[NSManagedObject class]])85 if ([self.playlist isKindOfClass:[NSManagedObject class]])
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.
83 [self.songs addObjectsFromArray:[self.playlist.songs allObjects]];87 [self.songs addObjectsFromArray:self.playlist.songs];
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)
85 [self.songs sortUsingSelector:@selector(compare:)];89// [self.songs sortUsingSelector:@selector(compare:)];
86 }90 }
87 91
88 [self.tableView reloadData];92 [self.tableView reloadData];
@@ -93,13 +97,16 @@
93{97{
94 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];98 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
95 99
96 NSError *error = [self.playlist loadSongs];100 if (self.playlist.playlistId) // Protect against CouchDB access being down, at least allow for local playlists.
97
98 if (error)
99 {101 {
100 [self performSelectorOnMainThread:@selector(failedLoadingData:) withObject:error waitUntilDone:NO];102 NSError *error = [self.playlist loadSongs];
103
104 if (error)
105 {
106 [self performSelectorOnMainThread:@selector(failedLoadingData:) withObject:error waitUntilDone:NO];
107 }
101 }108 }
102 109
103 [self performSelectorOnMainThread:@selector(loadLocalData) withObject:nil waitUntilDone:NO];110 [self performSelectorOnMainThread:@selector(loadLocalData) withObject:nil waitUntilDone:NO];
104 [self performSelectorOnMainThread:@selector(finishLoadingData) withObject:nil waitUntilDone:NO];111 [self performSelectorOnMainThread:@selector(finishLoadingData) withObject:nil waitUntilDone:NO];
105 [pool release];112 [pool release];
@@ -204,38 +211,46 @@
204211
205- (void)editPlaylist212- (void)editPlaylist
206{213{
207 return;214 PlaylistEditViewController *playlistEditViewController = [PlaylistEditViewController playlistEditViewControllerWithPlaylist:self.playlist originator:self];
208 // Need to figure out what to do here
209 UINavigationController *playlistEditViewController = [PlaylistEditViewController navigableViewControllerWithPlaylist:self.playlist originator:self];
210 playlistEditViewController.navigationBar.barStyle = UIBarStyleBlack;
211 [self.navigationController presentModalViewController:playlistEditViewController animated:YES];215 [self.navigationController presentModalViewController:playlistEditViewController animated:YES];
212}216}
213217
214- (void)clearPlaylist218- (void)clearPlaylist
215{219{
216 return;220 self.playlist.playlistSongIndexes = nil;
217 // Need to figure out what to do here
218 self.playlist.songs = [NSMutableArray array];
219 self.songs = nil;221 self.songs = nil;
222 SaveContext();
220 [self.tableView reloadData];223 [self.tableView reloadData];
221}224}
222225
223- (void)deletePlaylist226- (void)deletePlaylist
224{227{
225 // Need to figure out what to do here228 if (self.playlist.playlistId)
226 NSMutableSet *extraParameters = [NSMutableSet set];229 {
227 [extraParameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.playlist.playlistId, nil]];230 NSMutableArray *extraParameters = [NSMutableArray array];
228 NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"deletePlaylist.view" parameters:extraParameters];231 [extraParameters addKeyValueObjectFromArray:[NSArray arrayWithObjects:@"id", self.playlist.playlistId, nil]];
229 NSURLRequest *request = [[[NSURLRequest alloc] initWithURL:url] autorelease];232 NSURL *url = [[Subsonic sharedSubsonic] getBaseURL:@"deletePlaylist.view" parameters:extraParameters];
230 NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:self];233 NSURLRequest *request = [[[NSURLRequest alloc] initWithURL:url] autorelease];
231 [connection start];234 NSURLConnection *connection = [NSURLConnection connectionWithRequest:request delegate:self];
235 [connection start];
236 }
237 else
238 {
239 [self deleteLocalPlaylist];
240 }
232}241}
233242
234- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response243- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
235{244{
236 [PerThreadManagedObjectContext() deleteObject:self.playlist];245 [self deleteLocalPlaylist];
237 [self.playlistListViewController performSelector:@selector(reload:) withObject:nil afterDelay:0.25];246}
238 [self.navigationController popViewControllerAnimated:YES];247
248- (void)deleteLocalPlaylist
249{
250 [PerThreadManagedObjectContext() deleteObject:self.playlist];
251 SaveContext();
252 [self.playlistListViewController performSelector:@selector(reload:) withObject:nil afterDelay:0.25];
253 [self.navigationController popViewControllerAnimated:YES];
239}254}
240255
241- (void)resetTableData:(id)sender256- (void)resetTableData:(id)sender
242257
=== modified file 'musicstreaming/view_controllers/SongViewController.m'
--- musicstreaming/view_controllers/SongViewController.m 2011-06-13 17:22:43 +0000
+++ musicstreaming/view_controllers/SongViewController.m 2011-06-21 18:28:35 +0000
@@ -38,7 +38,6 @@
38#import <MediaPlayer/MediaPlayer.h>38#import <MediaPlayer/MediaPlayer.h>
39#import <CFNetwork/CFNetwork.h>39#import <CFNetwork/CFNetwork.h>
40#import "NSNumber+Extras.h"40#import "NSNumber+Extras.h"
41#import "NSMutableSet+Extras.h"
4241
43@interface SongViewController (Private)42@interface SongViewController (Private)
44//KVO-driven stuff43//KVO-driven stuff
4544
=== modified file 'musicstreaming/view_controllers/SubsonicTableViewController.h'
--- musicstreaming/view_controllers/SubsonicTableViewController.h 2011-06-16 19:12:54 +0000
+++ musicstreaming/view_controllers/SubsonicTableViewController.h 2011-06-21 18:28:35 +0000
@@ -21,13 +21,11 @@
21#import "PullRefreshTableViewController.h"21#import "PullRefreshTableViewController.h"
22#import "Subsonic.h"22#import "Subsonic.h"
23#import "Song.h"23#import "Song.h"
24#import "MiniHudView.h"
2524
26@class Album;25@class Album;
2726
28@interface SubsonicTableViewController : PullRefreshTableViewController <UIAlertViewDelegate, UISearchDisplayDelegate, UISearchBarDelegate>27@interface SubsonicTableViewController : PullRefreshTableViewController <UIAlertViewDelegate, UISearchDisplayDelegate, UISearchBarDelegate>
29{28{
30 MiniHudView *hudView;
31 BOOL showProgressHUD;29 BOOL showProgressHUD;
32 NSTimer *respondToRemoteTimer;30 NSTimer *respondToRemoteTimer;
33 NSMutableArray *tableData;31 NSMutableArray *tableData;
3432
=== modified file 'musicstreaming/view_controllers/SubsonicTableViewController.m'
--- musicstreaming/view_controllers/SubsonicTableViewController.m 2011-06-16 19:14:45 +0000
+++ musicstreaming/view_controllers/SubsonicTableViewController.m 2011-06-21 18:28:35 +0000
@@ -22,7 +22,6 @@
22#import "SongViewController.h"22#import "SongViewController.h"
23#import "Subsonic.h"23#import "Subsonic.h"
24#import "Album.h"24#import "Album.h"
25#import "NSMutableSet+Extras.h"
26#import "Reachability.h"25#import "Reachability.h"
27#import "UONetworkStatusCoordinator.h"26#import "UONetworkStatusCoordinator.h"
2827
@@ -65,7 +64,7 @@
65{64{
66 [super viewDidLoad];65 [super viewDidLoad];
6766
68 showProgressHUD = YES;67 showProgressHUD = YES;
69 respondToRemoteTimer = NULL;68 respondToRemoteTimer = NULL;
7069
71 if (0 == [self.tableData count])70 if (0 == [self.tableData count])
@@ -304,6 +303,7 @@
304{303{
305 [self hideLoadingUI];304 [self hideLoadingUI];
306 NSLog(@"Error loading data: %@", error);305 NSLog(@"Error loading data: %@", error);
306 // TODO: Get better error messages communicated to the user.
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.",@"")];
308}308}
309309
@@ -377,18 +377,6 @@
377 [self showMessage:errorMessage withTitle:NSLocalizedString(@"Error",@"")];377 [self showMessage:errorMessage withTitle:NSLocalizedString(@"Error",@"")];
378}378}
379379
380#pragma mark - MiniHudView
381
382- (MiniHudView*)hudView
383{
384 if (nil == hudView)
385 {
386 hudView = [[MiniHudView alloc] initWithFrame:CGRectMake(270, 386, 30, 30)];
387 [[UIApplication sharedApplication].keyWindow addSubview:self.hudView];
388 }
389 return hudView;
390}
391
392- (void)showLoadingUI380- (void)showLoadingUI
393{381{
394 if (showProgressHUD)382 if (showProgressHUD)
@@ -406,11 +394,7 @@
406394
407- (void)hideLoadingUI395- (void)hideLoadingUI
408{396{
409 if (showProgressHUD)397 if (!showProgressHUD)
410 {
411 [self.hudView hide:YES];
412 }
413 else
414 {398 {
415 [self stopLoading];399 [self stopLoading];
416 showProgressHUD = YES;400 showProgressHUD = YES;
@@ -434,10 +418,8 @@
434- (void)dealloc418- (void)dealloc
435{419{
436 [[NSNotificationCenter defaultCenter] removeObserver:self];420 [[NSNotificationCenter defaultCenter] removeObserver:self];
437 [hudView hide:NO];
438 RELEASE_SAFELY(parserDelegate);421 RELEASE_SAFELY(parserDelegate);
439 RELEASE_SAFELY(viewName);422 RELEASE_SAFELY(viewName);
440 RELEASE_SAFELY(hudView);
441 RELEASE_SAFELY(tableData);423 RELEASE_SAFELY(tableData);
442 RELEASE_SAFELY(searchResults);424 RELEASE_SAFELY(searchResults);
443425
444426
=== modified file 'musicstreaming/view_controllers/SubsonicViewController.m'
--- musicstreaming/view_controllers/SubsonicViewController.m 2011-06-16 15:26:22 +0000
+++ musicstreaming/view_controllers/SubsonicViewController.m 2011-06-21 18:28:35 +0000
@@ -72,19 +72,16 @@
72 case UIEventSubtypeRemoteControlPause:72 case UIEventSubtypeRemoteControlPause:
73 case UIEventSubtypeRemoteControlTogglePlayPause:73 case UIEventSubtypeRemoteControlTogglePlayPause:
74 {74 {
75 NSLog(@"Got a remote command to play/pause");
76 [[StreamingPlayer sharedStreamingPlayer] playPauseSong];75 [[StreamingPlayer sharedStreamingPlayer] playPauseSong];
77 break;76 break;
78 }77 }
79 case UIEventSubtypeRemoteControlNextTrack:78 case UIEventSubtypeRemoteControlNextTrack:
80 {79 {
81 NSLog(@"Got a remote command to skip to the next track");
82 [[StreamingPlayer sharedStreamingPlayer] jumpAhead:self.jumpBy];80 [[StreamingPlayer sharedStreamingPlayer] jumpAhead:self.jumpBy];
83 break;81 break;
84 }82 }
85 case UIEventSubtypeRemoteControlPreviousTrack:83 case UIEventSubtypeRemoteControlPreviousTrack:
86 {84 {
87 NSLog(@"Got a remote command to go to previous track");
88 [[StreamingPlayer sharedStreamingPlayer] prevSong];85 [[StreamingPlayer sharedStreamingPlayer] prevSong];
89 break;86 break;
90 }87 }
9188
=== removed file 'musicstreaming/xibs/PlaylistEditViewController.xib'
--- musicstreaming/xibs/PlaylistEditViewController.xib 2011-05-18 14:10:38 +0000
+++ musicstreaming/xibs/PlaylistEditViewController.xib 1970-01-01 00:00:00 +0000
@@ -1,314 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
3 <data>
4 <int key="IBDocument.SystemTarget">1056</int>
5 <string key="IBDocument.SystemVersion">10J869</string>
6 <string key="IBDocument.InterfaceBuilderVersion">1306</string>
7 <string key="IBDocument.AppKitVersion">1038.35</string>
8 <string key="IBDocument.HIToolboxVersion">461.00</string>
9 <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
10 <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
11 <string key="NS.object.0">301</string>
12 </object>
13 <object class="NSArray" key="IBDocument.IntegratedClassDependencies">
14 <bool key="EncodedWithXMLCoder">YES</bool>
15 <string>IBUITabBar</string>
16 <string>IBUITabBarController</string>
17 <string>IBUIViewController</string>
18 <string>IBUIView</string>
19 <string>IBUITabBarItem</string>
20 <string>IBProxyObject</string>
21 </object>
22 <object class="NSArray" key="IBDocument.PluginDependencies">
23 <bool key="EncodedWithXMLCoder">YES</bool>
24 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
25 </object>
26 <object class="NSMutableDictionary" key="IBDocument.Metadata">
27 <bool key="EncodedWithXMLCoder">YES</bool>
28 <object class="NSArray" key="dict.sortedKeys" id="0">
29 <bool key="EncodedWithXMLCoder">YES</bool>
30 </object>
31 <reference key="dict.values" ref="0"/>
32 </object>
33 <object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
34 <bool key="EncodedWithXMLCoder">YES</bool>
35 <object class="IBProxyObject" id="372490531">
36 <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
37 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
38 </object>
39 <object class="IBProxyObject" id="975951072">
40 <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
41 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
42 </object>
43 <object class="IBUIView" id="191373211">
44 <reference key="NSNextResponder"/>
45 <int key="NSvFlags">274</int>
46 <string key="NSFrame">{{0, 20}, {320, 460}}</string>
47 <reference key="NSSuperview"/>
48 <reference key="NSNextKeyView"/>
49 <object class="NSColor" key="IBUIBackgroundColor">
50 <int key="NSColorSpace">3</int>
51 <bytes key="NSWhite">MQA</bytes>
52 <object class="NSColorSpace" key="NSCustomColorSpace">
53 <int key="NSID">2</int>
54 </object>
55 </object>
56 <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
57 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
58 </object>
59 <object class="IBUITabBarController" id="1031713869">
60 <object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/>
61 <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
62 <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
63 <int key="IBUIInterfaceOrientation">1</int>
64 <int key="interfaceOrientation">1</int>
65 </object>
66 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
67 <bool key="IBUIHorizontal">NO</bool>
68 <object class="IBUIViewController" key="IBUISelectedViewController" id="232609108">
69 <object class="IBUITabBarItem" key="IBUITabBarItem" id="647383633">
70 <string key="IBUITitle">Songs</string>
71 <object class="NSCustomResource" key="IBUIImage">
72 <string key="NSClassName">NSImage</string>
73 <string key="NSResourceName">songs.png</string>
74 </object>
75 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
76 </object>
77 <reference key="IBUIParentViewController" ref="1031713869"/>
78 <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
79 <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
80 <int key="IBUIInterfaceOrientation">1</int>
81 <int key="interfaceOrientation">1</int>
82 </object>
83 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
84 <bool key="IBUIHorizontal">NO</bool>
85 </object>
86 <object class="NSMutableArray" key="IBUIViewControllers">
87 <bool key="EncodedWithXMLCoder">YES</bool>
88 <object class="IBUIViewController" id="264906486">
89 <object class="IBUITabBarItem" key="IBUITabBarItem" id="798442073">
90 <string key="IBUITitle">Artists</string>
91 <object class="NSCustomResource" key="IBUIImage">
92 <string key="NSClassName">NSImage</string>
93 <string key="NSResourceName">artists.png</string>
94 </object>
95 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
96 </object>
97 <reference key="IBUIParentViewController" ref="1031713869"/>
98 <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
99 <int key="IBUIInterfaceOrientation">1</int>
100 <int key="interfaceOrientation">1</int>
101 </object>
102 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
103 <bool key="IBUIHorizontal">NO</bool>
104 </object>
105 <object class="IBUIViewController" id="135598923">
106 <object class="IBUITabBarItem" key="IBUITabBarItem" id="738429249">
107 <string key="IBUITitle">Albums</string>
108 <object class="NSCustomResource" key="IBUIImage">
109 <string key="NSClassName">NSImage</string>
110 <string key="NSResourceName">albums.png</string>
111 </object>
112 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
113 </object>
114 <reference key="IBUIParentViewController" ref="1031713869"/>
115 <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
116 <int key="IBUIInterfaceOrientation">1</int>
117 <int key="interfaceOrientation">1</int>
118 </object>
119 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
120 <bool key="IBUIHorizontal">NO</bool>
121 </object>
122 <reference ref="232609108"/>
123 </object>
124 <object class="IBUITabBar" key="IBUITabBar" id="259355173">
125 <reference key="NSNextResponder"/>
126 <int key="NSvFlags">266</int>
127 <string key="NSFrame">{{0, 431}, {320, 49}}</string>
128 <reference key="NSSuperview"/>
129 <reference key="NSNextKeyView"/>
130 <object class="NSColor" key="IBUIBackgroundColor">
131 <int key="NSColorSpace">3</int>
132 <bytes key="NSWhite">MCAwAA</bytes>
133 </object>
134 <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
135 </object>
136 </object>
137 </object>
138 <object class="IBObjectContainer" key="IBDocument.Objects">
139 <object class="NSMutableArray" key="connectionRecords">
140 <bool key="EncodedWithXMLCoder">YES</bool>
141 <object class="IBConnectionRecord">
142 <object class="IBCocoaTouchOutletConnection" key="connection">
143 <string key="label">view</string>
144 <reference key="source" ref="372490531"/>
145 <reference key="destination" ref="191373211"/>
146 </object>
147 <int key="connectionID">3</int>
148 </object>
149 <object class="IBConnectionRecord">
150 <object class="IBCocoaTouchOutletConnection" key="connection">
151 <string key="label">tabBarController</string>
152 <reference key="source" ref="372490531"/>
153 <reference key="destination" ref="1031713869"/>
154 </object>
155 <int key="connectionID">12</int>
156 </object>
157 </object>
158 <object class="IBMutableOrderedSet" key="objectRecords">
159 <object class="NSArray" key="orderedObjects">
160 <bool key="EncodedWithXMLCoder">YES</bool>
161 <object class="IBObjectRecord">
162 <int key="objectID">0</int>
163 <reference key="object" ref="0"/>
164 <reference key="children" ref="1000"/>
165 <nil key="parent"/>
166 </object>
167 <object class="IBObjectRecord">
168 <int key="objectID">1</int>
169 <reference key="object" ref="191373211"/>
170 <reference key="parent" ref="0"/>
171 </object>
172 <object class="IBObjectRecord">
173 <int key="objectID">-1</int>
174 <reference key="object" ref="372490531"/>
175 <reference key="parent" ref="0"/>
176 <string key="objectName">File's Owner</string>
177 </object>
178 <object class="IBObjectRecord">
179 <int key="objectID">-2</int>
180 <reference key="object" ref="975951072"/>
181 <reference key="parent" ref="0"/>
182 </object>
183 <object class="IBObjectRecord">
184 <int key="objectID">4</int>
185 <reference key="object" ref="1031713869"/>
186 <object class="NSMutableArray" key="children">
187 <bool key="EncodedWithXMLCoder">YES</bool>
188 <reference ref="259355173"/>
189 <reference ref="264906486"/>
190 <reference ref="135598923"/>
191 <reference ref="232609108"/>
192 </object>
193 <reference key="parent" ref="0"/>
194 <string key="objectName">Tab Bar Controller</string>
195 </object>
196 <object class="IBObjectRecord">
197 <int key="objectID">5</int>
198 <reference key="object" ref="259355173"/>
199 <reference key="parent" ref="1031713869"/>
200 </object>
201 <object class="IBObjectRecord">
202 <int key="objectID">6</int>
203 <reference key="object" ref="264906486"/>
204 <object class="NSMutableArray" key="children">
205 <bool key="EncodedWithXMLCoder">YES</bool>
206 <reference ref="798442073"/>
207 </object>
208 <reference key="parent" ref="1031713869"/>
209 </object>
210 <object class="IBObjectRecord">
211 <int key="objectID">7</int>
212 <reference key="object" ref="135598923"/>
213 <object class="NSMutableArray" key="children">
214 <bool key="EncodedWithXMLCoder">YES</bool>
215 <reference ref="738429249"/>
216 </object>
217 <reference key="parent" ref="1031713869"/>
218 </object>
219 <object class="IBObjectRecord">
220 <int key="objectID">8</int>
221 <reference key="object" ref="738429249"/>
222 <reference key="parent" ref="135598923"/>
223 </object>
224 <object class="IBObjectRecord">
225 <int key="objectID">9</int>
226 <reference key="object" ref="798442073"/>
227 <reference key="parent" ref="264906486"/>
228 </object>
229 <object class="IBObjectRecord">
230 <int key="objectID">10</int>
231 <reference key="object" ref="232609108"/>
232 <object class="NSMutableArray" key="children">
233 <bool key="EncodedWithXMLCoder">YES</bool>
234 <reference ref="647383633"/>
235 </object>
236 <reference key="parent" ref="1031713869"/>
237 </object>
238 <object class="IBObjectRecord">
239 <int key="objectID">11</int>
240 <reference key="object" ref="647383633"/>
241 <reference key="parent" ref="232609108"/>
242 </object>
243 </object>
244 </object>
245 <object class="NSMutableDictionary" key="flattenedProperties">
246 <bool key="EncodedWithXMLCoder">YES</bool>
247 <object class="NSArray" key="dict.sortedKeys">
248 <bool key="EncodedWithXMLCoder">YES</bool>
249 <string>-1.CustomClassName</string>
250 <string>-2.CustomClassName</string>
251 <string>1.IBEditorWindowLastContentRect</string>
252 <string>1.IBPluginDependency</string>
253 <string>10.IBPluginDependency</string>
254 <string>11.IBPluginDependency</string>
255 <string>4.IBPluginDependency</string>
256 <string>5.IBPluginDependency</string>
257 <string>6.IBPluginDependency</string>
258 <string>7.IBPluginDependency</string>
259 </object>
260 <object class="NSMutableArray" key="dict.values">
261 <bool key="EncodedWithXMLCoder">YES</bool>
262 <string>PlaylistEditViewController</string>
263 <string>UIResponder</string>
264 <string>{{354, 412}, {320, 480}}</string>
265 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
266 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
267 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
268 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
269 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
270 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
271 <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
272 </object>
273 </object>
274 <object class="NSMutableDictionary" key="unlocalizedProperties">
275 <bool key="EncodedWithXMLCoder">YES</bool>
276 <reference key="dict.sortedKeys" ref="0"/>
277 <reference key="dict.values" ref="0"/>
278 </object>
279 <nil key="activeLocalization"/>
280 <object class="NSMutableDictionary" key="localizations">
281 <bool key="EncodedWithXMLCoder">YES</bool>
282 <reference key="dict.sortedKeys" ref="0"/>
283 <reference key="dict.values" ref="0"/>
284 </object>
285 <nil key="sourceID"/>
286 <int key="maxID">16</int>
287 </object>
288 <object class="IBClassDescriber" key="IBDocument.Classes"/>
289 <int key="IBDocument.localizationMode">0</int>
290 <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
291 <object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
292 <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
293 <integer value="3100" key="NS.object.0"/>
294 </object>
295 <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
296 <int key="IBDocument.defaultPropertyAccessControl">3</int>
297 <object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
298 <bool key="EncodedWithXMLCoder">YES</bool>
299 <object class="NSArray" key="dict.sortedKeys">
300 <bool key="EncodedWithXMLCoder">YES</bool>
301 <string>albums.png</string>
302 <string>artists.png</string>
303 <string>songs.png</string>
304 </object>
305 <object class="NSMutableArray" key="dict.values">
306 <bool key="EncodedWithXMLCoder">YES</bool>
307 <string>{30, 30}</string>
308 <string>{30, 30}</string>
309 <string>{30, 30}</string>
310 </object>
311 </object>
312 <string key="IBCocoaTouchPluginVersion">301</string>
313 </data>
314</archive>

Subscribers

People subscribed via source and target branches

to all changes: