This commit is contained in:
LagradOst 2023-09-14 20:30:44 +02:00
parent 2bed79b1f1
commit 6957a8f95d
2 changed files with 10 additions and 3 deletions

View file

@ -58,8 +58,8 @@ android {
minSdk = 21 minSdk = 21
targetSdk = 33 targetSdk = 33
versionCode = 59 versionCode = 60
versionName = "4.1.8" versionName = "4.1.9"
resValue("string", "app_version", "${defaultConfig.versionName}${versionNameSuffix ?: ""}") resValue("string", "app_version", "${defaultConfig.versionName}${versionNameSuffix ?: ""}")
resValue("string", "commit_hash", "git rev-parse --short HEAD".execute() ?: "") resValue("string", "commit_hash", "git rev-parse --short HEAD".execute() ?: "")

View file

@ -179,6 +179,13 @@ object APIHolder {
private var trackerCache: HashMap<String, AniSearch> = hashMapOf() private var trackerCache: HashMap<String, AniSearch> = hashMapOf()
/** backwards compatibility, use getTracker4 instead */
suspend fun getTracker(
titles: List<String>,
types: Set<TrackerType>?,
year: Int?,
): Tracker? = getTracker(titles, types, year, false)
/** /**
* Get anime tracker information based on title, year and type. * Get anime tracker information based on title, year and type.
* Both titles are attempted to be matched with both Romaji and English title. * Both titles are attempted to be matched with both Romaji and English title.
@ -192,7 +199,7 @@ object APIHolder {
titles: List<String>, titles: List<String>,
types: Set<TrackerType>?, types: Set<TrackerType>?,
year: Int?, year: Int?,
lessAccurate: Boolean = false lessAccurate: Boolean
): Tracker? { ): Tracker? {
return try { return try {
require(titles.isNotEmpty()) { "titles must no be empty when calling getTracker" } require(titles.isNotEmpty()) { "titles must no be empty when calling getTracker" }