Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/statemachine.js
Original file line number Diff line number Diff line change
Expand Up @@ -1076,13 +1076,13 @@ CoreStateMachine.prototype.seek = function (position) {
} else if (position == '-') {
var curPos = this.getState().seek;
var thisPlugin = this.commandRouter.pluginManager.getPlugin('music_service', this.volatileService);
this.currentSeek = curPos - 10000;
this.currentSeek = curPos < 10000 ? 0 : curPos - 10000;
if (thisPlugin && typeof thisPlugin.seek === 'function') {
thisPlugin.seek(curPos - 10000);
thisPlugin.seek(this.currentSeek);
} else {
this.commandRouter.pushConsoleMessage('WARNING: No seek method for volatile plugin ' + this.volatileService);
}
this.startPlaybackTimer(curPos - 10000);
this.startPlaybackTimer(this.currentSeek);
this.pushState().fail(this.pushError.bind(this));
} else {
var thisPlugin = this.commandRouter.pluginManager.getPlugin('music_service', this.volatileService);
Expand Down Expand Up @@ -1115,10 +1115,10 @@ CoreStateMachine.prototype.seek = function (position) {
var curPos = this.getState().seek;
var thisPlugin = this.commandRouter.pluginManager.getPlugin('music_service', trackBlock.service);

this.currentSeek = curPos - 10000;
this.startPlaybackTimer(curPos - 10000);
this.currentSeek = curPos < 10000 ? 0 : curPos - 10000;
this.startPlaybackTimer(this.currentSeek);
if (thisPlugin && typeof thisPlugin.seek === 'function') {
thisPlugin.seek(curPos - 10000);
thisPlugin.seek(this.currentSeek);
} else {
this.commandRouter.pushConsoleMessage('WARNING: No seek method for plugin ' + trackBlock.service);
}
Expand Down