LibreTube/app/src/main/java/com/github/libretube/extensions/QualityString.kt

9 lines
280 B
Kotlin
Raw Normal View History

2023-01-26 23:55:23 +05:30
package com.github.libretube.extensions
import com.github.libretube.api.obj.PipedStream
fun PipedStream?.qualityString(fileName: String): String {
this ?: return ""
return fileName + "_" + quality?.replace(" ", "_") + "_" + format + "." + mimeType?.split("/")?.last()
}