Commit Diff


commit - 56b5b3c673442fe9229f6c502a7d039d3850f6c8
commit + c86624f6da4f8dd827f4f5211822e8de74fca083
blob - c894ac7b7947fadaf474b84d9092827a6c926ff5
blob + 3db2815c6b8aeb82a2d7d9efc18ba3b6de7e037a
--- playlist.c
+++ playlist.c
@@ -53,21 +53,11 @@ playlist_swap(struct playlist *p, ssize_t off)
 		off = -1;
 
 	if (current_song != NULL && off < 0) {
-		/* try to adjust play_off to match the same song */
+		/* try to match the currently played song */
 		for (i = 0; i < p->len; ++i) {
 			if (!strcmp(current_song, p->songs[i]))
 				break;
 		}
-		/* try to match one song before */
-		if (i == p->len && play_off >= 1)
-			for (i = 0; i < p->len; ++i)
-				if (!strcmp(current_song, p->songs[i]))
-					break;
-		/* or one song after */
-		if (i == p->len && play_off < playlist.len-1)
-			for (i = 0; i < p->len; ++i)
-				if (!strcmp(current_song, p->songs[i]))
-					break;
 		if (i == p->len)
 			i = -1;
 	}