Commit e84b8ed1 authored by Geoffrey Métais's avatar Geoffrey Métais

Thread playlist saving in DB

parent 455a98c5
......@@ -114,6 +114,8 @@ public class SavePlaylist extends DialogFragment implements AdapterView.OnItemCl
}
private void savePlaylist() {
new Thread(new Runnable() {
public void run() {
final MediaDatabase db = MediaDatabase.getInstance();
final String name = mEditText.getText().toString().trim();
if (db.playlistExists(name))
......@@ -124,6 +126,8 @@ public class SavePlaylist extends DialogFragment implements AdapterView.OnItemCl
mw = mTracks.get(i);
db.playlistInsertItem(name, i, mw.getLocation());
}
}
}).start();
dismiss();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment