Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2025-01-04 05:15:39 +00:00
commit fb0a73c4fe
5 changed files with 25 additions and 17 deletions

View file

@ -18,6 +18,7 @@
import "./spotifyStyles.css";
import { Settings } from "@api/Settings";
import { Flex } from "@components/Flex";
import { ImageIcon, LinkIcon, OpenExternalIcon } from "@components/Icons";
import { debounce } from "@shared/debounce";
@ -130,7 +131,9 @@ function Controls() {
>
<Shuffle />
</Button>
<Button onClick={() => SpotifyStore.prev()}>
<Button onClick={() => {
Settings.plugins.SpotifyControls.previousButtonRestartsTrack && SpotifyStore.position > 3000 ? SpotifyStore.seek(0) : SpotifyStore.prev();
}}>
<SkipPrev />
</Button>
<Button onClick={() => SpotifyStore.setPlaying(!isPlaying)}>

View file

@ -44,6 +44,11 @@ export default definePlugin({
type: OptionType.BOOLEAN,
description: "Open Spotify URIs instead of Spotify URLs. Will only work if you have Spotify installed and might not work on all platforms",
default: false
},
previousButtonRestartsTrack: {
type: OptionType.BOOLEAN,
description: "Restart currently playing track when pressing the previous button if playtime is >3s",
default: true
}
},
patches: [