Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(player): add intro skip for media controls #1108

Merged
merged 3 commits into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ object SettingsPlayerScreen : SearchableSettings {
Preference.PreferenceItem.SwitchPreference(
pref = mediaChapterSeek,
title = stringResource(R.string.pref_media_control_chapter_seeking),
subtitle = stringResource(R.string.pref_media_control_chapter_seeking_summary),
),
Preference.PreferenceItem.InfoPreference(
title = stringResource(R.string.pref_category_player_aniskip_info),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ class PlayerActivity : BaseActivity() {
if (playerPreferences.mediaChapterSeek().get()) {
if (player.loadChapters().isNotEmpty()) {
MPVLib.command(arrayOf("add", "chapter", "1"))
} else {
doubleTapSeek(viewModel.getAnimeSkipIntroLength(), isDoubleTap = false)
Secozzi marked this conversation as resolved.
Show resolved Hide resolved
playerControls.resetControlsFade()
}
} else {
changeEpisode(viewModel.getAdjacentEpisodeId(previous = false))
Expand Down
3 changes: 2 additions & 1 deletion i18n/src/main/res/values/strings-aniyomi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@
<string name="pref_skip_5" translatable="false">5s</string>
<string name="pref_skip_3" translatable="false">3s</string>
<string name="pref_skip_disable">Disable</string>
<string name="pref_media_control_chapter_seeking">Use media controls for chapter seeking</string>
<string name="pref_media_control_chapter_seeking">Seek chapters with media controls</string>
<string name="pref_media_control_chapter_seeking_summary">When enabled, using next will invoke the skip intro button if no chapters are found</string>
<string name="pref_player_smooth_seek">Enable precise seeking</string>
<string name="pref_player_smooth_seek_summary">When enabled, seeking will not focus on keyframes, leading to slower but precise seeking</string>
<string name="pref_player_fullscreen">Show content in display cutout</string>
Expand Down
Loading