Skip to content

Commit

Permalink
feat: autoskip
Browse files Browse the repository at this point in the history
feat: reduce search padding on mobile
  • Loading branch information
ThaUnknown committed Aug 20, 2024
1 parent 1d05a71 commit 848726b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions common/components/NavbarLink.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
.animate .donate .material-symbols-outlined {
animation: glow 1s ease-in-out infinite alternate;
}
.donate:hover .material-symbols-outlined {
.donate:active .material-symbols-outlined {
background: #fff;
color: #fa68b6 !important;
}
Expand Down Expand Up @@ -64,7 +64,7 @@
transition: background .8s cubic-bezier(0.25, 0.8, 0.25, 1), color .8s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.navbar-link:hover > span {
.navbar-link:active > span {
background: #fff;
color: var(--dark-color);
}
Expand Down
2 changes: 1 addition & 1 deletion common/components/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
</script>
<form class='container-fluid py-20 px-md-50 px-20 bg-dark pb-0 position-sticky top-0 search-container z-40' on:input bind:this={form}>
<form class='container-fluid py-20 px-md-50 bg-dark pb-0 position-sticky top-0 search-container z-40' on:input bind:this={form}>
<div class='row'>
<div class='col-lg col-4 p-10 d-flex flex-column justify-content-end'>
<div class='pb-10 font-size-24 font-weight-semi-bold d-flex'>
Expand Down
3 changes: 2 additions & 1 deletion common/modules/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ export const defaults = {
sources: {},
enableExternal: false,
playerPath: '',
playerSeek: 2
playerSeek: 2,
playerSkip: false
}

export const subtitleExtensions = ['srt', 'vtt', 'ass', 'ssa', 'sub', 'txt']
Expand Down
1 change: 1 addition & 0 deletions common/views/Player/Player.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@
}
let currentSkippable = null
$: currentSkippable && settings.value.playerAutoSkip && skip()
function checkSkippableChapters () {
const current = findChapter(currentTime)
if (current) {
Expand Down
2 changes: 1 addition & 1 deletion common/views/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

<div class='bg-dark h-full w-full overflow-y-scroll d-flex flex-wrap flex-row root overflow-x-hidden justify-content-center align-content-start' use:smoothScroll bind:this={container} on:scroll={infiniteScroll}>
<Search bind:search={$search} on:input={update} />
<div class='w-full d-grid d-md-flex flex-wrap flex-row px-md-50 px-20 justify-content-center align-content-start'>
<div class='w-full d-grid d-md-flex flex-wrap flex-row px-md-50 justify-content-center align-content-start'>
{#key $key}
{#each $items as card}
<Card {card} />
Expand Down
8 changes: 8 additions & 0 deletions common/views/Settings/PlayerSettings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
<option value='slo'>Slovak</option>
<option value='swe'>Swedish</option>
<option value='ara'>Arabic</option>
<option value='idn'>Indonesian</option>
</select>
</SettingCard>
<SettingCard title='Preferred Audio Language' description="What audio language to automatically select when a video is loaded if it exists. This won't find torrents with this language automatically. If not found defaults to Japanese.">
Expand All @@ -118,6 +119,7 @@
<option value='slo'>Slovak</option>
<option value='swe'>Swedish</option>
<option value='ara'>Arabic</option>
<option value='idn'>Indonesian</option>
</select>
</SettingCard>

Expand Down Expand Up @@ -154,6 +156,12 @@
</div>
</div>
</SettingCard>
<SettingCard title='Auto-Skip Intro/Outro' description='Attempt to automatically skip intro and outro. This WILL sometimes skip incorrect chapters, as some of the chapter data is community sourced.'>
<div class='custom-switch'>
<input type='checkbox' id='player-skip' bind:checked={settings.playerSkip} />
<label for='player-skip'>{settings.playerSkip ? 'On' : 'Off'}</label>
</div>
</SettingCard>

{#if SUPPORTS.externalPlayer}
<h4 class='mb-10 font-weight-bold'>External Player Settings</h4>
Expand Down

0 comments on commit 848726b

Please sign in to comment.