mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-05-10 20:11:37 +02:00
Bump dependencies
This commit is contained in:
parent
dc70a37e96
commit
4e1a156f9b
7 changed files with 121 additions and 90 deletions
|
@ -238,7 +238,9 @@ export default class {
|
|||
}
|
||||
|
||||
shuffle(): void {
|
||||
this.queue = [...this.queue.slice(0, this.queuePosition + 1), ...shuffle(this.queue.slice(this.queuePosition + 1))];
|
||||
const shuffledSongs = shuffle(this.queue.slice(this.queuePosition + 1));
|
||||
|
||||
this.queue = [...this.queue.slice(0, this.queuePosition + 1), ...shuffledSongs];
|
||||
}
|
||||
|
||||
clear(): void {
|
||||
|
@ -306,7 +308,7 @@ export default class {
|
|||
|
||||
const nextBestFormat = (formats: ytdl.videoFormat[]): ytdl.videoFormat | undefined => {
|
||||
if (formats[0].live) {
|
||||
formats = formats.sort((a, b) => (b as any).audioBitrate - (a as any).audioBitrate); // Bad typings
|
||||
formats = formats.sort((a, b) => (b as unknown as {audioBitrate: number}).audioBitrate - (a as unknown as {audioBitrate: number}).audioBitrate); // Bad typings
|
||||
|
||||
return formats.find(format => [128, 127, 120, 96, 95, 94, 93].includes(parseInt(format.itag as unknown as string, 10))); // Bad typings
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue