/// <summary>
        /// Adds some tracks to an iTunes playlist.
        /// </summary>
        /// <param name="playlist">The playlist to modify</param>
        /// <param name="playlistLines">The tracks to add to iTunes as represented by their device location.</param>
        /// <param name="searchHint">
        /// A playlist folder to look in. This will reduce the search time.
        /// This only works under the assumption that all music that can possibly be on the device are under this folder.
        /// Use "Music" to search all songs.
        /// </param>
        /// <param name="root">The root device path used to generate device location. This should be the same root used to generate "playlistLines"</param>
        /// <returns>An enumeration of all songs that were successfully added to the playlist.</returns>
        public IEnumerable<string> AddTracks(IPlaylist playlist, IEnumerable<string> playlistLines, ISubscription subscription, string root)
        {
            List<string> addedTracks = new List<string>();

            IITUserPlaylist targetPlaylist = playlistLookupTable[playlist.GetSafeName()] as IITUserPlaylist;

            if (targetPlaylist == null) return addedTracks;

            var subscribedTracks = GetSubscribedTracks(subscription);

            foreach (var line in playlistLines)
            {
                foreach (var iTrack in subscribedTracks)
                {
                    if (line != iTrack.GetPlaylistLine(root)) continue;

                    targetPlaylist.AddTrack(iTrack);
                    addedTracks.Add(line);
                    break;
                }
            }

            return addedTracks;
        }
        /// <summary>
        /// Remove some tracks from an iTunes playlist.
        /// </summary>
        /// <param name="playlist">The playlist to modify</param>
        /// <param name="tracks">The tracks to remove from playlist.</param>
        /// <returns>An enumeration of tracks that were successfully removed from playlist.</returns>
        public IEnumerable<ITrack> RemoveTracks(IPlaylist playlist, IEnumerable<ITrack> tracks)
        {
            List<ITrack> removedtracks = new List<ITrack>();

            IITPlaylist pls = playlistLookupTable[playlist.GetSafeName()];

            foreach (IITTrack iTunesTrack in pls.Tracks)
            {
                if (!(iTunesTrack is IITFileOrCDTrack)) continue;
                IITFileOrCDTrack _item = (IITFileOrCDTrack)iTunesTrack;

                foreach (var track in tracks.Where(track => track.Location == _item.Location))
                {
                    removedtracks.Add(track);
                    iTunesTrack.Delete();
                    break;
                }
            }

            return removedtracks;
        }