Commit 30/09/2025
This commit is contained in:
@@ -2,6 +2,7 @@ package database
|
||||
|
||||
import codes.Somecodes.Companion.ValiDateForLogHtml
|
||||
import codes.Somecodes.Companion.toJsonString
|
||||
import content.Category
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import kotlinx.coroutines.withContext
|
||||
@@ -2239,6 +2240,63 @@ class MariaDB(
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all city soundbank by tag
|
||||
* @param tag The tags to search for
|
||||
* @return a list of Soundbank with Category City and matching tag
|
||||
*/
|
||||
fun Find_Soundbank_City(tag: String) : List<Soundbank>{
|
||||
val lowerTag = tag.lowercase()
|
||||
return soundDB.List
|
||||
.filter{ it.Category== Category.City.name }
|
||||
.filter { it.TAG.lowercase()==lowerTag}
|
||||
}
|
||||
|
||||
fun Find_Soundbank_AirplaneName(tag: String) : List<Soundbank>{
|
||||
val lowerTag = tag.lowercase()
|
||||
return soundDB.List
|
||||
.filter{ it.Category== Category.Airplane_Name.name }
|
||||
.filter { it.TAG.lowercase()==lowerTag}
|
||||
}
|
||||
|
||||
fun Find_Soundbank_Places(tag: String) : List<Soundbank>{
|
||||
val lowerTag = tag.lowercase()
|
||||
return soundDB.List
|
||||
.filter{ it.Category== Category.Places.name }
|
||||
.filter { it.TAG.lowercase()==lowerTag}
|
||||
}
|
||||
|
||||
fun Find_Soundbank_Shalat(tag: String) : List<Soundbank>{
|
||||
val lowerTag = tag.lowercase()
|
||||
return soundDB.List
|
||||
.filter{ it.Category== Category.Shalat.name }
|
||||
.filter { it.TAG.lowercase()==lowerTag}
|
||||
}
|
||||
|
||||
fun Find_Soundbank_Sequence(tag: String) : List<Soundbank>{
|
||||
val lowerTag = tag.lowercase()
|
||||
|
||||
return soundDB.List
|
||||
.filter{ it.Category== Category.Sequence.name }
|
||||
.filter { it.TAG.lowercase()==lowerTag}
|
||||
}
|
||||
|
||||
fun Find_Soundbank_Reason(tag: String) : List<Soundbank>{
|
||||
val lowerTag = tag.lowercase()
|
||||
return soundDB.List
|
||||
.filter{ it.Category== Category.Reason.name }
|
||||
.filter { it.TAG.lowercase()==lowerTag}
|
||||
}
|
||||
|
||||
fun Find_Soundbank_Procedure(tag: String) : List<Soundbank> {
|
||||
val lowerTag = tag.lowercase()
|
||||
return soundDB.List
|
||||
.filter { it.Category == Category.Procedure.name }
|
||||
.filter { it.TAG.lowercase() == lowerTag }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user