mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-21 12:17:12 +03:00
Merge remote-tracking branch 'upstream/master' into MR
This commit is contained in:
commit
dfb5ca4f8e
14 changed files with 100 additions and 17 deletions
|
@ -21,7 +21,7 @@ android {
|
|||
defaultConfig {
|
||||
applicationId = "xyz.jmir.tachiyomi.mi"
|
||||
|
||||
versionCode = 103
|
||||
versionCode = 104
|
||||
versionName = "0.14.6"
|
||||
|
||||
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
||||
|
|
|
@ -20,6 +20,7 @@ object AdvancedPlayerSettingsScreen : SearchableSettings {
|
|||
val playerPreferences = remember { Injekt.get<PlayerPreferences>() }
|
||||
val context = LocalContext.current
|
||||
val mpvConf = playerPreferences.mpvConf()
|
||||
val mpvInput = playerPreferences.mpvInput()
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
return listOf(
|
||||
|
@ -34,6 +35,16 @@ object AdvancedPlayerSettingsScreen : SearchableSettings {
|
|||
),
|
||||
|
||||
),
|
||||
Preference.PreferenceItem.MultiLineEditTextPreference(
|
||||
pref = mpvInput,
|
||||
title = context.getString(R.string.pref_mpv_input),
|
||||
subtitle = mpvInput.asState(scope).value
|
||||
.lines().take(2)
|
||||
.joinToString(
|
||||
separator = "\n",
|
||||
postfix = if (mpvInput.asState(scope).value.lines().size > 2) "\n..." else "",
|
||||
),
|
||||
),
|
||||
Preference.PreferenceItem.ListPreference(
|
||||
title = context.getString(R.string.pref_debanding_title),
|
||||
pref = playerPreferences.deband(),
|
||||
|
|
|
@ -407,6 +407,8 @@ class PlayerActivity : BaseActivity() {
|
|||
private fun setupPlayerMPV() {
|
||||
val mpvConfFile = File("${applicationContext.filesDir.path}/mpv.conf")
|
||||
playerPreferences.mpvConf().get().let { mpvConfFile.writeText(it) }
|
||||
val mpvInputFile = File("${applicationContext.filesDir.path}/input.conf")
|
||||
playerPreferences.mpvInput().get().let { mpvInputFile.writeText(it) }
|
||||
|
||||
val logLevel = if (viewModel.networkPreferences.verboseLogging().get()) "info" else "warn"
|
||||
player.initialize(applicationContext.filesDir.path, logLevel)
|
||||
|
@ -422,6 +424,8 @@ class PlayerActivity : BaseActivity() {
|
|||
3 -> MPVLib.setOptionString("vf", "format=yuv420p")
|
||||
}
|
||||
|
||||
MPVLib.setOptionString("input-default-bindings", "yes")
|
||||
|
||||
MPVLib.addLogObserver(playerObserver)
|
||||
player.addObserver(playerObserver)
|
||||
}
|
||||
|
@ -740,8 +744,12 @@ class PlayerActivity : BaseActivity() {
|
|||
val gestures = GestureHandler(this, deviceWidth.toFloat(), deviceHeight.toFloat())
|
||||
val mDetector = GestureDetectorCompat(this, gestures)
|
||||
player.setOnTouchListener { v, event ->
|
||||
gestures.onTouch(v, event)
|
||||
mDetector.onTouchEvent(event)
|
||||
try { // TODO: https://issuetracker.google.com/issues/238920463 is fixed in API 34, but for now this will do
|
||||
gestures.onTouch(v, event)
|
||||
mDetector.onTouchEvent(event)
|
||||
} catch (_: NullPointerException) {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1042,11 +1050,33 @@ class PlayerActivity : BaseActivity() {
|
|||
return true
|
||||
}
|
||||
*/
|
||||
else -> {}
|
||||
KeyEvent.KEYCODE_DPAD_RIGHT -> {
|
||||
doubleTapSeek(playerPreferences.skipLengthPreference().get())
|
||||
return true
|
||||
}
|
||||
KeyEvent.KEYCODE_DPAD_LEFT -> {
|
||||
doubleTapSeek(-playerPreferences.skipLengthPreference().get())
|
||||
return true
|
||||
}
|
||||
KeyEvent.KEYCODE_SPACE -> {
|
||||
doubleTapPlayPause()
|
||||
return true
|
||||
}
|
||||
// add other keycodes as needed
|
||||
else -> {
|
||||
if (player.onKey(event!!)) return true
|
||||
}
|
||||
}
|
||||
return super.onKeyDown(keyCode, event)
|
||||
}
|
||||
|
||||
// Removing this causes mpv to repeat the last repeated input
|
||||
// that's not specified in onKeyDown indefinitely for some reason
|
||||
override fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean {
|
||||
if (player.onKey(event!!)) return true
|
||||
return super.onKeyUp(keyCode, event)
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
fun openTracksSheet(view: View) {
|
||||
val qualityTracks = currentVideoList?.map { Track("", it.quality) }?.toTypedArray()?.takeUnless { it.isEmpty() }
|
||||
|
|
|
@ -248,7 +248,13 @@ class PlayerViewModel(
|
|||
|
||||
val currentEp = currentEpisode ?: throw Exception("No episode loaded.")
|
||||
|
||||
currentVideoList = EpisodeLoader.getLinks(currentEp.toDomainEpisode()!!, anime, source).asFlow().first()
|
||||
EpisodeLoader.getLinks(currentEp.toDomainEpisode()!!, anime, source).asFlow().first()
|
||||
.takeIf { it.isNotEmpty() }
|
||||
?.also { currentVideoList = it }
|
||||
?: run {
|
||||
currentVideoList = null
|
||||
throw Exception("Video list is empty.")
|
||||
}
|
||||
savedEpisodeId = currentEp.id!!
|
||||
|
||||
Pair(currentVideoList, Result.success(true))
|
||||
|
|
|
@ -31,6 +31,8 @@ class PlayerPreferences(
|
|||
|
||||
fun mpvConf() = preferenceStore.getString("pref_mpv_conf", "")
|
||||
|
||||
fun mpvInput() = preferenceStore.getString("pref_mpv_input", "")
|
||||
|
||||
fun defaultPlayerOrientationType() = preferenceStore.getInt("pref_default_player_orientation_type_key", 10)
|
||||
|
||||
fun adjustOrientationVideoDimensions() = preferenceStore.getBoolean("pref_adjust_orientation_video_dimensions", true)
|
||||
|
|
|
@ -284,7 +284,7 @@
|
|||
<string name="action_global_anime_search">بحث الانمي العالمي</string>
|
||||
<string name="pref_category_volume_brightness">الحجم والسطوع</string>
|
||||
<string name="pref_enable_pip">تفعيل وضعية صورة داخل صورة (PiP)</string>
|
||||
<string name="action_global_manga_search">بحث في المانغا العالمية</string>
|
||||
<string name="action_global_manga_search">البحث العام عن المانجا</string>
|
||||
<string name="pref_search_pinned_manga_sources_only">ابحث في مصادر المانغا المثبتة فقط</string>
|
||||
<string name="pref_search_pinned_anime_sources_only">ابحث في مصادر الانمي المثبتة فقط</string>
|
||||
<string name="pref_default_home_tab_library">ضبط شاشة البداية إلى تبويب المانغاتعيين شاشة البدء إلى علامة تبويب المانغا</string>
|
||||
|
@ -337,4 +337,15 @@
|
|||
<string name="go_to_after_opening">تخطي افتتاحية</string>
|
||||
<string name="pref_media_control_chapter_seeking">البحث عن الفصول باستخدام عناصر التحكم</string>
|
||||
<string name="pref_debanding_title">Khalid</string>
|
||||
<string name="pref_debanding_cpu">المعالج</string>
|
||||
<string name="pref_debanding_gpu">المعالج</string>
|
||||
<string name="pref_category_player_advanced_subtitle">إزالة الموجات، mpv.conf… الإخ</string>
|
||||
<string name="theme_mocha">موكا</string>
|
||||
<string name="action_hide">إخفاء</string>
|
||||
<string name="label_recent_anime_updates">تحديثات الأنمي</string>
|
||||
<string name="download_slots_info">سيتم تنزيل الملفات بشكل متزامن فقط من مصادر مستضافة ذاتية أو غير محدودة في استهلاك البيانات</string>
|
||||
<string name="pref_debanding_disabled">معطّل</string>
|
||||
<string name="pref_category_hide_hidden">إخفاء الفئات المخفية من شاشة الفئات</string>
|
||||
<string name="pref_category_player_advanced">إعدادات المشغل المتقدمة</string>
|
||||
<string name="theme_cottoncandy">حلوى القطن</string>
|
||||
</resources>
|
|
@ -129,7 +129,10 @@
|
|||
<string name="action_view_episodes">Ver episodios</string>
|
||||
<string name="action_next_episode">Siguente episodio</string>
|
||||
<string name="action_screen_fit">Modo de ajuste de pantalla</string>
|
||||
<string name="action_display_show_continue_reading_button">Mostrar botón continuar mirando/leyendo</string>
|
||||
<string name="pref_bottom_nav_style">Estilo de navegación inferior</string>
|
||||
<string name="action_sort_unseen_count">Recuento no visto</string>
|
||||
<string name="action_display_show_continue_reading_button">Botón de continuar viendo/leyendo</string>
|
||||
<string name="pref_bottom_nav_style">Estilo de navegación abajo</string>
|
||||
<string name="action_sort_unseen_count">Cuento no visto</string>
|
||||
<string name="pref_category_player">Reproductor</string>
|
||||
<string name="action_hide">Ocultar</string>
|
||||
<string name="label_recent_anime_updates">Actualizaciones de Anime</string>
|
||||
</resources>
|
|
@ -41,25 +41,25 @@
|
|||
<item quantity="one">פרק %1$s</item>
|
||||
<item quantity="two">%1$s פרקים</item>
|
||||
<item quantity="many">%1$s פרקים</item>
|
||||
<item quantity="other"></item>
|
||||
<item quantity="other"/>
|
||||
</plurals>
|
||||
<plurals name="download_amount_anime">
|
||||
<item quantity="one">הפרק הבא</item>
|
||||
<item quantity="two">הפרקים הבאים</item>
|
||||
<item quantity="many">הפרקים הבאים</item>
|
||||
<item quantity="other"></item>
|
||||
<item quantity="other"/>
|
||||
</plurals>
|
||||
<plurals name="notification_new_episodes_summary">
|
||||
<item quantity="one">לסדרה אחת</item>
|
||||
<item quantity="two">ל-%d סדרות</item>
|
||||
<item quantity="many">ל-%d סדרות</item>
|
||||
<item quantity="other"></item>
|
||||
<item quantity="other"/>
|
||||
</plurals>
|
||||
<plurals name="notification_episodes_multiple_and_more">
|
||||
<item quantity="one">פרקים %1$s ועוד 1</item>
|
||||
<item quantity="two">פרקים %1$s ו-%2$d נוספים</item>
|
||||
<item quantity="many">פרקים %1$s ו-%2$d נוספים</item>
|
||||
<item quantity="other"></item>
|
||||
<item quantity="other"/>
|
||||
</plurals>
|
||||
<plurals name="next_unseen_episodes">
|
||||
<item quantity="one">הפרק הבא שלא נצפה</item>
|
||||
|
@ -71,13 +71,13 @@
|
|||
<item quantity="one">%d שנייה</item>
|
||||
<item quantity="two">%d שניות</item>
|
||||
<item quantity="many">%d שניות</item>
|
||||
<item quantity="other"></item>
|
||||
<item quantity="other"/>
|
||||
</plurals>
|
||||
<plurals name="notification_episodes_generic">
|
||||
<item quantity="one">פרק אחד חדש</item>
|
||||
<item quantity="two">%1$d פרקים חדשים</item>
|
||||
<item quantity="many">%1$d פרקים חדשים</item>
|
||||
<item quantity="other"></item>
|
||||
<item quantity="other"/>
|
||||
</plurals>
|
||||
<string name="action_global_manga_search">חיפוש מנגה גלובלי</string>
|
||||
<string name="action_download_unread">הורד חלקים שלא נקראו</string>
|
||||
|
|
|
@ -276,7 +276,7 @@
|
|||
<plurals name="download_amount_anime">
|
||||
<item quantity="one">Prossimo episodio</item>
|
||||
<item quantity="many">Prossimi %d episodi</item>
|
||||
<item quantity="other"></item>
|
||||
<item quantity="other"/>
|
||||
</plurals>
|
||||
<string name="stats_header">Mostra statistiche</string>
|
||||
<string name="pref_debanding_cpu">CPU</string>
|
||||
|
|
|
@ -140,4 +140,9 @@
|
|||
<string name="action_show_anime">ଅନିମେ ଦେଖାଅ</string>
|
||||
<string name="label_anime">ଅନିମେ</string>
|
||||
<string name="action_sort_last_anime_update">ଗତ ଅନିମେ ଅଦ୍ୟତନ</string>
|
||||
<plurals name="seconds">
|
||||
<item quantity="one"/>
|
||||
<item quantity="other"/>
|
||||
</plurals>
|
||||
<string name="pref_player_hide_controls">ଚାଳକ ଖୋଲିବା ସମୟରେ ଚାଳକ ନିୟନ୍ତ୍ରଣ ଲୁଚାଯାଉ</string>
|
||||
</resources>
|
|
@ -276,7 +276,7 @@
|
|||
<plurals name="download_amount_anime">
|
||||
<item quantity="one">Próximo episódio</item>
|
||||
<item quantity="many">Próximos %d episódios</item>
|
||||
<item quantity="other"></item>
|
||||
<item quantity="other"/>
|
||||
</plurals>
|
||||
<string name="action_save_screenshot">Gravar a captura de ecrã</string>
|
||||
<string name="chapter_dialog_header">Procurar capítulo</string>
|
||||
|
|
|
@ -306,4 +306,17 @@
|
|||
<string name="data_saver_color_bw">Siyah ve beyaza çevir</string>
|
||||
<string name="bandwidth_hero">Bandwidth Hero (Bandwidth Hero Proxy sunucusu gerektirir)</string>
|
||||
<string name="wsrv">wsrv.nl</string>
|
||||
<string name="pref_debanding_cpu">CPU</string>
|
||||
<string name="pref_debanding_gpu">GPU</string>
|
||||
<string name="pref_episode_swipe">Bölüm kaydırma</string>
|
||||
<string name="pref_category_player_advanced_subtitle">Debanding, mpv.conf… vb.</string>
|
||||
<string name="resmush">resmush.it</string>
|
||||
<string name="theme_mocha">Mocha</string>
|
||||
<string name="action_hide">Gizle</string>
|
||||
<string name="label_recent_anime_updates">Anime güncellemeleri</string>
|
||||
<string name="download_slots_info">Sadece tarifesiz(kotasız) veya self hostlu durumda eş zamanlı indirme yapılacaktır</string>
|
||||
<string name="pref_debanding_disabled">Devre dışı</string>
|
||||
<string name="pref_category_hide_hidden">Gizli kategorileri kategoriler menüsünde de gizle</string>
|
||||
<string name="pref_category_player_advanced">Gelişmiş oynatıcı ayarları</string>
|
||||
<string name="theme_cottoncandy">Pamuk şekeri</string>
|
||||
</resources>
|
|
@ -333,4 +333,5 @@
|
|||
<string name="theme_mocha">Моча</string>
|
||||
<string name="label_recent_anime_updates">Оновлення аніме</string>
|
||||
<string name="theme_cottoncandy">Бавовняні цукерки</string>
|
||||
<string name="download_slots_info">Буде завантажувати тільки з власному хості або не лімітованих джерел</string>
|
||||
</resources>
|
|
@ -128,6 +128,7 @@
|
|||
<string name="pref_remember_volume">Remember and switch to the last used volume</string>
|
||||
<!-- Needs better English -->
|
||||
<string name="pref_mpv_conf">Edit MPV configuration file for further player settings</string>
|
||||
<string name="pref_mpv_input">Edit MPV input file for keyboard mapping configuration</string>
|
||||
<string name="pref_category_external_player">External player</string>
|
||||
<string name="pref_always_use_external_player">Always use external player</string>
|
||||
<string name="pref_external_player_preference">External player preference</string>
|
||||
|
|
Loading…
Reference in a new issue