Plugin

SpotifyCrack

Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling

Media Utility Activity
index.ts
Download

Source

src/plugins/spotifyCrack/index.ts
1import { definePluginSettings } from "@api/Settings";
2import { Devs } from "@utils/constants";
3import definePlugin, { OptionType } from "@utils/types";
4
5const settings = definePluginSettings({
6 noSpotifyAutoPause: {
7 description: "Disable Spotify auto-pause",
8 type: OptionType.BOOLEAN,
9 default: true,
10 restartNeeded: true
11 },
12 keepSpotifyActivityOnIdle: {
13 description: "Keep Spotify activity playing when idling",
14 type: OptionType.BOOLEAN,
15 default: false,
16 restartNeeded: true
17 }
18});
19
20export default definePlugin({
21 name: "SpotifyCrack",
22 description: "Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",
23 tags: ["Media", "Utility", "Activity"],
24 authors: [Devs.Cyn, Devs.Nuckyz],
25 settings,
26
27 patches: [
28 {
29
30 find: 'dispatch({type:"SPOTIFY_PROFILE_UPDATE"',
31 replacement: {
32 match: /SPOTIFY_PROFILE_UPDATE.+?isPremium:(?="premium"===(\i)\.body\.product)/,
33 replace: (m, req) => `${m}(${req}.body.product="premium")&&`
34 },
35 },
36 {
37 find: "}getPlayableComputerDevices(){",
38 replacement: [
39 {
40 predicate: () => settings.store.noSpotifyAutoPause,
41 match: /(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,
42 replace: "return;"
43 },
44 {
45 predicate: () => settings.store.keepSpotifyActivityOnIdle,
46 match: /(shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,
47 replace: "$1"
48 }
49 ]
50 }
51 ]
52});
53