PDA

View Full Version : iTunesUpdateWin.pl



Dave Rodger
2004-12-13, 19:17
Hehe...
Color me a moron--I had the wrong string in place for home (had host, not
home.) So no wonder it wasn't finding it.

Now I've got a different problem--files are apparently not writable from the
windows machines--error is:
Found 1 track(s) in iTunes
Checking for: *\Spirit\mp3\The Jimi Hendrix Experience\Electric Ladyland\The
Jim
i Hendrix Experience - Electric Ladyland (01) ...And the Gods Made Love.mp3*
Found track in iTunes
Marking as played in iTunes
OLE exception from "<Unknown Source>":

The track is not modifiable.

Win32::OLE(0.1701) error 0x80020009: "Exception occurred"
in PROPERTYPUT "playedCount"
OLE exception from "<Unknown Source>":

The track is not modifiable.

Win32::OLE(0.1701) error 0x80020009: "Exception occurred"
in PROPERTYPUT "playedDate"
==logTrackToiTunesWin()
Location is now */home/mp3/U2/How To Dismantle An Atomic Bomb/U2 - How To
Disman
tle An Atomic Bomb - 01 - Vertigo.mp3*

I assume permissions/samba issues--if anyone's willing to give me a samba
permissions tutorial, just holler :)

-dave

----- Original Message -----
From: "Dave Rodger" <dave (AT) davidrodger (DOT) com>
To: <discuss (AT) lists (DOT) slimdevices.com>
Sent: Monday, December 13, 2004 7:55 PM
Subject: Subject: [slim] iTunesUpdateWin.pl


> James--
>
> > Date: Mon, 13 Dec 2004 09:21:29 -0000
> > From: "Craig, James (IT)" <James.Craig (AT) morganstanley (DOT) com>
> > To: "Slim Devices Discussion" <discuss (AT) lists (DOT) slimdevices.com>
> > Subject: [slim] iTunesUpdateWin.pl
> > Message-ID:
<530CF4BB0B02E645BB0B25B944923A0F2C6651 (AT) LNWEXMB12 (DOT) msad.ms.com>
> > Hello Dave,
> > my script is not clever enough to figure out the relationship between
> > your two drives because the leading directory is different between the
> > two machines
> > eg. \Spirit and \mp3.=20
> > =20
> > I have not had any bright ideas yet about how to make this automatic so
> > I would suggest you hack the script to change the path by inserting this
> > around line 150:
> > $searchTerms{location} =3D~ s/^\\home/\\Spirit/;
> >
>
> I'm sure that's it, but my perl isn't good enough to figure out why that's
> not exactly it.
> Here's my debugging work-in-progress:
> iTunesUpdateMsg( "Location is now *$searchTerms{location}*\n");
>
> # reverse the slashes in case SlimServer is running on UNIX
>
> $searchTerms{location} =~ s/\//\\/g;
>
> iTunesUpdateMsg( "Location is now *$searchTerms{location}*\n");
>
> #replace \\ with \ - not consistent within iTunes (not in my library at
> least)
>
> $searchTerms{location} =~ s/\\\\/\\/;
>
> iTunesUpdateMsg( "Location is now *$searchTerms{location}*\n");
>
> $searchTerms{location} =~ s/^\\host/\\Spirit/;
>
> iTunesUpdateMsg( "Location is now *$searchTerms{location}*\n");
>
> And here's some sample output:
>
> Location is now */home/mp3/Ella Fitzgerald/Ella Wishes You a Swinging
> Christmas/
> 04 What Are You Doing New Year's Eve.mp3*
> Location is now *\home\mp3\Ella Fitzgerald\Ella Wishes You a Swinging
> Christmas\
> 04 What Are You Doing New Year's Eve.mp3*
> Location is now *\home\mp3\Ella Fitzgerald\Ella Wishes You a Swinging
> Christmas\
> 04 What Are You Doing New Year's Eve.mp3*
> Location is now *\home\mp3\Ella Fitzgerald\Ella Wishes You a Swinging
> Christmas\
> 04 What Are You Doing New Year's Eve.mp3*
> Searching iTunes for *Ella Fitzgerald What Are You Doing New Year's Eve?*
> Found 2 track(s) in iTunes
> Checking for: *\home\mp3\Ella Fitzgerald\Ella Wishes You a Swinging
> Christmas\04
> What Are You Doing New Year's Eve.mp3*
> 1 - False match: *\Spirit\itunes\Ella Fitzgerald\Ella Wishes You a
Swinging
> Chri
> stmas\What Are You Doing New Year's Eve_.m4p*
> 2 - False match: *\Spirit\mp3\Ella Fitzgerald\Ella Wishes You a Swinging
> Christm
> as\04 What Are You Doing New Year's Eve.mp3*
> Track not found in iTunes
>
>
>
> So the first line is the raw source for location--
>
> Then we switch from / to \
>
> Then we remove any \\ and replace with \ (don't appear to be any in my
list)
>
> Then I want to replace \home\ with \Spirit\--
>
> this is the Perl line:
>
> $searchTerms{location} =~ s/^\\host/\\Spirit/;
>
> Do I want that to be:
>
> $searchTerms{location} =~ s/^\host^\/^\Spirit^\/;
>
> (Trying, trying; that isn't it...)
>
> Any thoughts?
>
> Thanks!
>
>
>
> -dave
>