Fix shuffle bug for long Spotify playlists

A random sample of 50 songs is taken for long playlists since mapping Spotify -> YouTube is expensive.
However, the function used previously allowed for duplicates within that sample of 50.
This commit is contained in:
Max Isom 2021-05-30 15:01:11 -05:00
parent d61107aedd
commit cf75afd4bc
No known key found for this signature in database
GPG key ID: 25C9B1A7F6798880
4 changed files with 17 additions and 23 deletions

View file

@ -2979,18 +2979,6 @@ undefsafe@^2.0.3:
dependencies:
debug "^2.2.0"
unique-random-array@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unique-random-array/-/unique-random-array-2.0.0.tgz#9e639b1a9dc141e97350a6fc6f17da4b0717b1ad"
integrity sha512-xR87O95fZ7hljw84J8r1YDXrvffPLWN513BNOP4Bv0KcgG5dyEUrHwsvP7mVAOKg4Y80uqRbpUk0GKr8il70qg==
dependencies:
unique-random "^2.1.0"
unique-random@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/unique-random/-/unique-random-2.1.0.tgz#7a8413da5176d028567168b57125ac5c0cec5c25"
integrity sha512-iQ1ZgWac3b8YxGThecQFRQiqgk6xFERRwHZIWeVVsqlbmgCRl0PY13R4mUkodNgctmg5b5odG1nyW/IbOxQTqg==
unique-string@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d"
@ -3163,7 +3151,7 @@ youtube.ts@^0.2.0:
axios "^0.19.0"
ytdl-core "^4.0.3"
ytdl-core@^4.0.3, ytdl-core@^4.5.0:
ytdl-core@^4.0.3:
version "4.5.0"
resolved "https://registry.yarnpkg.com/ytdl-core/-/ytdl-core-4.5.0.tgz#f07733387c548e5c3a5614c93ef55bde666eeaf4"
integrity sha512-e8r6skrakWNixsVlNPBMoRM1HrdW1swE97If9nenDUjF65uogYk4DvxIuqlmqRfBWKe+6aIZwqedNxUU9XLYJA==
@ -3171,3 +3159,12 @@ ytdl-core@^4.0.3, ytdl-core@^4.5.0:
m3u8stream "^0.8.3"
miniget "^4.0.0"
sax "^1.1.3"
ytdl-core@^4.8.2:
version "4.8.2"
resolved "https://registry.yarnpkg.com/ytdl-core/-/ytdl-core-4.8.2.tgz#f034ad942c5d958f5987fc8ff0b0639664ae2fb7"
integrity sha512-O3n++YcgZawaXJwbPmnRDgfN6b4kU0DpNdkI9Na5yM3JAdfJmoq5UHc8v9Xjgjr1RilQUUh7mhDnRRPDtKr0Kg==
dependencies:
m3u8stream "^0.8.3"
miniget "^4.0.0"
sax "^1.1.3"