From 51ae6f8b544946b302bbb031f32009ad3267c321 Mon Sep 17 00:00:00 2001 From: jmir1 Date: Fri, 26 Aug 2022 01:21:39 +0200 Subject: [PATCH] change user-agent & bump stable version --- .github/ISSUE_TEMPLATE.md | 2 +- .github/ISSUE_TEMPLATE/report_issue.yml | 4 ++-- .github/ISSUE_TEMPLATE/request_feature.yml | 2 +- .../kanade/tachiyomi/animesource/online/AnimeHttpSource.kt | 6 +----- .../kanade/tachiyomi/data/preference/PreferencesHelper.kt | 2 +- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 3072af703..c045ed805 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -3,7 +3,7 @@ I acknowledge that: - I have updated: - - To the latest version of the app (stable is v0.12.3.7) + - To the latest version of the app (stable is v0.12.3.8) - All extensions - I have tried the troubleshooting guide: https://aniyomi.jmir.xyz/help/guides/troubleshooting-problems/ - If this is an issue with an anime extension, that I should be opening an issue in https://github.com/jmir1/aniyomi-extensions diff --git a/.github/ISSUE_TEMPLATE/report_issue.yml b/.github/ISSUE_TEMPLATE/report_issue.yml index 0d0503ed3..10a0e7391 100644 --- a/.github/ISSUE_TEMPLATE/report_issue.yml +++ b/.github/ISSUE_TEMPLATE/report_issue.yml @@ -52,7 +52,7 @@ body: label: Aniyomi version description: You can find your Aniyomi version in **More → About**. placeholder: | - Example: "0.12.3.7" + Example: "0.12.3.8" validations: required: true @@ -97,7 +97,7 @@ body: required: true - label: I have tried the [troubleshooting guide](https://aniyomi.jmir.xyz/help/guides/troubleshooting/). required: true - - label: I have updated the app to version **[0.12.3.7](https://github.com/jmir1/aniyomi/releases/latest)**. + - label: I have updated the app to version **[0.12.3.8](https://github.com/jmir1/aniyomi/releases/latest)**. required: true - label: I have updated all installed extensions. required: true diff --git a/.github/ISSUE_TEMPLATE/request_feature.yml b/.github/ISSUE_TEMPLATE/request_feature.yml index b4ebc7888..18f113235 100644 --- a/.github/ISSUE_TEMPLATE/request_feature.yml +++ b/.github/ISSUE_TEMPLATE/request_feature.yml @@ -32,7 +32,7 @@ body: required: true - label: If this is an issue with an extension, I should be opening an issue in the [extensions repository](https://github.com/jmir1/aniyomi-extensions/issues/new/choose). required: true - - label: I have updated the app to version **[0.12.3.7](https://github.com/jmir1/aniyomi/releases/latest)**. + - label: I have updated the app to version **[0.12.3.8](https://github.com/jmir1/aniyomi/releases/latest)**. required: true - label: I will fill out all of the requested information in this form. required: true diff --git a/app/src/main/java/eu/kanade/tachiyomi/animesource/online/AnimeHttpSource.kt b/app/src/main/java/eu/kanade/tachiyomi/animesource/online/AnimeHttpSource.kt index 8ae0df983..dc09c6a83 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/animesource/online/AnimeHttpSource.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/animesource/online/AnimeHttpSource.kt @@ -67,7 +67,7 @@ abstract class AnimeHttpSource : AnimeCatalogueSource { * Headers builder for requests. Implementations can override this method for custom headers. */ protected open fun headersBuilder() = Headers.Builder().apply { - add("User-Agent", DEFAULT_USER_AGENT) + add("User-Agent", network.defaultUserAgent) } /** @@ -379,8 +379,4 @@ abstract class AnimeHttpSource : AnimeCatalogueSource { * Returns the list of filters for the source. */ override fun getFilterList() = AnimeFilterList() - - companion object { - const val DEFAULT_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.124 Safari/537.36 Edg/102.0.1245.44" - } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 6e37a2b73..9cdeba204 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -297,7 +297,7 @@ class PreferencesHelper(val context: Context) { fun libraryUpdateInterval() = flowPrefs.getInt("pref_library_update_interval_key", 24) - fun defaultUserAgent() = flowPrefs.getString(Keys.defaultUserAgent, "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.124 Safari/537.36 Edg/102.0.1245.44") + fun defaultUserAgent() = flowPrefs.getString(Keys.defaultUserAgent, "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0") fun libraryUpdateDeviceRestriction() = flowPrefs.getStringSet("library_update_restriction", setOf(DEVICE_ONLY_ON_WIFI)) fun libraryUpdateMangaRestriction() = flowPrefs.getStringSet("library_update_manga_restriction", setOf(MANGA_HAS_UNREAD, MANGA_NON_COMPLETED, MANGA_NON_READ))