23rd May 2005 at 12:46 pm #60
ok. Feedback as requested.
– Linux FileServer with a Music folder containing all the .mp3’s.
– Windows XP machines running iTunes containing the master versions of all the .mp3’s.
– I run a windows program to synch Adds/Changes/Deletes to the FileServer on request.
Here is what I did:
1. Downloaded and built the latest nightly.
2. Copied the iTunes xml file with some test smart playlists into the root music folder on the server.
3. Ran mt-daapd, noticed that it upgraded the db from v4 to v5.
4. MusicServer appears in iTunes in Windows (hooray!)…the new Smart Playlists also appear (double hooray!).
Here is a .dump of the Playlists table:
INSERT INTO playlists VALUES(1,'Library',1,4119,1,0,NULL,0);
INSERT INTO playlists VALUES(2,'Favorite',1,0,'rating > 79',0,NULL,0);
INSERT INTO playlists VALUES(3,'Favorite',1,0,'rating > 79',0,NULL,0);
INSERT INTO playlists VALUES(4,'Mash Up',3,0,NULL,1116825457,'/mnt/hdd1/iTunes/iTunes Music Library.xml',12961);
INSERT INTO playlists VALUES(5,'My Top Rated',3,0,NULL,1116825457,'/mnt/hdd1/iTunes/iTunes Music Library.xml',8286);
INSERT INTO playlists VALUES(6,'Recently Added',3,0,NULL,1116825457,'/mnt/hdd1/iTunes/iTunes Music Library.xml',8520);
INSERT INTO playlists VALUES(7,'Recently Played',3,0,NULL,1116825457,'/mnt/hdd1/iTunes/iTunes Music Library.xml',8458);
INSERT INTO playlists VALUES(8,'Song contains "the"',3,0,NULL,1116825457,'/mnt/hdd1/iTunes/iTunes Music Library.xml',13109);
INSERT INTO playlists VALUES(9,'Top 25 Most Played',3,0,NULL,1116825457,'/mnt/hdd1/iTunes/iTunes Music Library.xml',8430);
INSERT INTO playlists VALUES(10,'untitled playlist',3,0,NULL,1116825457,'/mnt/hdd1/iTunes/iTunes Music Library.xml',12669);
INSERT INTO playlists VALUES(11,'untitled playlist 2',3,0,NULL,1116825457,'/mnt/hdd1/iTunes/iTunes Music Library.xml',12813);
(the last 2 playlists are manual ones)
Now we hit a snag…selecting any of the playlists associated with the server results in no files being displayed. I assume there must be something funky in my setup (i.e. it appears that if I manually add a playlist into the songs.db the files don’t appear either).
Thinking about it I’m personally not too worried about iTunes xml parsing (Everyone runs their own iTunes in this house and I would have to merge the playlists from the whole family to appear in the server).
I’m away on business this week so working out why the songs don’t appear will have to wait a while. Maybe I’ll play around and think about how to write a web page that would insert apple-style smart playlist records into the songs.db.
p.s. When the database gets Rescanned, do you reprocess the Playlists file (i.e. add in any new ones added to the db) or are they only processed on load?23rd May 2005 at 12:53 pm #3333
I tell a lie…
A smart playlist manually inserted into song.db does work – I just tried it.24th May 2005 at 6:37 am #3334
ok. If I understand the other posts correctly, I shouldn’t expect to be able to hit an mt-daapd imported xml playlist and see the corresponding files on my music server, because the server only has a copy of the files and the xml file was build against the remote master.
The good news is that a manually created smart playlist inserted into the songs.db file does pick up the files.
The long term goal is to get the music files from all my users (i.e. family members) onto the server, where I know it is backed up and secure. In order to do this I have to have a way to tag the files by family member and build default playlists for each of them so that they don’t stumble onto songs they don’t like.
Because I intend to ruthlessly strip the files from the local machines on a regular basis I therefore need a way to build playlists on the server. Unless Apple start allowing playlist creation (and cd burning etc.) against a networked library (which I doubt), I’m going to have to do something on the server side to allow them to create their own server smart playlists.
I’m sure someone must have started to build an iTunes clone that works on the web. I’ll start looking…24th May 2005 at 7:51 am #3335velocipedParticipant
I think this is just the sort of situation for which Ron was soliciting feedback when he added the note to the 20050518 snapshot stating:
I need to hear from people using the iTunes XML stuff against windows iTunes xml files… please report your experiences in the forums.
If I understand Mark’s (spring87) post, he took a gander at the content of the XML file and it contains Windows paths to the files. Since the daemon is running on a Linux box, it may be reading the structure of the playlist, but is unable to locate the files given that they are indicating a path such as M:somepathtoiTunesiTunes Music<song>, while on the server it is expecting something like ~/home/music/<song>.
My guess is that this will persist as an issue on Windows boxes in situations where the library is either stored on a remote volume or mirrored to a remote volume with the playlists having been created under Windows.
Mine is a situation not unsimilar to Mark’s in that I store my library on a centralized server and manage it from a desktop in another part of the house. The difference being that the daemon is running on a Darwin box and managed from a Darwin box. So, the file paths are very similar. In fact, looking at the XML file reveals that the path is designated as file://localhost/Volumes/path/to/music/library/<song>. No matter what system is used, the path will always be the same — relatively speaking.
Unless Ron has an alternate solution, I think the only way to address this is to have some sort of on-the-fly conversion script which will take the “mp3_dir” path and substitute it for the path listed in the XML file at the point where they intersect. That is simply a stab in the dark; not even sure if it is doable. Alternaively, if there was a means of making the path relative, rather than absolute, it might be feasible to go that route. I am not sure.
WRT your lamentation, “Unless Apple start allowing playlist creation…against a networked library…” This is already possible by means described elsewhere in the forum (and soon to be a HowTo in the wiki :-). One simply needs to mount the library tree as a volume locally, point iTunes to that directory as the “iTunes Music folder location” in the Advanced tab and manage the files as if they were local (e.g. altering ID3 tag data, creating playlists, burning disks, etc).
Herman24th May 2005 at 7:55 am #3336rpeddeParticipant
Can you the the following info for me?
1. Absolute path of the iTunes Music Library.xml
2. The value of “Music Folder” in your iTunes Music Library.xml (should be one of the first lines)
WRT the playlist editing… yes, a web-based playlist editor (for both static and “smart” playlists) will be provided.
Also, an xml-rpc interface will be (is already!) available. It is being documented here: http://wiki.mt-daapd.org/index.php?title=XML_Client_API
i hope to expose all configuration info, as well as playlist info and browse/search info. So ideally you could write your own iTunes via xml-rpc, including the ability to manage playlists and everything.
It will be possible to hit the database directly, too, although there might be some locking problems… During full scans, the database is held in a transaction, which locks the database until the scan is done.
It might be worth having a configuration option to not use transactions if someone had a third-party client that hit the DB directly via php or something.
Anyway, yeah… I want to encourage everyone to write their own interfaces to the thing — that’s one of the nice things about having an open format backend database.
— Ron24th May 2005 at 8:41 am #3337
Thanks for the response.
WRT your lamentation, “Unless Apple start allowing playlist creation…against a networked library…” …One simply needs to mount the library tree as a volume locally, point iTunes to that directory as the “iTunes Music folder location” in the Advanced tab and manage the files as if they were local (e.g. altering ID3 tag data, creating playlists,
burning disks, etc).
If I understand you correctly I tried this once. As I recall, it worked fine for one user but when two or more machines were setting the music library as the master there was no way to synch up the individual local .xml files between users.
I’m still working on the process to move local files to the server…but it involves:
24th May 2005 at 9:24 am #3338
- Copy user music files from to a temporary folder on my own xp machine
- Importing them into my iTunes managed Master library where I clean up the tags etc.
- Synching the adds/changes/deletes to the Linux MusicServer
Can you the the following info for me?
1. Absolute path of the iTunes Music Library.xml
2. The value of “Music Folder” in your iTunes Music Library.xml (should be one of the first
I’m afraid I’m travelling this week so I won’t have access to the files until next monday.
When I get some time, I’ll play with the xml client interface – it looks really good. I’m (happily) committed to mt-daapd: the boss likes iTunes, so she won’t be persuaded to change and I’m impressed with the way mt-daapd is evolving.
Keep up the good work and don’t do anything that could lock out future goodies: CD Burning, iPod/Shuffle integration…and video.
- The forum ‘General Discussion’ is closed to new topics and replies.