Upstream merge

Internal permission change
Fix url adder
This commit is contained in:
NerdNumber9
2017-05-04 23:38:17 -04:00
parent 3f758d5981
commit 9dbb59f337
616 changed files with 4186 additions and 230 deletions

16
app/src/main/java/eu/kanade/tachiyomi/App.kt Normal file → Executable file
View File

@ -9,20 +9,12 @@ import eu.kanade.tachiyomi.data.backup.BackupCreatorJob
import eu.kanade.tachiyomi.data.library.LibraryUpdateJob
import eu.kanade.tachiyomi.data.updater.UpdateCheckerJob
import eu.kanade.tachiyomi.util.LocaleHelper
import org.acra.ACRA
import org.acra.annotation.ReportsCrashes
import io.paperdb.Paper
import timber.log.Timber
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.InjektScope
import uy.kohesive.injekt.registry.default.DefaultRegistrar
@ReportsCrashes(
formUri = "http://tachiyomi.kanade.eu/crash_report",
reportType = org.acra.sender.HttpSender.Type.JSON,
httpMethod = org.acra.sender.HttpSender.Method.PUT,
buildConfigClass = BuildConfig::class,
excludeMatchingSharedPreferencesKeys = arrayOf(".*username.*", ".*password.*", ".*token.*")
)
open class App : Application() {
override fun onCreate() {
@ -32,8 +24,8 @@ open class App : Application() {
if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree())
setupAcra()
setupJobManager()
Paper.init(this) //Setup metadata DB (EH)
LocaleHelper.updateConfiguration(this, resources.configuration)
}
@ -50,10 +42,6 @@ open class App : Application() {
LocaleHelper.updateConfiguration(this, newConfig, true)
}
protected open fun setupAcra() {
ACRA.init(this)
}
protected open fun setupJobManager() {
JobManager.create(this).addJobCreator { tag ->
when (tag) {

0
app/src/main/java/eu/kanade/tachiyomi/AppModule.kt Normal file → Executable file
View File

0
app/src/main/java/eu/kanade/tachiyomi/Constants.kt Normal file → Executable file
View File

View File

0
app/src/main/java/eu/kanade/tachiyomi/data/cache/ChapterCache.kt vendored Normal file → Executable file
View File

0
app/src/main/java/eu/kanade/tachiyomi/data/cache/CoverCache.kt vendored Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -9,6 +9,7 @@ import com.f2prateek.rx.preferences.RxSharedPreferences
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.track.TrackService
import eu.kanade.tachiyomi.source.Source
import exh.ui.migration.MigrationStatus
import java.io.File
fun <T> Preference<T>.getOrDefault(): T = get() ?: defaultValue()!!
@ -88,7 +89,7 @@ class PreferencesHelper(val context: Context) {
fun catalogueAsList() = rxPrefs.getBoolean(keys.catalogueAsList, false)
fun enabledLanguages() = rxPrefs.getStringSet(keys.enabledLanguages, setOf("en"))
fun enabledLanguages() = rxPrefs.getStringSet(keys.enabledLanguages, setOf("all"))
fun sourceUsername(source: Source) = prefs.getString(keys.sourceUsername(source.id), "")
@ -160,4 +161,38 @@ class PreferencesHelper(val context: Context) {
fun defaultCategory() = prefs.getInt(keys.defaultCategory, -1)
//EH
fun enableExhentai() = rxPrefs.getBoolean("enable_exhentai", false)
fun secureEXH() = rxPrefs.getBoolean("secure_exh", true)
fun imageQuality() = rxPrefs.getString("ehentai_quality", "auto")
fun useHentaiAtHome() = rxPrefs.getBoolean("enable_hah", true)
fun useJapaneseTitle() = rxPrefs.getBoolean("use_jp_title", false)
fun ehSearchSize() = rxPrefs.getString("ex_search_size", "rc_0")
fun thumbnailRows() = rxPrefs.getString("ex_thumb_rows", "tr_2")
fun migrateLibraryAsked() = rxPrefs.getBoolean("ex_migrate_library", false)
fun migrationStatus() = rxPrefs.getInteger("migration_status", MigrationStatus.NOT_INITIALIZED)
fun hasPerformedURLMigration() = rxPrefs.getBoolean("performed_url_migration", false)
fun hasPerformedSourceMigration() = rxPrefs.getBoolean("performed_source_migration", false)
//EH Cookies
fun memberIdVal() = rxPrefs.getString("eh_ipb_member_id", null)
fun passHashVal() = rxPrefs.getString("eh_ipb_pass_hash", null)
fun igneousVal() = rxPrefs.getString("eh_igneous", null)
//Lock
fun lockHash() = rxPrefs.getString("lock_hash", null)
fun lockSalt() = rxPrefs.getString("lock_salt", null)
fun lockLength() = rxPrefs.getInteger("lock_length", -1)
}

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -23,7 +23,7 @@ interface GithubService {
}
}
@GET("/repos/inorichi/tachiyomi/releases/latest")
@GET("/repos/NerdNumber9/tachiyomi/releases/latest")
fun getLatestVersion(): Observable<GithubRelease>
}

View File

@ -12,7 +12,7 @@ class GithubUpdateChecker() {
*/
fun checkForUpdate(): Observable<GithubUpdateResult> {
return service.getLatestVersion().map { release ->
val newVersion = release.version.replace("[^\\d.]".toRegex(), "")
val newVersion = release.version
// Check if latest version is different from current version
if (newVersion != BuildConfig.VERSION_NAME) {

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
app/src/main/java/eu/kanade/tachiyomi/source/Source.kt Normal file → Executable file
View File

Some files were not shown because too many files have changed in this diff Show More