Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
Final Update
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMooskyFish committed Feb 13, 2023
1 parent 3980e77 commit b40e088
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"discordID": "153759249284071424",
"github": "TheMooskyFish"
},
"version": "0.0.7",
"version": "1.0.0",
"updater": {
"type": "github",
"id": "TheMooskyFish/spotify-listen-along"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spotify-listen-along",
"version": "0.0.7",
"version": "1.0.0",
"description": "Enables Spotify Listen Along without Premium for Replugged",
"engines": {
"node": ">=14.0.0"
Expand Down Expand Up @@ -29,7 +29,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-react": "^7.31.10",
"prettier": "^2.8.1",
"replugged": "4.0.0-beta0.25",
"replugged": "4.0.0-beta0.27",
"typescript": "^4.8.4"
}
}
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Injector, webpack } from "replugged";
import { AnyFunction } from "replugged/dist/types/util";

const inject = new Injector();

export async function start(): Promise<void> {
const spotify = await webpack.waitForModule<{
getActiveSocketAndDevice: AnyFunction;
getActiveSocketAndDevice: () => void;
}>(webpack.filters.byProps("getActiveSocketAndDevice"));

interface spotifysocket {
isPremium: boolean;
}
if (spotify) {
inject.after(spotify, "getActiveSocketAndDevice", (_, ret) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (ret) (ret as any).socket.isPremium = true;
inject.after(spotify, "getActiveSocketAndDevice", (_, ret: { socket: spotifysocket }) => {
if (ret) ret.socket.isPremium = true;
return ret;
});
}
Expand Down

0 comments on commit b40e088

Please sign in to comment.