Issue 2 in eyetunes: Errors -1701 and -1712 while enumerating tracks and playlists

0 views
Skip to first unread message

codesite...@google.com

unread,
Jan 6, 2010, 12:23:10 PM1/6/10
to eyet...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2 by statemachinejunkie: Errors -1701 and -1712 while enumerating
tracks and playlists
http://code.google.com/p/eyetunes/issues/detail?id=2

What steps will reproduce the problem?
1. Start iTunes 9.0.2
2. Invoke EyeTunes using [sharedInsance] method
3. Enumerate tracks and playlists using ETTrack and ETPlaylist methods

What is the expected output? What do you see instead?

I expect a smooth enumeration of elements with no errors spit out from the
library. Instead I get
the following:
2010-01-06 12:12:38.951 MyApp[17349:a0f] Unable to find length of reply
string: -1701
2010-01-06 12:12:38.954 MyApp[17349:a0f] Unable to find length of reply
string: -1701
2010-01-06 12:12:39.482 MyApp[17349:a0f] Playist Library created with 1309
tracks (0 tracks
skipped)
2010-01-06 12:12:40.429 MyApp[17349:a0f] Playist Music created with 1309
tracks (0 tracks
skipped)
2010-01-06 12:12:40.602 MyApp[17349:a0f] Playist Movies created with 0
tracks (0 tracks
skipped)

and

2010-01-06 12:12:44.487 MyApp[17349:a0f] Playist 5-Star Rating created with
160 tracks (0
tracks skipped)
2010-01-06 12:14:44.515 MyApp[17349:a0f] Error sending Apple Event: -1712
2010-01-06 12:14:44.534 MyApp[17349:a0f] Playist 21st Century Music created
with 41 tracks
(0 tracks skipped)

What version of the product are you using? On what operating system?

I'm using version 1.3.3 on Mac OS X 10.6.2

Please provide any additional information below.

Here is the code that enumerates the EyeTunes resources and generates the
errors.

- (BOOL)scanEyeTunesForApplicableTracks
{
// start fresh; release any objects from a previous run
[_trackStorage removeAllObjects];
[_trackDictionary removeAllObjects];

// Scan the user's root-playlist for all MP3 mand M4A tracks and add
them to
// our table-view. These are the songs we consider to be elegible.
EyeTunes* proxy = [EyeTunes sharedInstance];
ETPlaylist* rootPlaylist = [proxy rootPlaylist];

if ( rootPlaylist && rootPlaylist.trackCount > 0 )
{
for ( ETTrack* track in rootPlaylist.trackEnumerator )
{
if ( ([track.kind isEqualToString:@"AAC audio file"] ||
[track.kind isEqualToString:@"Purchased AAC audio file"] |
|
[track.kind isEqualToString:@"MPEG audio file"]) &&
((track.bpm && NO == self.filterTracksWithBPMValues) ||
0 == track.bpm) &&
!([track.genre isEqualToString:@"Books & Spoken"] ||
[track.genre isEqualToString:@"Classical"] ||
[track.genre isEqualToString:@"Podcast"]) )
{
CDAudioTrack* audioTrack = [CDAudioTrack
audioTrackWithETTrack:track];
[_trackStorage addObject:audioTrack];
[_trackDictionary setObject:audioTrack
forKey:track.persistentIdAsString];
currentTrack = audioTrack;
[self currentTrackHasChanged];
MCLog(@"%@\nKind : %@\nBPM : %d\nGenre : %@\nID :
0x%llX",
track.name, track.kind, track.bpm, track.genre,
track.persistentId);
}
}

return YES;
}

// call a standard alert function here
MCLog(@"Unable to get root playlist");
return NO;
}

- (id)initWithEyeTunes:(EyeTunes*)eyeTunes
trackDictionary:(NSDictionary*)trackDictionary
{
for ( ETPlaylist* etPlaylist in eyeTunes.playlistEnumerator )
{
CDPPlaylist* playlist = [[CDPPlaylist alloc]
initWithETPlaylist:etPlaylist

trackDictionary:trackDictionary];

if ( playlist.count )
{
rootNode = [[CDPNode alloc] initWithName:@"Root Node"];
[rootNode.children addObject:playlist];
}

[playlist release];
}

return self;
}

- (id)initWithETPlaylist:(ETPlaylist*)playlist
trackDictionary:(NSDictionary*)trackDictionary
{
self = [super initWithName:playlist.name];

if ( self )
{
#ifndef DISTRIBUTION
NSInteger skippedTracks = 0;
#endif
for ( ETTrack* track in playlist.tracks )
{
CDAudioTrack* audioTrack = [trackDictionary
objectForKey:track.persistentIdAsString];

if ( audioTrack )
{
[children addObject:audioTrack];
}
}

MCLog(@"Playist %@ created with %d tracks (%d tracks skipped)",
_name,
children.count,
skippedTracks);
}

return self;
}


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply all
Reply to author
Forward
0 new messages