Skip to content

Commit

Permalink
feat: auto-skip intro/outro toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
NoCrypt committed Aug 10, 2024
1 parent 476207f commit 962e9ad
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Includes all original Miru features, plus:
- Disabled smooth scrolling by default due to poor performance on my device
- Gesture lock on Android to prevent misclick
- Right click or long press on RSS Section will open the anime episode list
- Toggleable auto skip intro/outro

## **Building and Development**

Expand Down
1 change: 1 addition & 0 deletions common/modules/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export const defaults = {
playerAutoplay: true,
playerPause: true,
playerAutocomplete: true,
playerAutoSkip: false,
playerDeband: false,
playerSeek: 5,
rssQuality: '1080',
Expand Down
15 changes: 9 additions & 6 deletions common/views/Player/Player.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,7 @@
}
let currentSkippable = null
$: currentSkippable && $settings.playerAutoSkip && skip()
function checkSkippableChapters () {
const current = findChapter(currentTime)
if (current) {
Expand Down Expand Up @@ -1555,14 +1556,16 @@
.seekbar {
font-size: 2rem !important;
}
.miniplayer .mobile-focus-target {
display: block !important;
}
.miniplayer .mobile-focus-target:focus-visible {
background: hsla(209, 100%, 55%, 0.3);
}
@media (pointer: none), (pointer: coarse) {
.miniplayer .mobile-focus-target {
display: block !important;
}
.miniplayer .mobile-focus-target:focus-visible {
background: hsla(209, 100%, 55%, 0.3);
}
.bottom .ctrl[data-name='playPause'],
.bottom .volume,
.bottom .keybinds {
Expand Down
6 changes: 6 additions & 0 deletions common/views/Settings/PlayerSettings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@
<label for='player-autocomplete'>{settings.playerAutocomplete ? 'On' : 'Off'}</label>
</div>
</SettingCard>
<SettingCard title='Auto-Skip Intro/Outro' description='Automatically skip intro and outro. Warning, sometimes it can skip wrong part of the episode and you can&apos;t view Intro/Outro at all.'>
<div class='custom-switch'>
<input type='checkbox' id='player-auto-skip' bind:checked={settings.playerAutoSkip} />
<label for='player-auto-skip'>{settings.playerAutoSkip ? 'On' : 'Off'}</label>
</div>
</SettingCard>
<SettingCard title='Seek Duration' description='Seconds to seek an episode with arrow keys'>
<div class='input-group w-100 mw-full'>
<input type='number' bind:value={settings.playerSeek} min='1' max='50' class='form-control text-right bg-dark' />
Expand Down

0 comments on commit 962e9ad

Please sign in to comment.