Kodi Community Forum

Full Version: Itunes playlists
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there any way to get the iTunes playlists to load in xbmc? Ive searched everywhere and cant find them. Ive tried looking on google but all i seem to find is outdated plugins?.
What I'm wanting is to be able to select playlists that are synced from my iTunes library, and auto updated when I've made changes?
Im running openelec gotham and iTunes is running on a windows 8 pc on the network. The music loads fine its just the playlists?
Thanks guys!
I'm new to Kodi. I'm primarily using it for high res multichannel music (FLAC for audio only and MKV for concert videos) from an Intel NUC running OpenElec with Kodi beta 5 (was XBMC 13.2) with media on a Synology NAS.

I recently discovered I could use M3U playlists for both audio and video which solved my biggest wish list item. Works really well. There's almost no info about this that I could find. Your post made me start this reply which may end up being formalised...

iTunes can export to M3U playlist files, so this may be a solution. There may be others too.

It seems the playlist files must be located in your Kodi userdata/playlists folders to be seen my Kodi, not in your music media folders. (Not sure if there is any way to change this default location):

For OpenElec: /storage/.xbmc/userdata/playlists/music

The userdata folder location by OS below

Operating system: File path
Android: Android/data/org.xbmc.xbmc/files/.xbmc/userdata/
iOS: /private/var/mobile/Library/Preferences/XBMC/userdata/
Linux: ~/.xbmc/userdata/
Mac OS X: /Users/<your_user_name>/Library/Application Support/XBMC/userdata/
Windows: %APPDATA%\XBMC\userdata - press <Enter>

Also the path to the media files is not relative but absolute, meaning it needs the server name etc:

Absolute is a full path - example:
nfs:// Surround/Seventies Acoustic Greats/02. Rolling Stones - Wild Horses.flac

Relative would be my playlist located in this folder: nfs:// Surround and my playlist text:
Seventies Acoustic Greats/01. America - Ventura Highway.flac
Seventies Acoustic Greats/02. Rolling Stones - Wild Horses.flac

The absolute path requirement means I can't use my current free Playlists program (Windows Playlist Creator 3.6.2). I need to edit the playlists after - replace windows paths with Nfs paths. Then copy to the OpenElec folders on my NUC. Pretty horrible workaround really. BUT it works!

Example 1: An M3U Playlist file exported from ITunes with Windows paths to my iTunes files:

#EXTINF:185,A Horse With no Name - America
G:\Users\HomerJau\Music\iTunes\iTunes Media\Music\America\History_ America's Greatest Hits (CD)\01. A Horse With no Name.m4a
#EXTINF:185,I Need You - America
G:\Users\HomerJau\Music\iTunes\iTunes Media\Music\America\History_ America's Greatest Hits (CD)\02. I Need You.m4a
#EXTINF:248,Sandman - America
G:\Users\HomerJau\Music\iTunes\iTunes Media\Music\America\History_ America's Greatest Hits (CD)\03. Sandman.m4a
#EXTINF:202,Ventura Highway - America
G:\Users\HomerJau\Music\iTunes\iTunes Media\Music\America\History_ America's Greatest Hits (CD)\04. Ventura Highway.m4a

Example 2: A working M3U file in Kodi with paths changed to my Synology NFS paths:

nfs:// Surround/Seventies Acoustic Greats/01. America - Ventura Highway.flac
nfs:// Surround/Seventies Acoustic Greats/02. Rolling Stones - Wild Horses.flac
nfs:// Surround/Seventies Acoustic Greats/03. Pink Floyd - Fearless.flac
nfs:// Surround/Seventies Acoustic Greats/04. ELP - From The Beginning.flac
nfs:// Surround/Seventies Acoustic Greats/05. Neil Young - Heart Of Gold.flac

I am thinking about writing a small app for Windows that will automate this. Allow me to select music files to create a playlist from my win desktop then save to OpenElec device with correct paths for Kodi.

Ideally Kodi would require an enhancement to support 'Relative paths' from Playlist files on my Media drives.

I am talking to the developer of an iPad Music Remote app about support for relative paths!! Then my Playlist Creator will work unchanged with no copying of files to my NUC.
I found something interesting on Kodi path substitution which may help although it means making or editing an xml file: advancedsettings.xml

It appears from the docs below Kodi will handle the substitution automatically which should solve the path issue in my last post although there is not way I know for a user to make the following settings from the a UI. It requires direct file edits which is not ideal for non tech users. Maybe Kodi Settings UI needs to include this option in a future update.

Docs from Kodi website on advancedsettings.xml and pathsubstitution:

Note: The advancedsettings.xml file does not exist by default. You have to create it first!
The advancedsettings.xml file, which does not exist by default, can be created by a user in their userdata folder. This file is used for advanced settings and options that do not have GUI controls inside of XBMC. Some settings are experimental or very rarely set, so they can only be used via the advancedsettings.xml file. The file is simply a plain text file and can be edited by various text editors, so long as the name is "advancedsettings.xml". These advanced settings can be used to tweak various things such as episode naming patterns, special network ports, special behaviors, and more.

The following page will describe the structure of the advancedsettings.xml file and the various individual settings.
All XML tags must be lowercase. The start and end of the advancedsettings.xml file must have the <advancedsettings> and </advancedsettings> tags.

XBMC will only read the advancedsettings.xml file when it starts up. If you make changes while XBMC is running then you must restart XBMC.

For some Windows versions, XBMC has two \userdata\ folders. The correct one to put the advancedsettings.xml file in is not the one in Program Files, but in %appdata%\XBMC\userdata\.

2.9.3 pathsubstitution
Path substitutions are for use for redirecting file paths. These are processed in order, and are useful for substituting an absolute path on a PC with a path suitable for XBMC to handle.
Default: No path substitutions defined.
<to>smb://somecomputer/g-share/dvds/</to> <!-- Note the difference between the usage of forward and backslashes -->

So to get ITunes playlists to work in Kodi/XBMC:

Export your iTunes playlists to mu3 files

Copy files unedited to the Kodi/XBMC userdata/playlists/music folder

Create or edit the advancedsettings.xml file in userdata folder

Add a new pathsubstitution setting with your Windows iTunes library file path and the network file path to allow auto path substitution.
HomerJau thanks for the useful info. I'm new to Kodi and was trying to get Windows playlists to play. I used Notebook+ replace characters to edit the playlist song paths but I didn't put the playlist in the right folder. I'm using SMB rather than NFS to access content on my Windows machine. Maybe later I'll create the advance settings file. It should be easier.