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

0
.github/CONTRIBUTING.md vendored Normal file → Executable file
View File

0
.github/ISSUE_TEMPLATE.md vendored Normal file → Executable file
View File

4
.gitignore vendored Normal file → Executable file
View File

@ -6,4 +6,6 @@
.idea/
*iml
*.iml
*/build
*/build
/mainframer.sh
*.apk

0
.travis.yml Normal file → Executable file
View File

0
LICENSE Normal file → Executable file
View File

46
README.md Normal file → Executable file
View File

@ -1,24 +1,52 @@
| Build | Download | F-Droid |
|-------|----------|-------------|
| [![TeamCity (simple build status)](https://img.shields.io/teamcity/https/teamcity.kanade.eu/s/tachiyomi_Build.svg)](https://teamcity.kanade.eu/project.html?projectId=tachiyomi) [![Travis](https://img.shields.io/travis/inorichi/tachiyomi.svg)](https://travis-ci.org/inorichi/tachiyomi) | [![stable release](https://img.shields.io/github/release/inorichi/tachiyomi.svg?maxAge=3600&label=stable)](https://github.com/inorichi/tachiyomi/releases) [![latest dev build](https://img.shields.io/badge/dev-latest%20build-blue.svg)](http://tachiyomi.kanade.eu/latest/app-debug.apk) | [![fdroid release](https://img.shields.io/badge/stable-f--droid.org-blue.svg)](https://f-droid.org/repository/browse/?fdid=eu.kanade.tachiyomi) [![fdroid dev](https://img.shields.io/badge/dev-wiki-blue.svg)](//github.com/inorichi/tachiyomi/wiki/FDroid-for-dev-versions) |
<div style="text-align:center"><img src ="https://raw.githubusercontent.com/NerdNumber9/TachiyomiEH/master/branding/teh-banner.png" /></div>
<br>
## [Report an issue](https://github.com/inorichi/tachiyomi/blob/master/.github/CONTRIBUTING.md)
TachiyomiEH is a free and open source E-Hentai, ExHentai and PervEden galleries reader for Android.
**Before reporting a new issue, take a look at the [FAQ](https://github.com/inorichi/tachiyomi/wiki/FAQ), the [changelog](https://github.com/inorichi/tachiyomi/releases) and the already opened issues.**
TachiyomiEH is a fork of the [original Tachiyomi app](https://github.com/inorichi/tachiyomi).
### E-Hentai Thread
[https://forums.e-hentai.org/index.php?showtopic=185421](https://forums.e-hentai.org/index.php?showtopic=185421)
Tachiyomi is a free and open source manga reader for Android.
Keep in mind it's still a beta, so expect it to crash sometimes.
# Download
[![stable release](https://img.shields.io/github/release/NerdNumber9/TachiyomiEH.svg?maxAge=3600&label=stable)](https://github.com/NerdNumber9/TachiyomiEH/releases)
# Features
* Online and offline reading
* Configurable reader with multiple viewers and settings
* MyAnimeList support
* Resume from the next unread chapter
* Track your reading position
* Chapter filtering
* Schedule searching for updates
* Categories to organize your library
* Log into ExHentai
* Read both NSFW and SFW manga/doujinshi
* Full offline tag/namespace searching support
* Batch import galleries
* Automatically open E-Hentai/ExHentai links
* Lock the app with a PIN code
### Built-in manga sources
##### SFW
* Batoto
* Mangahere
* Mangafox
* Kissmanga
* Readmanga
* Mintmanga
* Mangachan
* Readmangatoday
* Mangasee
* Wiemanga
##### NSFW
* E-Hentai
* ExHentai
* PervEden
* nhentai
TachiyomiEH is fully compatible with Tachiyomi source extensions.
Backups from Tachiyomi are also compatible with TachiyomiEH (and vice versa).
## License

3
app/.gitignore vendored Normal file → Executable file
View File

@ -1,4 +1,5 @@
/build
*iml
*.iml
custom.gradle
custom.gradle
google-services.json

36
app/build.gradle Normal file → Executable file
View File

@ -33,18 +33,22 @@ android {
buildToolsVersion "25.0.2"
publishNonDefault true
dexOptions {
javaMaxHeapSize "4g"
}
defaultConfig {
applicationId "eu.kanade.tachiyomi"
applicationId "eu.kanade.tachiyomi.eh2"
minSdkVersion 16
targetSdkVersion 25
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
versionCode 22
versionName "0.5.2"
versionCode 5003
versionName "v5.0.3-EH"
buildConfigField "String", "COMMIT_COUNT", "\"${getCommitCount()}\""
buildConfigField "String", "COMMIT_SHA", "\"${getGitSha()}\""
buildConfigField "String", "BUILD_TIME", "\"${getBuildTime()}\""
buildConfigField "boolean", "INCLUDE_UPDATER", "false"
buildConfigField "boolean", "INCLUDE_UPDATER", "true"
vectorDrawables.useSupportLibrary = true
@ -198,15 +202,31 @@ dependencies {
compile 'me.zhanghai.android.systemuihelper:library:1.0.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
//Firebase (EH)
final firebase_version = '10.0.1'
releaseCompile "com.google.firebase:firebase-core:$firebase_version"
releaseCompile "com.google.firebase:firebase-messaging:$firebase_version"
releaseCompile "com.google.firebase:firebase-crash:$firebase_version"
//SnappyDB (EH)
compile 'io.paperdb:paperdb:2.0'
//JVE (Regex) (EH)
compile 'ru.lanwen.verbalregex:java-verbal-expressions:1.4'
//Pin lock view
compile 'com.andrognito.pinlockview:pinlockview:1.0.1'
// Tests
testCompile 'junit:junit:4.12'
//Paper DB screws up tests
/*testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:1.7.1'
testCompile 'org.mockito:mockito-core:1.10.19'
final robolectric_version = '3.1.4'
testCompile "org.robolectric:robolectric:$robolectric_version"
testCompile "org.robolectric:shadows-multidex:$robolectric_version"
testCompile "org.robolectric:shadows-play-services:$robolectric_version"
testCompile "org.robolectric:shadows-play-services:$robolectric_version"*/
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
@ -270,4 +290,6 @@ afterEvaluate {
}
}
}
}
}
//Firebase (EH)
apply plugin: 'com.google.gms.google-services'

9
app/proguard-rules.pro vendored Normal file → Executable file
View File

@ -96,4 +96,11 @@
-dontwarn org.yaml.snakeyaml.**
# Duktape
-keep class com.squareup.duktape.** { *; }
-keep class com.squareup.duktape.** { *; }
# [EH]
-keep class exh.** { *; }
# Keep google stuff
-dontwarn com.google.android.gms.**
-dontwarn com.google.firebase.**

58
app/src/main/AndroidManifest.xml Normal file → Executable file
View File

@ -13,6 +13,9 @@
android:name="android.permission.READ_PHONE_STATE"
tools:node="remove" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"
tools:ignore="ProtectedPermissions" />
<application
android:name=".App"
@ -117,6 +120,61 @@
android:name="eu.kanade.tachiyomi.data.glide.AppGlideModule"
android:value="GlideModule" />
<!-- EH -->
<activity
android:name="exh.ui.login.LoginActivity"
android:label="@string/label_login"
android:parentActivityName=".ui.setting.SettingsActivity" >
</activity>
<activity
android:name="exh.ui.intercept.InterceptActivity"
android:label="TachiyomiEH">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="g.e-hentai.org"
android:pathPrefix="/g/"
android:scheme="http"/>
<data
android:host="g.e-hentai.org"
android:pathPrefix="/g/"
android:scheme="https"/>
<data
android:host="e-hentai.org"
android:pathPrefix="/g/"
android:scheme="http"/>
<data
android:host="e-hentai.org"
android:pathPrefix="/g/"
android:scheme="https"/>
<data
android:host="exhentai.org"
android:pathPrefix="/g/"
android:scheme="http"/>
<data
android:host="exhentai.org"
android:pathPrefix="/g/"
android:scheme="https"/>
</intent-filter>
</activity>
<activity
android:name="exh.ui.migration.MigrationCompletionActivity"
android:label="Complete migration">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="application/json"/>
</intent-filter>
</activity>
<activity android:name="exh.ui.lock.LockActivity"
android:label="Application locked"/>
</application>
</manifest>

0
app/src/main/assets/fonts/PTSans-Narrow.ttf Normal file → Executable file
View File

0
app/src/main/assets/fonts/PTSans-NarrowBold.ttf Normal file → Executable file
View File

0
app/src/main/ic_launcher-web.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

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

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