Bug 745 - Extend iTunes support to include UNC paths
: Extend iTunes support to include UNC paths
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: iTunes
: 5.x or older
: PC RedHat Linux
: P2 enhancement (vote)
: ---
Assigned To: Blackketter Dean
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-19 12:32 UTC by Dave Rodger
Modified: 2008-12-18 11:52 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Rodger 2004-12-19 12:32:22 UTC
It would be great if the iTunes support could be extended to allow UNC paths 
from an iTunes library.

Specifics:
I have iTunes running on a PC, accessing my music collection on my Linux 
machine.  The Linux PC has three Samba shares:
/home/mp3 (exported as \\spirit\mp3) - location of the actual mp3 files
/home/mp3_playlists (exported as \\spirit\mp3_playlists) -- where my slim 
playlists will (may) get stored (actually not sure if this is used if I use 
iTunes)
/home/itunes (exported as \\spirit\itunes) -- where the iTunes Music File.xml 
etc. files are stored.

I have iTunes set up to read the music library from \\spirit\itunes, and the 
iTunes xml file has entries in it like this:
	<key>Location</key><string>file://localhost//Spirit/mp3/Aimee%
20Mann/Lost%20in%20Space/Aimee%20Mann%20-%20Lost%20in%20Space%20(Lost%20in%
20Space).mp3/</string>

All is working well, except that the slimserver can't see the contents of the 
iTunes playlists.  Here's an excerpt of the debug info:
2004-12-19 11:43:53.7060 found end of dictionary
2004-12-19 11:43:53.7064 got a track named Mr. Grieves location: 
file://localhost//Spirit/mp3/Pixies/Doolittle/Pixies%20-%20Mr.%20Grieves.mp3/
2004-12-19 11:43:53.7071 iTunes: normalized 
file://localhost//Spirit/mp3/Pixies/Doolittle/Pixies%20-%20Mr.%20Grieves.mp3/ 
to file:///Spirit/mp3/Pixies/Doolittle/Pixies%20-%20Mr.%20Grieves.mp3
2004-12-19 11:43:53.7079 iTunes: file not 
found: /Spirit/mp3/Pixies/Doolittle/Pixies - Mr. Grieves.mp3

KDF indicated that the problem was around the normalization of the filename--
and that I could switch to using mapped drives.  I can do that, but it will 
require reimporting all my music into iTunes, so I thought I'd see whether 
there was an easy fix that you could make at the server end to support UNC 
paths.

Thanks.

-dave
Comment 1 Scott Russell 2004-12-26 21:42:10 UTC
I have a similar config here that I've been using since slimserver 5.1.x. Early
versions required a patch but since about version 5.3.x this config just works.

The main difference between what you describe and what I setup is that
playlists, music, and the iTunes library are all on one share. BTW, I thought I
was the only one doing this odd ball config :)

On the linux box which runs slimserver and holds the iTunes library and music I
have setup the following (Dirs have / after them) and exported it as a SMB share
named 'music':

/music/ (<-- share this in /etc/samba/smb.conf as 'music')
|-- iTunes 4 Music Library
|-- iTunes Music/
|-- iTunes Music Library.xml
`-- playlists/

If I look at my iTunes Music Library.xml file I noticed the song paths were as
such: file://localhost/Volumes/music/iTunes%20Music/... so I set a symlink to
allow the slimserver to correctly map songs found in the iTunes database: 

  mkdir /Volumes; ln -s /music /Volumes/music;

My slimserver 5.4.0 has the following options set:

Home / Server Settings:
  iTunes: Use iTunes
  Music Folder: /Volumes/music
  Playlists: /music/playlists (make sure this is owned by slimserver for rw)

Home / Server Settings / iTunes:
  Find iTunes Library Automatically: Find iTunes Library Automatically
  iTunes Music Library.xml Location: /Volumes/music/iTunes Music Library.xml
  iTunes Music Folder: /Volumes/music/iTunes Music

On my Mac OS X clients I use iTunes with the default settings. I ended up using
the terminal to remove ~/Music/iTunes and creating a symlink from /Volumes/music
to ~/Music/iTunes. Now when iTunes starts it follows the symlink from
~/Music/iTunes to the mounted music share at /Volumes/music which contains the
folder structure above. 

If I attempt to start iTunes while the music share is not mounted iTunes gives
an error that creating the iTunes Library failed because the symlink is not
valid. (This is a good thing). By having the iTunes Music Library, the iTunes
Music folder, and the slimserver playlists folder on the same share all the
iTunes clients easily stay in sync with one another.

As a solution for your problem try this:

1) mkdir /Spirit
2) ln -s /home/mp3 /Spirit/mp3

BTW, I found that with iTunes on OS X if it finds the iTunes Music Folder it
will automaticly recreate a missing iTunes Music Library database by scanning
the iTunes Music Folder contents. You'll loose any iTunes playlists however.
Comment 2 Blackketter Dean 2005-01-03 16:04:03 UTC
Dave: This should already work, but SlimServer is running in the background as a user that may not 
have access to your shared volume.  Check out http://www.slimdevices.com/
su_faq.html#troubleshooting-sharedvolume

and reopen the bug if this doesn't address your issue.
Comment 3 Chris Owens 2006-06-16 14:42:30 UTC
There are 536 bugs in the database with targets of '---' that were fixed prior to new year 2006.  I am setting them to targets of 6.2.1 to keep them from showing up in my queries.
Comment 4 Chris Owens 2008-12-18 11:52:44 UTC
Routine bug db maintenance; removing old versions which cause confusion.  I apologize for the inconvenience.