simplify queueDataSource method
This commit is contained in:
parent
f2c3a1f51f
commit
12443be2ce
1 changed files with 1 additions and 4 deletions
|
|
@ -136,14 +136,11 @@ public class MultiPlayer implements Playback {
|
|||
|
||||
@Override
|
||||
public void queueDataSource(Song song) {
|
||||
String path = MusicUtil.getSongFileUri(song);
|
||||
while (mediaSource.getSize() > 1) {
|
||||
mediaSource.removeMediaSource(1);
|
||||
}
|
||||
|
||||
if (mediaSource.getSize() != 2) {
|
||||
appendDataSource(path);
|
||||
}
|
||||
appendDataSource(MusicUtil.getSongFileUri(song));
|
||||
}
|
||||
|
||||
private void appendDataSource(String path) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue