fix: autoplay error when no best release is found

This commit is contained in:
ThaUnknown 2022-08-02 15:52:49 +02:00
parent 9b7975e75f
commit e34d97bb24
2 changed files with 2 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{
"name": "Miru",
"version": "2.13.2",
"version": "2.13.3",
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
"main": "src/index.js",
"homepage": "https://github.com/ThaUnknown/miru#readme",

View file

@ -275,7 +275,7 @@ async function parseRss ({ media, episode }) {
entries.sort((a, b) => b.seeders - a.seeders)
if (settings.rssAutoplay) {
const best = entries.find(entry => entry.best)
if (best.seeders > 20) { // only play best if it actually has a lot of seeders, 20 might be too little for those overkill blurays
if (best?.seeders > 20) { // only play best if it actually has a lot of seeders, 20 might be too little for those overkill blurays
play(best)
} else {
play(entries[0])