Skip to content

Commit 3bb7721

Browse files
committed
Bump version to 1.4.5 and reset track state on stop
1 parent 7f94d80 commit 3bb7721

File tree

5 files changed

+14
-57
lines changed

5 files changed

+14
-57
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group 'de.labystudio'
7-
version '1.4.4'
7+
version '1.4.5'
88

99
compileJava {
1010
sourceCompatibility = '1.8'

src/main/java/de/labystudio/spotifyapi/platform/linux/LinuxSpotifyApi.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ protected void onTick() throws Exception {
8686
@Override
8787
public void stop() {
8888
super.stop();
89+
8990
this.connected = false;
91+
this.currentTrack = null;
92+
this.currentPosition = -1;
93+
this.isPlaying = false;
94+
this.lastTimePositionUpdated = 0;
9095
}
9196

9297
private void updatePosition(int position) {

src/main/java/de/labystudio/spotifyapi/platform/osx/OSXSpotifyApi.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,12 @@ protected void onTick() throws Exception {
8484
@Override
8585
public void stop() {
8686
super.stop();
87+
8788
this.connected = false;
89+
this.currentTrack = null;
90+
this.currentPosition = -1;
91+
this.isPlaying = false;
92+
this.lastTimePositionUpdated = 0;
8893
}
8994

9095
private void updatePosition(int position) {

src/main/java/de/labystudio/spotifyapi/platform/windows/WinSpotifyAPI.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ public void stop() {
245245
this.currentTrack = null;
246246
this.currentPosition = -1;
247247
this.hasTrackPosition = false;
248+
this.isPlaying = false;
249+
this.lastTimePositionUpdated = 0;
250+
this.prevLastReportedPosition = -1;
248251
}
249252

250253
private BufferedImage toBufferedImage(byte[] data) {

src/main/java/de/labystudio/spotifyapi/platform/windows/api/playback/PointerRegistry.java

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)