title: Android:Deleting duplicates from Playlist
body: <p>I'm trying to remove duplicate songs from a playlist. This is the code which I'm using to remove a song from playlist.</p>
  
  <pre><code>public static void removeFromPlaylist(final Context context, final long id,
              final long playlistId) {
          final Uri uri = MediaStore.Audio.Playlists.Members.getContentUri("external", playlistId);
          final ContentResolver resolver = context.getContentResolver();
          int del = resolver.delete(uri, Playlists.Members.AUDIO_ID + " = ? ", new String[] {
              Long.toString(id)
          });
          Log.e("DeleteFromPlaylist",""+del);
      }
  </code></pre>
  
  <p>But the problem here is that it'll remove all the songs. Let's say I added 'SongOne' 3 times in a playlist Playlist1. When I do remove 'SongOne' should be removed only once, but here all the 3 'SongOne' gets removed. I get '3' in the Log. So what modifications should i do to the code such that <code>ContentResolver.delete()</code> deletes only once?</p>
  
  <p>Thanks!</p>