use a random new title, if highlights is empty

This commit is contained in:
2020-12-18 17:23:04 +01:00
parent f4518056db
commit bba642e9e3

View File

@ -32,6 +32,7 @@ import org.mosad.teapod.util.*
import org.mosad.teapod.util.DataTypes.MediaType
import java.io.IOException
import java.util.*
import kotlin.random.Random
object AoDParser {
@ -247,6 +248,10 @@ object AoDParser {
}
}
// if highlights is empty, add a random new title
if (highlightsList.isEmpty()) {
highlightsList.add(newTitlesList[Random.nextInt(0, newTitlesList.size)])
}
}
}