Skip to content

Commit

Permalink
Merge pull request #646 from 3flex/any-unused-params
Browse files Browse the repository at this point in the history
Remove unused parameters
  • Loading branch information
nielsvanvelzen authored Oct 25, 2024
2 parents 7012aac + 2f09171 commit 35dc856
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/commandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ export abstract class CommandHandler {

static nextTrackHandler(): void {
if (PlaybackManager.hasNextItem()) {
PlaybackManager.playNextItem({}, true);
PlaybackManager.playNextItem(true);
}
}

static previousTrackHandler(): void {
if (PlaybackManager.hasPrevItem()) {
PlaybackManager.playPreviousItem({});
PlaybackManager.playPreviousItem();
}
}

Expand Down
10 changes: 4 additions & 6 deletions src/components/playbackManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,25 +150,23 @@ export abstract class PlaybackManager {
return this.activePlaylistIndex > 0;
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
static playNextItem(options: any = {}, stopPlayer = false): boolean {
static playNextItem(stopPlayer = false): boolean {
const nextItemInfo = this.getNextPlaybackItemInfo();

if (nextItemInfo) {
this.activePlaylistIndex = nextItemInfo.index;
this.playItem(options, stopPlayer);
this.playItem({}, stopPlayer);

return true;
}

return false;
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
static playPreviousItem(options: any = {}): boolean {
static playPreviousItem(): boolean {
if (this.activePlaylist && this.activePlaylistIndex > 0) {
this.activePlaylistIndex--;
this.playItem(options, true);
this.playItem({}, true);

return true;
}
Expand Down

0 comments on commit 35dc856

Please sign in to comment.