CoreAudioFile fixes
parent
5472794be8
commit
31e95e7125
|
@ -11,7 +11,7 @@
|
|||
[p setCanChooseDirectories:YES];
|
||||
[p setAllowsMultipleSelection:YES];
|
||||
|
||||
// [p beginSheetForDirectory:nil file:nil types:[`listController acceptableFileTypes] modalForWindow:mainWindow modalDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:NULL];
|
||||
// [p beginSheetForDirectory:nil file:nil types:[listController acceptableFileTypes] modalForWindow:mainWindow modalDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:NULL];
|
||||
// [p beginForDirectory:nil file:nil types:[playlistController acceptableFileTypes] modelessDelegate:self didEndSelector:@selector(openPanelDidEnd:returnCode:contextInfo:) contextInfo:nil];
|
||||
|
||||
if ([p runModalForTypes:[playlistController acceptableFileTypes]] == NSOKButton)
|
||||
|
@ -105,6 +105,7 @@
|
|||
[playlistController savePlaylist:[p filename]];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)loadPlaylist:(id)sender
|
||||
{
|
||||
NSOpenPanel *p;
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
<integer>3</integer>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>823</integer>
|
||||
<integer>29</integer>
|
||||
<integer>513</integer>
|
||||
<integer>21</integer>
|
||||
<integer>823</integer>
|
||||
<integer>463</integer>
|
||||
<integer>513</integer>
|
||||
<integer>29</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8I127</string>
|
||||
|
|
Binary file not shown.
|
@ -356,20 +356,25 @@
|
|||
|
||||
- (void)readTagsThreadSetVariables: (NSArray *)a
|
||||
{
|
||||
|
||||
NSLog(@"SETTING TITLE TO: %@", [a objectAtIndex:0]);
|
||||
[self setDisplay:[a objectAtIndex:0]];
|
||||
NSLog(@"SETTING TITLE TO: %@", [a objectAtIndex:1]);
|
||||
[self setTitle:[a objectAtIndex:1]];
|
||||
NSLog(@"SETTING TITLE TO: %@", [a objectAtIndex:2]);
|
||||
[self setArtist:[a objectAtIndex:2]];
|
||||
NSLog(@"SETTING TITLE TO: %@", [a objectAtIndex:3]);
|
||||
[self setAlbum:[a objectAtIndex:3]];
|
||||
NSLog(@"SETTING TITLE TO: %@", [a objectAtIndex:4]);
|
||||
[self setGenre:[a objectAtIndex:4]];
|
||||
NSLog(@"SETTING TITLE TO: %@", [a objectAtIndex:5]);
|
||||
[self setYear:[[a objectAtIndex:5] stringValue]];
|
||||
NSLog(@"SETTING TITLE TO: %@", [a objectAtIndex:6]);
|
||||
[self setTrack:[[a objectAtIndex:6] intValue]];
|
||||
}
|
||||
|
||||
- (void)readTagsThread
|
||||
{
|
||||
NSString *lDisplay = nil, *lArtist = nil, *lTitle = nil, *lAlbum = nil, *lGenre = nil;
|
||||
NSString *lDisplay = @"", *lArtist = @"", *lTitle = @"", *lAlbum = @"", *lGenre = @"";
|
||||
int lYear = 0, lTrack = 0;
|
||||
|
||||
TagLib_File *tagFile = taglib_file_new((const char *)[filename UTF8String]);
|
||||
|
@ -395,12 +400,12 @@
|
|||
if (pArtist != NULL)
|
||||
lArtist = [NSString stringWithUTF8String:(char *)pArtist];
|
||||
else
|
||||
lArtist = nil;
|
||||
lArtist = @"";
|
||||
|
||||
if (pAlbum != NULL)
|
||||
lAlbum = [NSString stringWithUTF8String:(char *)pAlbum];
|
||||
else
|
||||
lAlbum = nil;
|
||||
lAlbum = @"";
|
||||
|
||||
if (pTitle != NULL)
|
||||
{
|
||||
|
@ -408,12 +413,12 @@
|
|||
lTitle = [NSString stringWithUTF8String:(char *)pTitle];
|
||||
}
|
||||
else
|
||||
lTitle = nil;
|
||||
lTitle = @"";
|
||||
|
||||
if (pGenre != NULL)
|
||||
lGenre = [NSString stringWithUTF8String:(char *)pGenre];
|
||||
else
|
||||
lGenre = nil;
|
||||
lGenre = @"";
|
||||
|
||||
if ([lArtist isEqualToString:@""] || [lTitle isEqualToString:@""])
|
||||
{
|
||||
|
@ -447,7 +452,9 @@
|
|||
lAlbum,
|
||||
lGenre,
|
||||
[NSNumber numberWithInt:lYear],
|
||||
[NSNumber numberWithInt:lTrack],nil]
|
||||
[NSNumber numberWithInt:lTrack],
|
||||
nil]
|
||||
|
||||
waitUntilDone:YES];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue