Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nuclearfog committed Jul 25, 2024
1 parent 1b6c6cf commit ca6d000
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ synchronized void stop() {
if (mPlayer.initialized()) {
mPlayer.stop();
}
clearCurrentTrackInformation();
notifyChange(CHANGED_PLAYSTATE);
}

Expand Down Expand Up @@ -816,7 +815,6 @@ synchronized void setShuffleMode(int shufflemode) {
mPlayPos = 0;
mShufflePos = 0;
openCurrentAndNext();
play();
}
}
// setup queue shuffle
Expand Down Expand Up @@ -1158,7 +1156,6 @@ private void addToPlayList(long[] list, int position) {
private void updateTrackInformation() {
if (mPlayPos >= 0 && mPlayPos < mPlayList.size()) {
long trackId = mPlayList.get(mPlayPos);
clearCurrentTrackInformation();
Cursor cursor = CursorFactory.makeTrackCursor(this, trackId);
updateTrackInformation(cursor);
}
Expand All @@ -1170,7 +1167,6 @@ private void updateTrackInformation() {
* @param uri uri of the audio track
*/
private void updateTrackInformation(Uri uri) {
clearCurrentTrackInformation();
Cursor cursor = null;
// get information from MediaStore directly
if (uri.toString().startsWith(Media.EXTERNAL_CONTENT_URI.toString())) {
Expand Down Expand Up @@ -1273,9 +1269,8 @@ private void updateTrackInformation(@Nullable Cursor cursor) {
}
}


/**
*
* clear information about the current selected track
*/
private void clearCurrentTrackInformation() {
currentAlbum = null;
Expand All @@ -1295,6 +1290,8 @@ private void openCurrentAndNext() {
/**
* prepare current track of the queue for playback and update track information
* if an error occurs try the next tracks
*
* @return true if track was opened successfully
*/
private boolean openCurrentTrack() {
if (mPlayList.isEmpty() || mPlayPos < 0) {
Expand Down Expand Up @@ -1548,7 +1545,6 @@ private void reloadQueue() {
if (pos >= 0 && pos < mPlayList.size()) {
mPlayPos = pos;
}
clearCurrentTrackInformation();
openCurrentAndNext();
if (mPlayer.initialized()) {
long seekpos = settings.getSeekPosition();
Expand Down

0 comments on commit ca6d000

Please sign in to comment.