fixed tiktok videos not creating results

This commit is contained in:
deniscerri 2023-04-24 06:35:04 +02:00
parent 4b921bd6c7
commit d08dcb90e3
No known key found for this signature in database
GPG key ID: 95C43D517D830350

View file

@ -535,7 +535,7 @@ class InfoUtil(private val context: Context) {
}catch (e: Exception) { continue }
val formatProper = Gson().fromJson(format.toString(), Format::class.java)
if (formatProper.filesize > 0){
if ( !formatProper.format_note.contains("audio only", true)) {
if ( !formatProper!!.format_note!!.contains("audio only", true)) {
formatProper.format_note = format.getString("format_note")
}else{
formatProper.format_note = "${format.getString("format_note")} audio"
@ -621,8 +621,8 @@ class InfoUtil(private val context: Context) {
val format = formatsInJSON.getJSONObject(f)
val formatProper = Gson().fromJson(format.toString(), Format::class.java)
if (formatProper.filesize > 0){
if (format.has("format_note")){
if ( !formatProper.format_note.contains("audio only", true)) {
if (format.has("format_note") && formatProper.format_note != null){
if (!formatProper!!.format_note.contains("audio only", true)) {
formatProper.format_note = format.getString("format_note")
}else{
formatProper.format_note = "${format.getString("format_note")} audio"