change user-agent & bump stable version

This commit is contained in:
jmir1 2022-08-26 01:21:39 +02:00
parent dbe7396681
commit 51ae6f8b54
5 changed files with 6 additions and 10 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"
}
}

View file

@ -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))