1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-07-08 13:02:59 +00:00

change according to Isira-Seneviratne suggestion

This commit is contained in:
Diana Victoria Furrer 2025-06-17 15:42:01 +02:00
parent aa75a1449f
commit 0c9f5ddcaf

View File

@ -461,14 +461,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
} }
companion object { companion object {
val JSON_MIME_TYPE = getMimeType() val JSON_MIME_TYPE = MimeTypeMap.getSingleton()
.getMimeTypeFromExtension("json") ?: "application/octet-stream"
private fun getMimeType(): String {
val mimeTypeJson = MimeTypeMap.getSingleton().getMimeTypeFromExtension("json")
return if (mimeTypeJson.isNullOrBlank())
"application/octet-stream"
else
mimeTypeJson
}
} }
} }