Skip to content

Commit

Permalink
Fix CUE problem for contextual menu
Browse files Browse the repository at this point in the history
  • Loading branch information
abarisain committed Nov 30, 2014
1 parent fd12d8f commit c7e6672
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion JMPDComm/src/main/java/org/a0z/mpd/MPD.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@ public void add(final FilesystemTreeEntry music, final boolean replace, final bo
throws IOException, MPDException {
final CommandQueue commandQueue = new CommandQueue();

commandQueue.add(MPDPlaylist.addCommand(music.getFullPath()));
if (music instanceof PlaylistFile) {
commandQueue.add(MPDPlaylist.loadCommand(music.getFullPath()));
} else {
commandQueue.add(MPDPlaylist.addCommand(music.getFullPath()));
}

add(commandQueue, replace, play);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ protected void add(final Item item, final boolean replace, final boolean play) {
final Directory toAdd = mCurrentDirectory.getDirectory(item.getName());
if (toAdd == null) {
mApp.oMPDAsyncHelper.oMPD.add((FilesystemTreeEntry) item, replace, play);
Tools.notifyUser(R.string.songAdded, item);
if (item instanceof PlaylistFile) {
Tools.notifyUser(R.string.playlistAdded, item);
} else {
Tools.notifyUser(R.string.songAdded, item);
}
} else {
// Valid directory
mApp.oMPDAsyncHelper.oMPD.add(toAdd, replace, play);
Expand Down

0 comments on commit c7e6672

Please sign in to comment.