| Article: |
Controlling iTunes with Perl | |
| Subject: | If only I could install it | |
| Date: | 2002-11-25 13:49:20 | |
| From: | hondo77 | |
|
I love the idea of Mac::iTunes. However, as someone who tried to install the thing just a few days ago, it's not ready for prime time. There are so many freaking dependencies, some on modules that must exist only on Brian's personal box, that I couldn't get it working. Did I say "working"? I meant "installed". Personally, I just want to have an easy way to parse the XML files iTunes produces and have a nice object or two to play with. I shouldn't have to download half of CPAN and sync up with Brian's box to do that. I've seen this mentioned elsewhere on the web (an Apple mailing list, as I recall) so this isn't news.
|
||
Showing messages 1 through 11 of 11.
-
If only I could install it
2002-11-25 23:10:33 brian d foy |
[View]
-
If only I could install it
2002-11-26 15:46:19 hondo77 [View]
Good news about Mac::iTunes reading more than the XML file. Actually, I want the information however I can get it. I assumed the XMl file had all of it.
Okay, so I tried the installation again. Mac::Path::Util was missing, of course, so I installed it (I thought I had done that last week...hmmm...). Then I had to install Test::Prereq. Now I get the following error messages:
CHECK failed--call queue aborted.
B::Module::Info,modules_used use failed with 255 saying:
Can't locate object method "ARRAY" via package "B::begin_av" at /Library/Perl/B/Module/Info.pm line 49.
I decide to just go for it and force an install of Test::Prereq. That done, I now try and install Mac::iTunes. It looks like (after a LONG time testing) I need to install Test::Data. Make that force an install of Test::Data (I don't know what that B::Module message above is all about but it sure keeps coming up).
Now to try to install Mac::iTunes again. After hours of things like this:
t/controller.......NOK 12-1753 at t/controller.t line 43
# Failed test (t/controller.t at line 43)
# got: undef
# expected: 'true'
I finally fail with this:
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/controller.t 39 9984 44 39 88.64% 2 7-44
t/position.t 5 1280 6 5 83.33% 2-6
t/track_info.t 3 768 4 3 75.00% 2-4
4 subtests skipped.
Failed 3/17 test scripts, 82.35% okay. 47/448 subtests failed, 89.51% okay.
I'll have to do a forced install tomorrow as there aren't enough hours left today to go through all those tests today.
Anyway, you see what I mean. It's a rough install and it takes forever. -
If only I could install it
2002-11-26 20:18:09 brian d foy |
[View]
I've uploaded new versions of Mac::iTunes and Mac::Path::Util.
If you have more problems, please send the complete output from make directly to me.
Thanks. -
If only I could install it
2002-12-02 11:01:56 hondo77 [View]
Woo hoo! That did it! Thanks, Brian. I had to do a force but at least it's in. Time to play.
-
If only I could install it
2002-11-25 22:13:41 timct [View]
I hunted down Mac::Path::Util via google installed the alpha that I found. However even after successfully compiling Mac::iTunes it failes many of the controller tests and thus refuses to install without forcing it to. Any ideas? I am running Perl 5.8.0 on Jaguar. -
If only I could install it
2002-11-25 23:13:58 brian d foy |
[View]
Some of the controller tests seem to depend on the state of iTunes. If you change iTunes during the test, like minimizing it, some tests can fail.
As for Mac::Path::Util, or any Perl module, your first stop should be http://search.cpan.org.
If you send me any error messages you get, I would be happy to help you fix them. :) -
Apple Events in iTunes
2005-09-06 03:25:50 Bill_Palmer [View]
Hi Brian
Do you know how to access iTunes Events from Applescript or Perl on Mac OS X.
On the Windows version, the COM object emits events such as OnPlayerPlayEvent and OnDatabaseChangedEvent but I can't find any equivalent in the documentation of the Mac version.
I'm using your Mac::iTunes module to interface with iTunes but the project needs to know when tracks are deleted from iTunes. With events this would be easy but with regular polling of iTunes state it is too processor intensive. -
If only I could install it
2002-11-26 11:15:16 timct [View]
Brian, when interacting with the controller, I keep getting these type of messages. Is this normal?
## Component Manager: attempting to find symbols in a component alias of type (regR/carP/x!bt)
-
If only I could install it
2003-10-25 18:25:14 anonymous2 [View]
It's a common problem caused by Toast: See if you have a file called Toast Video CD Support.qtx in the main /Library/QuickTime/ directory on your system. If so, delete it or move it to some other location (unless you really want to have Video CD support in Toast!). -
If only I could install it
2002-11-26 20:22:02 brian d foy |
[View]
That does not look like a Perl error. That looks like something else is wrong. -
If only I could install it
2002-11-26 11:10:00 timct [View]
I ended up doing a force install Mac::iTunes. I am testing/writing a script right now. I'll post any problems that I might come across.



However, all of the modules it needs are on CPAN. The easiest way to find any module is to go directly to http://search.cpan.org. For some reason CPAN.pm does not find Mac::Path::Util, but it is on CPAN. Everything else is in the Perl modules list.
Some of the tests for the AppleScript portion seem to depend on the state of iTunes (e.g. docked or not). However, you can install the module even if the controller tests fail and the controller portion should still work. The parts of the module that deal with the library parsing do not depend on the other parts.
If you want to parse the XML music library, then you do not want Mac::iTunes anyway. The module will parse teh binary format, which, by the way, has more information about each track. The XML format does not expose everything.
If you send me any error messages you get I would be happy to help you sort it out.