Log in

No account? Create an account

Previous Entry | Next Entry

New iTunes 4 won't detect music

No, I'm not expecting a quick or immediate solution. This is just a notification that with the latest iTunes, iJournal isn't fetching the music anymore. Alas and alack.

By the way, I really enjoy iJournal. *hearts iJournal, waves flag*


( 16 comments — Leave a comment )
(Deleted comment)
Apr. 28th, 2003 01:08 pm (UTC)
Yep! Working with Xjournal here too.
(Deleted comment)
Apr. 28th, 2003 04:46 pm (UTC)
...wouldn't that make it cease working with iTunes 3, though? When I was fooling around in the music detection code to add Audion 3 support, I seem to recall looking at the way iTunes version checking was done and thinking "this logic will break when iTunes is upgraded" to myself. It's based on 'if version = 3 then...', not 'if version > 2...'

If I was actually a decent C programmer, I would've fixed it, but I was just kinda bashing on it until it supported Audion. (Audion 4, if it ever happens, will also break iJournal.)

The version-checking method needs a rewrite, really.
Apr. 29th, 2003 08:57 am (UTC)
Fixed it
I wrote a fix for that which should work with all versions greater than or equal to 2.

It only required changing the one method. What should I to with it? I can post the source here since it is short or even post a diff of the method (or the diff of the entire source file).

I probably shouldn't make a binary out of this for public distribution since I have other modifications elsewhere in the source (I have a local archiving feature which I am going to also find out if anyone wants in the primary version of this program since I find it useful and others might, too).

Tell me what you guys want and I will do it,
Apr. 29th, 2003 10:54 am (UTC)
Re: Fixed it
How about just having different cases for different versions of iTunes? When a new version is released, just add a new case, compile, and distribute. That way, it doesn't break compatibility with older versions, and if the detection method changes with future versions (should they decide to implement a new AppleEvent), you can just specify the new method in the new case, and the older versions still function as they always did.

Just a thought, anyway.
Apr. 29th, 2003 11:27 am (UTC)
Re: Fixed it
But that would require a re-distribution for EVERY major version upgrade to iTunes which would be a waste of time and would annoy the user (especially having to explain to them that their software was designed to break).

This way it will work for everything unless there is a change made to the AppleEvent. This also doesn't break compatibility with older versions and it will just work unless the AppleEvent changes (which it is not likely to do).

It seems odd to me to plan this program to break every time an update is made to iTunes simply because something else might break. Wouldn't it be better to just make it work in one way for all cases and then put in a special case as they are needed?

This just seems like some kind of preemptive breaking of the software which seems ludicrous to me.
Apr. 28th, 2003 05:34 pm (UTC)
how would you suggest changing the source code?
Apr. 29th, 2003 06:11 am (UTC)
Darn it...
Ages ago, I suggested that we just check for version > 2. iTunes can't break existing AppleScript interfaces (by definition), so there's no reason to not assume that newer interfaces will be incompatible. Bleh.
(Deleted comment)
Apr. 30th, 2003 01:25 pm (UTC)
The solution
Well, for any of you who are interested in the fix I created, here is the code for the method that needs to be replaced:

+ (BOOL) iTunesIsRunning:(ProcessSerialNumber *)psn
OSErr err;
FSRef fsRef;
NSString *iTunesPath,*iTunesVersion;
CFURLRef urlRef;
NSArray *versionComponents = nil;
NSString *majorVersionString = nil;
int majorVersionNumber = 0;

NSLogDebug(@"[iTunes iTunesIsRunning]");
if ([self psnOfProcess:@"iTunes" psn:psn]==NULL) return NO;
if (err=GetProcessBundleLocation(psn,&fsRef)) return NO;
if ((urlRef=CFURLCreateFromFSRef(NULL, &fsRef))==NULL) return NO;
iTunesPath = (NSString*)CFURLCopyFileSystemPath(urlRef,kCFURLPOSIXPathStyle);
if (iTunesPath == nil) return NO;
iTunesVersion = [[[NSBundle bundleWithPath:[iTunesPath autorelease]] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
if (iTunesVersion == nil) return NO;
NSLogDebug(@"iTunes found at %@ has version %@",iTunesPath,iTunesVersion);
versionComponents = [iTunesVersion componentsSeparatedByString:@"."];
if (nil == versionComponents) return NO;
majorVersionString = [versionComponents objectAtIndex:0];
if (nil == majorVersionString) return NO;
majorVersionNumber = [majorVersionString intValue];
if ((majorVersionNumber >= 2) && (majorVersionNumber < INT_MAX)) {
return YES;
} else {
return NO;
May. 1st, 2003 08:17 pm (UTC)
Re: The solution
When I copied and pasted this into Script Editor, I kept getting syntax errors....
May. 1st, 2003 08:21 pm (UTC)
Re: The solution
It isn't a script. It is code for a method that needs to be replaced. Apparently this problem has already been fixed in the current CVS version. I don't know if anyone has a binary of it yet, though.

If you need any more help or clarification, I can help you out.
May. 2nd, 2003 03:23 pm (UTC)
Re: The solution
I'm sorry, I don't understand.....I am sooo not a programmer, just a designer....lol
May. 2nd, 2003 03:30 pm (UTC)
Re: The solution
Well, it isn't worth going through all that trouble if you are not a programmer. If they post an updated version soon then you could get that. I could build you a binary and get it to you if you want the current version. I could even leave in my own modifications in for you if you were interested (they are to keep a local archive of the entries before posting so you don't have to re-type them if it crashes during the post).

Get in touch (ICQ might be more efficient than LJ for such conversations and my number is in my user info),
May. 2nd, 2003 04:52 pm (UTC)
Re: The solution
Yeah, I appreciate it......the only programming I know is some Director, some JavaScript, some Authorware, and some Flash....that's it. I'm going to look you up on ICQ.....thanks, I really appreciated it!
May. 6th, 2003 06:46 pm (UTC)
Re: The solution
I downloaded and installed 1.52 three different times, and it definitely isn't working on my iMac, which has iTunes 4.0 and has Jaguar. I uninstalled, installed, looked for OSX updates (i update daily, so there were none) and iTunes still doesn't work on my iMac to import from iTunes 4.0.

However, it does still import from my iBook, which isn't running Jaguar, but is running iTunes 4.0. The iBook is running the OSX prior to Jaguar.
( 16 comments — Leave a comment )


iJournal: Official LiveJournal Client for Mac OS X
iJournal Home

Latest Month

June 2011
Powered by LiveJournal.com
Designed by Lilia Ahner