Merge remote-tracking branch 'origin/master'

This commit is contained in:
Blatzar 2022-07-21 03:44:12 +02:00
commit 5414145d79
5 changed files with 13 additions and 11 deletions

View file

@ -36,7 +36,7 @@ android {
targetSdkVersion 30
versionCode 49
versionName "3.0.0"
versionName "3.0.1"
resValue "string", "app_version",
"${defaultConfig.versionName}${versionNameSuffix ?: ""}"
@ -94,7 +94,6 @@ dependencies {
implementation 'androidx.test.ext:junit-ktx:1.1.3'
testImplementation 'org.json:json:20180813'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.5.0' // dont change this to 1.6.0 it looks ugly af

View file

@ -32,9 +32,8 @@ class APIRepository(val api: MainAPI) {
val hasQuickSearch = api.hasQuickSearch
suspend fun load(url: String): Resource<LoadResponse> {
if (isInvalidData(url)) throw ErrorLoadingException()
return safeApiCall {
if (isInvalidData(url)) throw ErrorLoadingException()
api.load(api.fixUrl(url)) ?: throw ErrorLoadingException()
}
}

View file

@ -1224,7 +1224,7 @@ class ResultFragment : ResultTrailerPlayer() {
sortUrls(
currentLinks ?: return@main
),//(currentLinks ?: return@main).filter { !it.isM3u8 },
getString(R.string.episode_action_download_mirror)
context?.getString(R.string.episode_action_download_mirror) ?: ""
) { link ->
startDownload(
context,

View file

@ -1602,11 +1602,15 @@ object VideoDownloadManager {
}
private fun saveQueue() {
try {
val dQueue =
downloadQueue.toList()
.mapIndexed { index, any -> DownloadQueueResumePackage(index, any) }
.toTypedArray()
setKey(KEY_RESUME_QUEUE_PACKAGES, dQueue)
} catch (e : Exception) {
logError(e)
}
}
/*fun isMyServiceRunning(context: Context, serviceClass: Class<*>): Boolean {

View file

@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.6.21"
ext.kotlin_version = "1.7.10"
repositories {
google()
jcenter()