PDA

View Full Version : iTunes Update Plugin w/ OS X



Craig, James (IT)
2005-02-03, 01:52
Hello Allan,
This is a very interesting way of doing it - I didn't realise you could
do that!

A while ago I got a mail from Daniel Boss who provided me with changes
to make the plugin work with OSX using the
Mac::Applescript::Glue modules. His method is very nice and ends up
looking almost identical to the Windows code!
Unfortunately he's not replied to any of my mails since! (where are you
Daniel?!) as there were a couple of questions I had.

The volume of enquiries about fixing the plugin for OS X is rising so I
think today I will post this new version of the script on my website. I
want some feedback from Mac users about whether it works (it should) and
what's required to install it.
Look out for a mail later today!

If that doesn't get anywhere I will keep your method in reserve though!

Thanks very much

James

-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Allan Hise
Sent: 02 February 2005 22:37
To: Slim Devices Discussion
Subject: [slim] iTunes Update Plugin w/ OS X

Hi james,

With absolutely no help from the applescript mailing list (grumble,
grumble), I finally figured out at least one way to applecript this in
OS X 10.3.7.

I haven't done a ton of test cases, and it really assumes that the track
is there. And there is probably a more efficient and better way to do
this, but it works. And it is relatively quick on my 20,000 track
library.

I have not tried playing wit your code to have it spit out the right
applescript, this was a standalone script that I tried. Do you want to
add
this to your plugin and I'll see if it does the trick? The applescript
follows, obviously the path string should be updated by your plugin, and
the date string (something like) "Saturday, January 1, 2000 12:00:00 AM"
(but I think can be sortened to "1/1/0 0:0:0")

Here is the script:

******
tell application "iTunes"
set lib to library playlist 1
set the_path to "mp3:Cop Shoot Cop:White Noise:11 If
Tomorrow Ever Comes.mp3"
play the_path
set the_selection to current track
pause
tell the_selection
set current_plays to played count
set played count to current_plays + 1
-- set the_date to (current date)
-- set played date to the_date
set played date to date "Wednesday, February 2, 2005
11:22:21 PM"
end tell
end tell
******

Allan


On Mon, 17 Jan 2005, Craig, James (IT) wrote:

> Hi Allen,
> I would certainly appreciate any input to get my plugin working on the
> Mac - it seems so unfair that it doesn't work but does on Windows!
>
> The key to making it work is to get the appleScript to find a track in
> iTunes based on the data we know in SlimServer eg.
> Artist/album/track/location.
> Others on the list have had a look at my guess (bear in mind I know
> almost nothing about appleScript) and given up.
> Perhaps better to start from scratch!
>
> James
>
> -----Original Message-----
> From: discuss-bounces (AT) lists (DOT) slimdevices.com
> [mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Allan Hise
> Sent: 17 January 2005 12:32
> To: discuss (AT) lists (DOT) slimdevices.com
> Subject: [slim] iTunes Update Plugin w/ OS X
>
> I really like the idea of my iTunes database being updated when the
> slimserver plays songs, and was disappointed to read that the iTunes
> Update plugin hasn't been tested with OS X.
>
> Before I take the plunge and see whether I can get it working, has
> anyone
> attempted this before? Are there any pitfalls I should be aware of?
>
> Thanks!
>
> Allan
>
>

Diarmuid
2005-11-27, 08:10
Hi

I know I am replying to an old thread but I was wondering if there was any update to this plugin. I'm looking for someway to import the iTunes_Hist file from my linux server into iTunes on OsX?

Diarmuid



Hello Allan,
This is a very interesting way of doing it - I didn't realise you could
do that!

A while ago I got a mail from Daniel Boss who provided me with changes
to make the plugin work with OSX using the
Mac::Applescript::Glue modules. His method is very nice and ends up
looking almost identical to the Windows code!
Unfortunately he's not replied to any of my mails since! (where are you
Daniel?!) as there were a couple of questions I had.

The volume of enquiries about fixing the plugin for OS X is rising so I
think today I will post this new version of the script on my website. I
want some feedback from Mac users about whether it works (it should) and
what's required to install it.
Look out for a mail later today!

If that doesn't get anywhere I will keep your method in reserve though!

Thanks very much

James

-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Allan Hise
Sent: 02 February 2005 22:37
To: Slim Devices Discussion
Subject: [slim] iTunes Update Plugin w/ OS X

Hi james,

With absolutely no help from the applescript mailing list (grumble,
grumble), I finally figured out at least one way to applecript this in
OS X 10.3.7.

I haven't done a ton of test cases, and it really assumes that the track
is there. And there is probably a more efficient and better way to do
this, but it works. And it is relatively quick on my 20,000 track
library.

I have not tried playing wit your code to have it spit out the right
applescript, this was a standalone script that I tried. Do you want to
add
this to your plugin and I'll see if it does the trick? The applescript
follows, obviously the path string should be updated by your plugin, and
the date string (something like) "Saturday, January 1, 2000 12:00:00 AM"
(but I think can be sortened to "1/1/0 0:0:0")

Here is the script:

******
tell application "iTunes"
set lib to library playlist 1
set the_path to "mp3:Cop Shoot Cop:White Noise:11 If
Tomorrow Ever Comes.mp3"
play the_path
set the_selection to current track
pause
tell the_selection
set current_plays to played count
set played count to current_plays + 1
-- set the_date to (current date)
-- set played date to the_date
set played date to date "Wednesday, February 2, 2005
11:22:21 PM"
end tell
end tell
******

Allan


On Mon, 17 Jan 2005, Craig, James (IT) wrote:

> Hi Allen,
> I would certainly appreciate any input to get my plugin working on the
> Mac - it seems so unfair that it doesn't work but does on Windows!
>
> The key to making it work is to get the appleScript to find a track in
> iTunes based on the data we know in SlimServer eg.
> Artist/album/track/location.
> Others on the list have had a look at my guess (bear in mind I know
> almost nothing about appleScript) and given up.
> Perhaps better to start from scratch!
>
> James
>
> -----Original Message-----
> From: discuss-bounces (AT) lists (DOT) slimdevices.com
> [mailto:discuss-bounces (AT) lists (DOT) slimdevices.com] On Behalf Of Allan Hise
> Sent: 17 January 2005 12:32
> To: discuss (AT) lists (DOT) slimdevices.com
> Subject: [slim] iTunes Update Plugin w/ OS X
>
> I really like the idea of my iTunes database being updated when the
> slimserver plays songs, and was disappointed to read that the iTunes
> Update plugin hasn't been tested with OS X.
>
> Before I take the plunge and see whether I can get it working, has
> anyone
> attempted this before? Are there any pitfalls I should be aware of?
>
> Thanks!
>
> Allan
>
>

Craig, James (IT)
2005-12-12, 07:20
Hi Diarmuid,
Sounds like you need an iTunesUpdateOSX.pl right?

I will put this on my to-do list... Should be pretty easy.

James
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

Diarmuid
2005-12-21, 16:44
Hi Diarmuid,
Sounds like you need an iTunesUpdateOSX.pl right?

I will put this on my to-do list... Should be pretty easy.

James
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.


James

That's exactly it, my iTunes_hist is abour 160k so I'd like to update itunes with it

Diarmuid

Diarmuid
2006-02-05, 04:10
Hi James

Did you ever get around to writing this script?

Thanks
Diarmuid

James
2006-02-05, 11:22
um...
I did start, but it was a bit more complicated than I was expecting. If you can help me with a bit of testing I will finish it off next week and give you my best attempt!

James

James
2006-02-06, 12:12
Hi Diarmuid,
attached should be a 'cross platform' version of the iTunesUpdateWin.pl that comes with the plugin.
It will update the ratings and played counts on OSX but not the dates (that's where it gets tricky).
It will print the dates out though, so if you could send me the output that would help greatly on working out the right thing to do with them...

James

el payo
2006-02-09, 08:16
James - I 've been keeping an eye on this discussion and was wondering if the script you just posted needs to be renamed? Or should it just automatically function in the plugin folder with no changes?

Craig, James (IT)
2006-02-09, 08:31
I am not sure what you mean!
It's a cross-platform replacement for the iTunesUpdateWin.pl script, not
part of the plugin as such.

It would only be of interest if you're an OSX iTunes user running your
SlimServer on a different machine...

James
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

el payo
2006-02-10, 07:53
Thanks for the clarification. I was having a soft brain moment.

Diarmuid
2006-02-14, 12:07
I am not sure what you mean!
It's a cross-platform replacement for the iTunesUpdateWin.pl script, not
part of the plugin as such.

It would only be of interest if you're an OSX iTunes user running your
SlimServer on a different machine...

James
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

James

Sorry for the delay in replying after putting you time into this. I was away for a few weeks and forgot to follow this up. I will download it and check it out and let you know

Regards
Diarmuid