Skip to content

Commit

Permalink
chore: Fix pref key for overridable baseurls (#2405)
Browse files Browse the repository at this point in the history
  • Loading branch information
Secozzi authored Oct 23, 2023
1 parent d56976e commit d5f81d5
Show file tree
Hide file tree
Showing 25 changed files with 45 additions and 42 deletions.
1 change: 1 addition & 0 deletions common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ android {
renderScript false
resValues false
shaders false
buildConfig true
}

compileOptions {
Expand Down
8 changes: 4 additions & 4 deletions multisrc/overrides/dooplay/multimovies/src/Multimovies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.animeextension.en.multimovies.extractors.AutoEmbedExtractor
import eu.kanade.tachiyomi.animeextension.en.multimovies.extractors.MultimoviesCloudExtractor
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
Expand All @@ -28,11 +28,11 @@ import uy.kohesive.injekt.api.get
class Multimovies : DooPlay(
"en",
"Multimovies",
"https://multimovies.shop",
"https://multimovies.live",
) {
override val client = network.cloudflareClient

private val defaultBaseUrl = "https://multimovies.shop"
private val defaultBaseUrl = "https://multimovies.live"

override val baseUrl by lazy { getPrefBaseUrl() }

Expand Down Expand Up @@ -199,7 +199,7 @@ class Multimovies : DooPlay(
companion object {
private const val RESTART_ANIYOMI = "Restart Aniyomi to apply new setting."
private const val BASE_URL_PREF_TITLE = "Override BaseUrl"
private val BASE_URL_PREF = "overrideBaseUrl_v${AppInfo.getVersionName()}"
private val BASE_URL_PREF = "overrideBaseUrl_v${BuildConfig.VERSION_CODE}"
private const val BASE_URL_PREF_SUMMARY = "For temporary uses. Updating the extension will erase this setting."

private const val PREF_SERVER_KEY = "preferred_server"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DooPlayGenerator : ThemeSourceGenerator {
SingleLang("GoAnimes", "https://goanimes.net", "pt-BR", isNsfw = true, overrideVersionCode = 5),
SingleLang("JetAnime", "https://ssl.jetanimes.com", "fr", isNsfw = false, overrideVersionCode = 2),
SingleLang("Kinoking", "https://kinoking.cc", "de", isNsfw = false, overrideVersionCode = 17),
SingleLang("Multimovies", "https://multimovies.shop", "en", isNsfw = false, overrideVersionCode = 11),
SingleLang("Multimovies", "https://multimovies.live", "en", isNsfw = false, overrideVersionCode = 12),
SingleLang("Pi Fansubs", "https://pifansubs.org", "pt-BR", isNsfw = true, overrideVersionCode = 17),
SingleLang("Pobreflix", "https://pobreflix.biz", "pt-BR", isNsfw = true, overrideVersionCode = 1),
SingleLang("UniqueStream", "https://uniquestream.net", "en", isNsfw = false, overrideVersionCode = 2),
Expand Down
2 changes: 1 addition & 1 deletion src/en/aniwave/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ext {
extName = 'Aniwave'
pkgNameSuffix = 'en.nineanime'
extClass = '.Aniwave'
extVersionCode = 56
extVersionCode = 57
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package eu.kanade.tachiyomi.animeextension.en.nineanime

import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import kotlinx.serialization.json.Json
Expand All @@ -16,7 +17,7 @@ class AniwaveUtils(private val client: OkHttpClient, private val headers: Header

private val userAgent = Headers.headersOf(
"User-Agent",
"Aniyomi/${AppInfo.getVersionName()} (AniWave)",
"Aniyomi/${AppInfo.getVersionName()} (AniWave; ${BuildConfig.VERSION_CODE})",
)

fun callEnimax(query: String, action: String): String {
Expand Down
2 changes: 1 addition & 1 deletion src/en/ask4movie/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ext {
extName = 'Ask4Movie'
pkgNameSuffix = 'en.ask4movie'
extClass = '.Ask4Movie'
extVersionCode = 9
extVersionCode = 10
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.content.SharedPreferences
import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.animesource.model.AnimeFilter
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
Expand Down Expand Up @@ -197,9 +197,9 @@ class Ask4Movie : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
}

companion object {
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${AppInfo.getVersionName()}"
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${BuildConfig.VERSION_NAME}"
private const val PREF_DOMAIN_TITLE = "Override BaseUrl"
private const val PREF_DOMAIN_DEFAULT = "https://ask4movie.nl"
private const val PREF_DOMAIN_DEFAULT = "https://ask4movie.li"
private const val PREF_DOMAIN_SUMMARY = "For temporary uses. Updating the extension will erase this setting."
}

Expand Down
2 changes: 1 addition & 1 deletion src/en/dramacool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ext {
extName = 'DramaCool'
pkgNameSuffix = 'en.dramacool'
extClass = '.DramaCool'
extVersionCode = 43
extVersionCode = 44
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
import eu.kanade.tachiyomi.animesource.model.AnimesPage
Expand Down Expand Up @@ -34,7 +34,7 @@ class DramaCool : ConfigurableAnimeSource, ParsedAnimeHttpSource() {

override val name = "DramaCool"

private val defaultBaseUrl = "https://dramacool.hr"
private val defaultBaseUrl = "https://dramacool.pa"

override val baseUrl by lazy { getPrefBaseUrl() }

Expand Down Expand Up @@ -218,7 +218,7 @@ class DramaCool : ConfigurableAnimeSource, ParsedAnimeHttpSource() {

private const val BASE_URL_PREF_TITLE = "Override BaseUrl"

private val BASE_URL_PREF = "overrideBaseUrl_v${AppInfo.getVersionName()}"
private val BASE_URL_PREF = "overrideBaseUrl_v${BuildConfig.VERSION_CODE}"

private const val BASE_URL_PREF_SUMMARY = "For temporary uses. Update extension will erase this setting."

Expand Down
2 changes: 1 addition & 1 deletion src/en/fmovies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ext {
extName = 'FMovies'
pkgNameSuffix = 'en.fmovies'
extClass = '.FMovies'
extVersionCode = 13
extVersionCode = 14
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package eu.kanade.tachiyomi.animeextension.en.fmovies

import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import kotlinx.serialization.json.Json
Expand All @@ -18,7 +19,7 @@ class FMoviesHelper(private val client: OkHttpClient, private val headers: Heade

private val userAgent = Headers.headersOf(
"User-Agent",
"Aniyomi/${AppInfo.getVersionName()} (FMovies)",
"Aniyomi/${AppInfo.getVersionName()} (FMovies; ${BuildConfig.VERSION_CODE})",
)

fun getVrf(id: String): String {
Expand Down
2 changes: 1 addition & 1 deletion src/en/gogoanime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
extName = 'Gogoanime'
pkgNameSuffix = 'en.gogoanime'
extClass = '.GogoAnime'
extVersionCode = 75
extVersionCode = 76
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.MultiSelectListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.animeextension.en.gogoanime.extractors.GogoCdnExtractor
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
Expand Down Expand Up @@ -266,9 +266,9 @@ class GogoAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
"filelions",
)

private val PREF_DOMAIN_KEY = "preferred_domain_name_v${AppInfo.getVersionName()}"
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${BuildConfig.VERSION_CODE}"
private const val PREF_DOMAIN_TITLE = "Override BaseUrl"
private const val PREF_DOMAIN_DEFAULT = "https://gogoanimehd.to"
private const val PREF_DOMAIN_DEFAULT = "https://gogoanimehd.io"
private const val PREF_DOMAIN_SUMMARY = "For temporary uses. Updating the extension will erase this setting."

private const val PREF_QUALITY_KEY = "preferred_quality"
Expand Down
2 changes: 1 addition & 1 deletion src/en/ripcrabbyanime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ext {
extName = 'Ripcrabbyanime'
pkgNameSuffix = 'en.ripcrabbyanime'
extClass = '.Ripcrabbyanime'
extVersionCode = 9
extVersionCode = 10
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.PreferenceScreen
import androidx.preference.SwitchPreferenceCompat
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.animesource.model.AnimeFilter
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
Expand Down Expand Up @@ -422,7 +422,7 @@ class Ripcrabbyanime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
private const val TRIM_EPISODE_NAME_KEY = "trim_episode"
private const val TRIM_EPISODE_NAME_DEFAULT = true

private val PREF_DOMAIN_KEY = "preferred_domain_name_v${AppInfo.getVersionName()}"
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${BuildConfig.VERSION_CODE}"
private const val PREF_DOMAIN_TITLE = "Override BaseUrl"
private const val PREF_DOMAIN_DEFAULT = "https://ripcrabbyanimes.com"
private const val PREF_DOMAIN_SUMMARY = "For temporary uses. Updating the extension will erase this setting."
Expand Down
2 changes: 1 addition & 1 deletion src/hi/yomovies/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
extName = 'YoMovies'
pkgNameSuffix = 'hi.yomovies'
extClass = '.YoMovies'
extVersionCode = 6
extVersionCode = 7
libVersion = '13'
containsNsfw = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.animeextension.hi.yomovies.extractors.MinoplresExtractor
import eu.kanade.tachiyomi.animeextension.hi.yomovies.extractors.MovembedExtractor
import eu.kanade.tachiyomi.animeextension.hi.yomovies.extractors.SpeedostreamExtractor
Expand Down Expand Up @@ -221,9 +221,9 @@ class YoMovies : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
}

companion object {
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${AppInfo.getVersionName()}"
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${BuildConfig.VERSION_CODE}"
private const val PREF_DOMAIN_TITLE = "Override BaseUrl"
private const val PREF_DOMAIN_DEFAULT = "https://yomovies.cheap"
private const val PREF_DOMAIN_DEFAULT = "https://yomovies.support"
private const val PREF_DOMAIN_SUMMARY = "For temporary uses. Updating the extension will erase this setting."

private const val PREF_QUALITY_KEY = "preferred_quality"
Expand Down
2 changes: 1 addition & 1 deletion src/it/animeunity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ext {
extName = 'AnimeUnity'
pkgNameSuffix = 'it.animeunity'
extClass = '.AnimeUnity'
extVersionCode = 5
extVersionCode = 6
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
import eu.kanade.tachiyomi.animesource.model.AnimesPage
Expand Down Expand Up @@ -413,9 +413,9 @@ class AnimeUnity : ConfigurableAnimeSource, AnimeHttpSource() {
}

companion object {
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${AppInfo.getVersionName()}"
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${BuildConfig.VERSION_CODE}"
private const val PREF_DOMAIN_TITLE = "Override BaseUrl"
private const val PREF_DOMAIN_DEFAULT = "https://www.animeunity.cc"
private const val PREF_DOMAIN_DEFAULT = "https://www.animeunity.to"
private const val PREF_DOMAIN_SUMMARY = "For temporary uses. Updating the extension will erase this setting."

private const val PREF_QUALITY_KEY = "preferred_quality"
Expand Down
2 changes: 1 addition & 1 deletion src/it/animeworld/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ext {
extName = 'ANIMEWORLD.tv'
pkgNameSuffix = 'it.animeworld'
extClass = '.ANIMEWORLD'
extVersionCode = 32
extVersionCode = 33
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.animeextension.it.animeworld.extractors.StreamHideExtractor
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.animesource.model.AnimeFilter
Expand Down Expand Up @@ -574,7 +574,7 @@ class ANIMEWORLD : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
}

companion object {
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${AppInfo.getVersionName()}"
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${BuildConfig.VERSION_CODE}"
private const val PREF_DOMAIN_TITLE = "Override BaseUrl"
private const val PREF_DOMAIN_DEFAULT = "https://www.animeworld.so"
private const val PREF_DOMAIN_SUMMARY = "For temporary uses. Updating the extension will erase this setting."
Expand Down
2 changes: 1 addition & 1 deletion src/it/aniplay/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ext {
extName = 'AniPlay'
pkgNameSuffix = 'it.aniplay'
extClass = '.AniPlay'
extVersionCode = 5
extVersionCode = 6
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
import eu.kanade.tachiyomi.animesource.model.AnimesPage
Expand Down Expand Up @@ -274,7 +274,7 @@ class AniPlay : ConfigurableAnimeSource, AnimeHttpSource() {
}

companion object {
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${AppInfo.getVersionName()}"
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${BuildConfig.VERSION_CODE}"
private const val PREF_DOMAIN_TITLE = "Override BaseUrl"
private const val PREF_DOMAIN_DEFAULT = "https://aniplay.co"
private const val PREF_DOMAIN_SUMMARY = "For temporary uses. Updating the extension will erase this setting."
Expand Down
2 changes: 1 addition & 1 deletion src/it/streamingcommunity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ext {
extName = 'StreamingCommunity'
pkgNameSuffix = 'it.streamingcommunity'
extClass = '.StreamingCommunity'
extVersionCode = 1
extVersionCode = 2
libVersion = '13'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import android.widget.Toast
import androidx.preference.EditTextPreference
import androidx.preference.ListPreference
import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.AppInfo
import eu.kanade.tachiyomi.animeextension.BuildConfig
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
import eu.kanade.tachiyomi.animesource.model.AnimeFilter
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
Expand Down Expand Up @@ -346,9 +346,9 @@ class StreamingCommunity : ConfigurableAnimeSource, AnimeHttpSource() {
}

companion object {
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${AppInfo.getVersionName()}"
private val PREF_DOMAIN_KEY = "preferred_domain_name_v${BuildConfig.VERSION_CODE}"
private const val PREF_DOMAIN_TITLE = "Override BaseUrl"
private const val PREF_DOMAIN_DEFAULT = "https://streamingcommunity.codes"
private const val PREF_DOMAIN_DEFAULT = "https://streamingcommunity.at"
private const val PREF_DOMAIN_SUMMARY = "For temporary uses. Updating the extension will erase this setting."

private const val PREF_QUALITY_KEY = "preferred_quality"
Expand Down

0 comments on commit d5f81d5

Please sign in to comment.