2010-11-08, 23:19
Hello all,
I'm using XBMC with many mac in my house, XBMC use itunes directory to play music, It works like a charm.
But the support of playlists was missing.
I've made an addon which parse itunes library and export all playlist in many m3u files, and put them in the playlist directory of XBMC, so no additionnal actions needed.
1) put the folder script.itunes2m3u to XBMC/addons folder / or import by zip file with XBMC.
2) In the addon configuration, select the library file
the 2 other settings about old path / new path are optional
=== Your songs are not in the same location than iTunes think ===
I had a problem with my script, because iTunes think that each file are stored to "c:\Document and Settings\user\Music\iTunes Media\" but from my XBMC computer, music are accessible through another path wich is "smb:\\windows_computer\my_network_share\iTunes Media\".
If I did not changed the path to my music, playlist will not played because songs will not be found, So I create a "replace" function, which will parse all songs path and change "old path" to the "new path"
so, if the path to music files referenced in the library.xml is not the right one (point of view from computer running XBMC), then the script can replace the "old path" to the "new path".
3)In the addon configuration, select the new path to your music files
4) In the addon configuration, enter the old path which need to be converted
ex : I'm running XBMC under linux, my music files are located in my windows computer, my iTunes library too.
the location of each music will not be "c:\Document and Settings\user\Music\iTunes Media\Black eyes Peas.mp3" (as iTunes think) but "smb:\\windows_computer\my_network_share\iTunes Media\Black eyes Peas.mp3"
here :
- old path : "c:\Document and Settings\user\Music\" (have to be typed manually)
- new path : "smb:\\windows_computer\my_network_share\" (wich have to be browseabe, cause your XBMC installation should have access to)
=== Running ===
And then you can run the script, wait few seconds (depending of your processor&library size)
Your playlists should be created, you can use them directly in XBMC music -> playlist
some thinks are taken from http://granades.com/2009/01/02/convertin...playlists/
here is the repository, I don't know how to add to the main repository.
http://code.google.com/p/itunestom3u/
please send me any modification or post them to the repository !
===== how it works =====
- itunes library is a file where songs are associated with an unique number ID and an absolute location (and other things), and playlist are composed of a name and all unique ID song concerned.
- a m3U playlist is just a list of music file path
a librarie (plistloader) take care of understanding/working with iTunes library as of the apple standard.
my librarie (xmltom3u) parse the entire iTunes library, associate playlist with files, and creates playlists files.
my XBMC python script (addon.py) just interface library to XBMC (path selection, description, XBMC things, put playlists in the default XBMC playlist folder, ...)
=== What could be not working / I've no tested ===
- running under mac OS / Windows
- import via Zip file from XBMC
- in another version than last dharma / SVN
- local music & library
=== my working situation ===
XBMC SVN compiled at 28-10-10 running under ubuntu 10.10
iMac OSX 10.6 with itunes 10, the iTunes folder is Shared
iTunes is ordering the music automatically (all music files in local iTunes Media)
if it's working in these non-tested cases, tell me !
I'm using XBMC with many mac in my house, XBMC use itunes directory to play music, It works like a charm.
But the support of playlists was missing.
I've made an addon which parse itunes library and export all playlist in many m3u files, and put them in the playlist directory of XBMC, so no additionnal actions needed.
1) put the folder script.itunes2m3u to XBMC/addons folder / or import by zip file with XBMC.
2) In the addon configuration, select the library file
the 2 other settings about old path / new path are optional
=== Your songs are not in the same location than iTunes think ===
I had a problem with my script, because iTunes think that each file are stored to "c:\Document and Settings\user\Music\iTunes Media\" but from my XBMC computer, music are accessible through another path wich is "smb:\\windows_computer\my_network_share\iTunes Media\".
If I did not changed the path to my music, playlist will not played because songs will not be found, So I create a "replace" function, which will parse all songs path and change "old path" to the "new path"
so, if the path to music files referenced in the library.xml is not the right one (point of view from computer running XBMC), then the script can replace the "old path" to the "new path".
3)In the addon configuration, select the new path to your music files
4) In the addon configuration, enter the old path which need to be converted
ex : I'm running XBMC under linux, my music files are located in my windows computer, my iTunes library too.
the location of each music will not be "c:\Document and Settings\user\Music\iTunes Media\Black eyes Peas.mp3" (as iTunes think) but "smb:\\windows_computer\my_network_share\iTunes Media\Black eyes Peas.mp3"
here :
- old path : "c:\Document and Settings\user\Music\" (have to be typed manually)
- new path : "smb:\\windows_computer\my_network_share\" (wich have to be browseabe, cause your XBMC installation should have access to)
=== Running ===
And then you can run the script, wait few seconds (depending of your processor&library size)
Your playlists should be created, you can use them directly in XBMC music -> playlist
some thinks are taken from http://granades.com/2009/01/02/convertin...playlists/
here is the repository, I don't know how to add to the main repository.
http://code.google.com/p/itunestom3u/
please send me any modification or post them to the repository !
===== how it works =====
- itunes library is a file where songs are associated with an unique number ID and an absolute location (and other things), and playlist are composed of a name and all unique ID song concerned.
- a m3U playlist is just a list of music file path
a librarie (plistloader) take care of understanding/working with iTunes library as of the apple standard.
my librarie (xmltom3u) parse the entire iTunes library, associate playlist with files, and creates playlists files.
my XBMC python script (addon.py) just interface library to XBMC (path selection, description, XBMC things, put playlists in the default XBMC playlist folder, ...)
=== What could be not working / I've no tested ===
- running under mac OS / Windows
- import via Zip file from XBMC
- in another version than last dharma / SVN
- local music & library
=== my working situation ===
XBMC SVN compiled at 28-10-10 running under ubuntu 10.10
iMac OSX 10.6 with itunes 10, the iTunes folder is Shared
iTunes is ordering the music automatically (all music files in local iTunes Media)
if it's working in these non-tested cases, tell me !