=== src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod.mdp
==================================================================
--- src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod.mdp	(revision 81)
+++ src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod.mdp	(revision 82)
@@ -13,6 +13,7 @@
     <File name="./IpodDap.cs" subtype="Code" buildaction="Compile" />
     <File name="./IpodDapTrackInfo.cs" subtype="Code" buildaction="Compile" />
     <File name="./UnsupportedDatabaseView.cs" subtype="Code" buildaction="Compile" />
+    <File name="./IPodPlaylistSource.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Project" localcopy="False" refto="Banshee.Widgets" />
@@ -20,5 +21,6 @@
     <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
     <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
+    <ProjectReference type="Assembly" localcopy="True" refto="../../../../ipod-sharp/src/ipod-sharp.dll" />
   </References>
 </Project>
\ No newline at end of file
=== src/Dap/Banshee.Dap.Ipod/IPodPlaylistSource.cs
==================================================================
--- src/Dap/Banshee.Dap.Ipod/IPodPlaylistSource.cs	(revision 81)
+++ src/Dap/Banshee.Dap.Ipod/IPodPlaylistSource.cs	(revision 82)
@@ -0,0 +1,156 @@
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using Banshee.Dap;
+using Banshee.Sources;
+using Banshee.Base;
+using IPod;
+
+
+namespace Banshee.Dap.Ipod
+{
+	
+	
+	public class IPodPlaylistSource : DapPlaylistSource
+	{
+		private IpodDap device;
+		public Playlist iplist;
+        public IPodPlaylistSource(DapDevice device, string name) : base(device, name)
+        {
+            this.device = (IpodDap) device;
+           // this.ipodList = this.device.Device.TrackDatabase.LookupPlaylist(name);
+            //if (this.ipodList == null)
+			//	return;           
+           // 	this.ipodList = this.device.Device.TrackDatabase.CreatePlaylist(name);
+            foreach (Track t in this.iplist.Tracks){
+            	IpodDapTrackInfo i = new IpodDapTrackInfo(t);
+            	AddTrack( (TrackInfo) i);
+            }
+            //foreach (TrackInfo in Banshee.Sources.PlaylistSource.Playlists.GetEnumerator )
+          
+        }
+
+		public IPodPlaylistSource(DapDevice device, IEnumerable<TrackInfo> list, string name) : base(device, name)
+        {
+            this.device = (IpodDap) device;
+           // this.ipodList = this.device.Device.TrackDatabase.LookupPlaylist(name);
+            //if (this.ipodList == null)
+			//	return;           
+           // 	this.ipodList = this.device.Device.TrackDatabase.CreatePlaylist(name);
+           if (list == null)
+           		return;
+            foreach (TrackInfo t in list){
+            	AddTrack (t);
+            }
+            //foreach (TrackInfo in Banshee.Sources.PlaylistSource.Playlists.GetEnumerator )
+          
+        }
+        public override void AddTrack(TrackInfo track)
+        {
+            if (track == null)
+            	return;
+            Console.WriteLine ("Track Added to internal playlist " + track.ToString());
+            IpodDapTrackInfo itrack = new IpodDapTrackInfo(track, device.Device.TrackDatabase);
+            
+            if (itrack.Track == null)
+            	foreach(Track track2 in device.Device.TrackDatabase.Tracks) {
+		    		Console.WriteLine ("Comparing: " + track + " to " + track2);
+		    		if (!TrackSongCompare (track, track2))
+						continue;
+		    		Console.WriteLine ("Adding: " + track2);
+		   		 iplist = device.Device.TrackDatabase.LookupPlaylist (this.Name);
+	            if ( iplist != null){
+	            	if (iplist.Tracks.Contains (itrack.Track)){
+	            		Console.WriteLine ("Track already in playlist");
+	            		return;
+	            	}
+	         
+	           		iplist.AddTrack(track2);
+	            	base.AddTrack(track);
+	            	Console.WriteLine("Track was added to an existing playlist");
+	            	return;
+	            }
+	            iplist = device.Device.TrackDatabase.CreatePlaylist (this.Name);
+	            Console.WriteLine("Created a new playlist");
+	            Console.WriteLine(iplist.Name + " " + itrack + " " + itrack.Track);
+	          
+	            iplist.AddTrack (track2);
+	            base.AddTrack(track);
+	            Console.WriteLine("Track added");
+					}
+            
+            //IpodDapTrackInfo itrack = new IpodDapTrackInfo(track,device.Device.TrackDatabase);
+          	//Console.WriteLine("Adding track: " + itrack.ToString());
+          
+            //ipodList.AddTrack(itrack.Track);
+            
+             // Console.WriteLine("Now calling base for: " + track.ToString());
+        }
+//        
+//        public  void ClearTracks(){
+//        	base.ClearTracks();
+//        	//ipodList.Clear();
+//        }
+//        
+//        public override void RemoveTrack(TrackInfo track){
+//        	base.RemoveTrack(track);
+//        	//IpodDapTrackInfo itrack = new IpodDapTrackInfo(track,device.Device.TrackDatabase);
+//        	
+//        	//ipodList.RemoveTrack(  itrack.Track );
+//         	
+//            
+//        }
+        
+//        public override void Commit (){
+//        	//device.Device.TrackDatabase.Playlists.Clear();
+////        	foreach (TrackInfo ti in this.Tracks){
+////        		device.Device.TrackDatabase.Playlists.Add(  (new IpodDapTrackInfo(ti, device.Device.TrackDatabase).Track ));
+////        	}
+//			//device.Device.TrackDatabase.RemovePlaylist(this.ipodList);
+//        	Playlist iplay = device.Device.TrackDatabase.CreatePlaylist(this.Name); 
+//        	foreach (TrackInfo ti in this.Tracks){
+//        		iplay.AddTrack( (new IpodDapTrackInfo(ti,device.Device.TrackDatabase)).Track );
+//        	}
+//        	device.Device.TrackDatabase.Save();
+//        	Console.WriteLine(device.Device.TrackDatabase.Playlists.Count);
+//        }
+        public override void SourceDrop(Banshee.Sources.Source source)
+        {
+            if(source == this || source == null || !(source is AbstractPlaylistSource)) {
+                return;
+            }
+            if (source.Tracks == null)
+            	return;
+            foreach(TrackInfo track in source.Tracks) {
+            	Console.WriteLine(track.ToString());
+                AddTrack(track);
+            }
+        }
+        
+        
+		private string ToLower(string str)
+		{
+            return str == null ? null : str.ToLower();
+		}
+
+        private bool TrackSongCompare(TrackInfo a, Track b)
+        {
+            Console.WriteLine ("Comparing " + a + " to " + b);
+            return ToLower(a.Title) == ToLower(b.Title) &&
+                ToLower(a.Album) == ToLower(b.Album) &&
+                ToLower(a.Artist) == ToLower(b.Artist) &&
+                a.Year == b.Year &&
+                a.TrackNumber == b.TrackNumber;
+        }
+
+//
+//         public override object TracksMutex {
+//            get { return ((IList)tracks).SyncRoot; }
+//        }
+//		public int CompareTo (object o){
+//			IPodPlaylistSource temp = (IPodPlaylistSource) o;
+//			return this.Name.CompareTo(temp.Name);
+//		}
+	}
+}
=== src/Dap/Banshee.Dap.Ipod/IpodDap.cs
==================================================================
--- src/Dap/Banshee.Dap.Ipod/IpodDap.cs	(revision 81)
+++ src/Dap/Banshee.Dap.Ipod/IpodDap.cs	(revision 82)
@@ -35,10 +35,12 @@
 using Gtk;
 using Hal;
 using IPod;
+using System.Collections.Generic;
 
 using Banshee.Base;
 using Banshee.Dap;
 using Banshee.Widgets;
+using Banshee.Sources;
 
 public static class PluginModuleEntry
 {
@@ -55,13 +57,13 @@
     [DapProperties(DapType = DapType.NonGeneric, PipelineName="Ipod")]
     [SupportedCodec(CodecType.Mp3)]
     [SupportedCodec(CodecType.Mp4)]
-    public sealed class IpodDap : DapDevice
+    public sealed class IpodDap : DapDevice, IPlaylistCapable
     {
         private IPod.Device device;
         private Hal.Device hal_device;
         private bool database_supported;
         private UnsupportedDatabaseView db_unsupported_container;
-    
+    	private System.Collections.Generic.List <IPodPlaylistSource> playlists = new System.Collections.Generic.List<IPodPlaylistSource> ();
         public override InitializeResult Initialize(Hal.Device halDevice)
         {
             hal_device = halDevice;
@@ -204,6 +206,19 @@
                     IpodDapTrackInfo ti = new IpodDapTrackInfo(track);
                     AddTrack(ti);            
                 }
+                playlists.Clear();
+                device.TrackDatabase.Save();
+                foreach(Playlist play in device.TrackDatabase.Playlists){
+                	PlaylistSource ps = new PlaylistSource( play.Name);
+       				foreach (Track t in play.Tracks){
+       					ps.AddTrack( new IpodDapTrackInfo(t));
+       				}
+                	AddPlaylist(ps);
+                }
+//                foreach (PlaylistSource ps in Banshee.Sources.PlaylistSource.Playlists){
+//					AddPlaylist (ps);
+//				}
+                
             } else {
                 BuildDatabaseUnsupportedWidget();
             }
@@ -238,7 +253,15 @@
                     track.Track.Uri = new Uri(track.Uri.AbsoluteUri);
                 }
             }
-            
+//            foreach (Playlist p in (new System.Collections.Generic.List<Playlist> (device.TrackDatabase.Playlists)))
+//            	device.TrackDatabase.RemovePlaylist(p);
+            	
+//            foreach (IPodPlaylistSource ips in playlists){
+//				if( ips != null && ips.iplist != null)
+//					CommitPlaylistToDevice(ips);
+//					
+//			}
+			
             device.TrackDatabase.SaveProgressChanged += delegate(object o, TrackSaveProgressArgs args)
             {
                 double progress = args.CurrentTrack == null ? 0.0 : args.TotalProgress;
@@ -248,7 +271,8 @@
                     
                 UpdateSaveProgress(Catalog.GetString("Synchronizing iPod"), message, progress);
             };
-
+			
+			
             try {
                 device.TrackDatabase.Save();
             } catch(Exception e) {
@@ -454,7 +478,24 @@
             }
         }
         
-        internal IPod.Device Device {
+        public DapPlaylistSource AddPlaylist(Source playlist){
+        	foreach (TrackInfo ti in playlist.Tracks){
+        		Console.WriteLine(ti.ToString() + " is in playlist " + playlist.Name);
+        	}
+       		IPodPlaylistSource iplay = new IPodPlaylistSource( this, playlist.Tracks, playlist.Name );
+//        	if( playlists.Contains(iplay) )
+//        			playlists.Remove(iplay);
+//        	playlists.Add(iplay);
+        	
+        	return (DapPlaylistSource) iplay;
+        }
+        
+//        private void CommitPlaylistToDevice (IPodPlaylistSource playlist){
+//        	Console.WriteLine(playlist.Name);
+//        	playlist.Commit();
+//        	//device.TrackDatabase.Save();
+//        }
+        public IPod.Device Device {
             get {
                 return device;
             }
=== src/Dap/Banshee.Dap.Ipod/Makefile.am
==================================================================
--- src/Dap/Banshee.Dap.Ipod/Makefile.am	(revision 81)
+++ src/Dap/Banshee.Dap.Ipod/Makefile.am	(revision 82)
@@ -8,7 +8,8 @@
 	$(srcdir)/IpodDap.cs \
 	$(srcdir)/IpodDapTrackInfo.cs \
 	$(srcdir)/UnsupportedDatabaseView.cs \
-	$(srcdir)/DatabaseRebuilder.cs
+	$(srcdir)/DatabaseRebuilder.cs	\
+	$(srcdir)/IPodPlaylistSource.cs
 
 if ENABLE_IPOD
 bansheedapdir = $(pkglibdir)/Banshee.Dap
=== src/Core/Banshee.Base/banshee-core.schemas.in
==================================================================
--- src/Core/Banshee.Base/banshee-core.schemas.in	(revision 81)
+++ src/Core/Banshee.Base/banshee-core.schemas.in	(revision 82)
@@ -2,28 +2,40 @@
 <gconfschemafile>
   <schemalist>
     <schema>
-      <key>/schemas/apps/banshee/import/audio_cd_error_correction</key>
-      <applyto>/apps/banshee/import/audio_cd_error_correction</applyto>
+      <key>/schemas/apps/banshee/player_window/open_location_history</key>
+      <applyto>/apps/banshee/player_window/open_location_history</applyto>
       <owner>banshee</owner>
-      <type>bool</type>
-      <default>false</default>
+      <type>list</type>
+      <list_type>string</list_type>
+      <default>[]</default>
       <locale name="C">
-        <short>Enable error correction</short>
-        <long>When importing an audio CD, enable error correction (paranoia mode)</long>
+        <short>URI List</short>
+        <long>List of URIs in the history drop-down for the open location dialog</long>
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/banshee/import/show_initial_import_dialog</key>
-      <applyto>/apps/banshee/import/show_initial_import_dialog</applyto>
+      <key>/schemas/apps/banshee/player_window/last_file_chooser_uri</key>
+      <applyto>/apps/banshee/player_window/last_file_chooser_uri</applyto>
       <owner>banshee</owner>
-      <type>bool</type>
-      <default>true</default>
+      <type>string</type>
+      <default></default>
       <locale name="C">
-        <short>Show the Initial Import Dialog</short>
-        <long>Show the Initial Import Dialog when the Banshee library is empty</long>
+        <short>URI</short>
+        <long>URI of last file folder</long>
       </locale>
     </schema>
     <schema>
+      <key>/schemas/apps/banshee/core/io_backend</key>
+      <applyto>/apps/banshee/core/io_backend</applyto>
+      <owner>banshee</owner>
+      <type>string</type>
+      <default>unix</default>
+      <locale name="C">
+        <short>Set the IO backend in Banshee</short>
+        <long>Can be either "systemio" (.NET System.IO), "unix" (Native Unix), or "gnomevfs" (GNOME VFS); takes effect on Banshee start (restart necessary)</long>
+      </locale>
+    </schema>
+    <schema>
       <key>/schemas/apps/banshee/library/base_location</key>
       <applyto>/apps/banshee/library/base_location</applyto>
       <owner>banshee</owner>
@@ -134,6 +146,28 @@
       </locale>
     </schema>
     <schema>
+      <key>/schemas/apps/banshee/import/audio_cd_error_correction</key>
+      <applyto>/apps/banshee/import/audio_cd_error_correction</applyto>
+      <owner>banshee</owner>
+      <type>bool</type>
+      <default>false</default>
+      <locale name="C">
+        <short>Enable error correction</short>
+        <long>When importing an audio CD, enable error correction (paranoia mode)</long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/apps/banshee/import/show_initial_import_dialog</key>
+      <applyto>/apps/banshee/import/show_initial_import_dialog</applyto>
+      <owner>banshee</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+        <short>Show the Initial Import Dialog</short>
+        <long>Show the Initial Import Dialog when the Banshee library is empty</long>
+      </locale>
+    </schema>
+    <schema>
       <key>/schemas/apps/banshee/player_window/width</key>
       <applyto>/apps/banshee/player_window/width</applyto>
       <owner>banshee</owner>
@@ -233,40 +267,6 @@
       </locale>
     </schema>
     <schema>
-      <key>/schemas/apps/banshee/player_window/last_file_chooser_uri</key>
-      <applyto>/apps/banshee/player_window/last_file_chooser_uri</applyto>
-      <owner>banshee</owner>
-      <type>string</type>
-      <default></default>
-      <locale name="C">
-        <short>URI</short>
-        <long>URI of last file folder</long>
-      </locale>
-    </schema>
-    <schema>
-      <key>/schemas/apps/banshee/player_window/open_location_history</key>
-      <applyto>/apps/banshee/player_window/open_location_history</applyto>
-      <owner>banshee</owner>
-      <type>list</type>
-      <list_type>string</list_type>
-      <default>[]</default>
-      <locale name="C">
-        <short>URI List</short>
-        <long>List of URIs in the history drop-down for the open location dialog</long>
-      </locale>
-    </schema>
-    <schema>
-      <key>/schemas/apps/banshee/core/io_backend</key>
-      <applyto>/apps/banshee/core/io_backend</applyto>
-      <owner>banshee</owner>
-      <type>string</type>
-      <default>unix</default>
-      <locale name="C">
-        <short>Set the IO backend in Banshee</short>
-        <long>Can be either "systemio" (.NET System.IO), "unix" (Native Unix), or "gnomevfs" (GNOME VFS); takes effect on Banshee start (restart necessary)</long>
-      </locale>
-    </schema>
-    <schema>
       <key>/schemas/apps/banshee/player_engine/volume</key>
       <applyto>/apps/banshee/player_engine/volume</applyto>
       <owner>banshee</owner>
