0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-12-03 16:27:25 +00:00

fix more downloader issues

This commit is contained in:
X1nto 2021-11-30 13:58:12 +04:00
parent 918031bf70
commit ce3977c667
5 changed files with 9 additions and 9 deletions

View file

@ -4,7 +4,7 @@ import android.content.Context
import com.vanced.manager.core.downloader.api.VancedAPI import com.vanced.manager.core.downloader.api.VancedAPI
import com.vanced.manager.core.downloader.base.AppDownloader import com.vanced.manager.core.downloader.base.AppDownloader
import com.vanced.manager.core.downloader.util.DownloadStatus import com.vanced.manager.core.downloader.util.DownloadStatus
import com.vanced.manager.core.downloader.util.getVancedMusicPath import com.vanced.manager.core.downloader.util.getVancedYoutubePath
import com.vanced.manager.core.preferences.holder.managerVariantPref import com.vanced.manager.core.preferences.holder.managerVariantPref
import com.vanced.manager.core.preferences.holder.vancedLanguagesPref import com.vanced.manager.core.preferences.holder.vancedLanguagesPref
import com.vanced.manager.core.preferences.holder.vancedThemePref import com.vanced.manager.core.preferences.holder.vancedThemePref
@ -65,7 +65,7 @@ class VancedDownloader(
} }
override fun getSavedFilePath(): String { override fun getSavedFilePath(): String {
val directory = File(getVancedMusicPath(absoluteVersion, managerVariantPref, context)) val directory = File(getVancedYoutubePath(absoluteVersion, managerVariantPref, context))
if (!directory.exists()) if (!directory.exists())
directory.mkdirs() directory.mkdirs()

View file

@ -2,7 +2,7 @@ package com.vanced.manager.core.downloader.util
import android.content.Context import android.content.Context
fun getVancedPath( fun getVancedYoutubePath(
version: String, version: String,
variant: String, variant: String,
context: Context context: Context

View file

@ -1,7 +1,7 @@
package com.vanced.manager.core.installer.impl package com.vanced.manager.core.installer.impl
import android.content.Context import android.content.Context
import com.vanced.manager.core.downloader.util.getVancedPath import com.vanced.manager.core.downloader.util.getVancedYoutubePath
import com.vanced.manager.core.installer.base.AppInstaller import com.vanced.manager.core.installer.base.AppInstaller
import com.vanced.manager.core.installer.util.installSplitApp import com.vanced.manager.core.installer.util.installSplitApp
import com.vanced.manager.core.preferences.holder.managerVariantPref import com.vanced.manager.core.preferences.holder.managerVariantPref
@ -18,7 +18,7 @@ class VancedInstaller(
) { ) {
val absoluteVersion = getLatestOrProvidedAppVersion(vancedVersionPref, appVersions) val absoluteVersion = getLatestOrProvidedAppVersion(vancedVersionPref, appVersions)
val apks = File(getVancedPath(absoluteVersion, managerVariantPref, context)) val apks = File(getVancedYoutubePath(absoluteVersion, managerVariantPref, context))
.listFiles { file -> .listFiles { file ->
file.extension == "apk" file.extension == "apk"
} }

View file

@ -2,7 +2,7 @@ package com.vanced.manager.core.util
import android.os.Build import android.os.Build
val arch = when { val arch get() = when {
Build.SUPPORTED_ABIS.contains("x86") -> "x86" Build.SUPPORTED_ABIS.contains("x86") -> "x86"
Build.SUPPORTED_ABIS.contains("arm64-v8a") -> "arm64_v8a" Build.SUPPORTED_ABIS.contains("arm64-v8a") -> "arm64_v8a"
else -> "armeabi_v7a" else -> "armeabi_v7a"

View file

@ -26,7 +26,7 @@ val downloaderModule = module {
context: Context, context: Context,
) = MicrogDownloader(microgAPI, context) ) = MicrogDownloader(microgAPI, context)
factory { provideVancedDownloader(get(), get()) } single { provideVancedDownloader(get(), get()) }
factory { provideMusicDownloader(get(), get()) } single { provideMusicDownloader(get(), get()) }
factory { provideMicrogDownloader(get(), get()) } single { provideMicrogDownloader(get(), get()) }
} }