Skip to content

Commit

Permalink
swc
Browse files Browse the repository at this point in the history
  • Loading branch information
yofukashino committed Jun 25, 2024
1 parent a7926db commit b428b80
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 22 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Make your experience better with spotify links.
Like Playing directly or adding in queue. (Also opening directly in app)

Direct Download Link:
[![dev.yofukashino.Distify.asar](https://img.shields.io/github/downloads/YofukashiNo/MessageLinkEmbeds/total.svg?style=social&label=Direct%20Download)](https://github.com/YofukashiNo/Distify/releases/latest/download/dev.yofukashino.Distify.asar)
[![dev.yofukashino.Distify.asar](https://img.shields.io/github/downloads/YofukashiNo/Distify/total.svg?style=social&label=Direct%20Download)](https://github.com/YofukashiNo/Distify/releases/latest/download/dev.yofukashino.Distify.asar)

Install Link:
[![Safe](https://img.shields.io/github/downloads/YofukashiNo/MessageLinkEmbeds/total.svg?style=social&label=Install%20in%20Replugged&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMjQ1NzkgMjQ1NzkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnNYbGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sU3BhY2U9InByZXNlcnZlIiB4bWxuczpzZXJpZj0iaHR0cDovL3d3dy5zZXJpZi5jb20vIiBjbGFzcz0iX3BsdWdfM2J3NmNfMjIiIHN0eWxlPSJmaWxsLXJ1bGU6IGV2ZW5vZGQ7IGNsaXAtcnVsZTogZXZlbm9kZDsgc3Ryb2tlLWxpbmVqb2luOiByb3VuZDsiPjxnPjxjbGlwUGF0aCBpZD0iX2NsaXAxIj48cGF0aCBkPSJNMjIyMjAuMywyMjQ3NC44YzM5LjI1LDQ0LjU3MSA3MS40NjcsOTQuODcxIDk1LjU0MiwxNDkuMTYzYzE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MSIgc3R5bGU9InN0b3AtY29sb3I6IHJnYig4MCwgNiwgMjU1KTsgc3RvcC1vcGFjaXR5OiAxOyI+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==)](https://replugged.dev/install?identifier=YofukashiNo/Distify&source=github)
[![Safe](https://img.shields.io/github/downloads/YofukashiNo/Distify/total.svg?style=social&label=Install%20in%20Replugged&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB2aWV3Qm94PSIwIDAgMjQ1NzkgMjQ1NzkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnNYbGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sU3BhY2U9InByZXNlcnZlIiB4bWxuczpzZXJpZj0iaHR0cDovL3d3dy5zZXJpZi5jb20vIiBjbGFzcz0iX3BsdWdfM2J3NmNfMjIiIHN0eWxlPSJmaWxsLXJ1bGU6IGV2ZW5vZGQ7IGNsaXAtcnVsZTogZXZlbm9kZDsgc3Ryb2tlLWxpbmVqb2luOiByb3VuZDsiPjxnPjxjbGlwUGF0aCBpZD0iX2NsaXAxIj48cGF0aCBkPSJNMjIyMjAuMywyMjQ3NC44YzM5LjI1LDQ0LjU3MSA3MS40NjcsOTQuODcxIDk1LjU0MiwxNDkuMTYzYzE2NC4wOTYsMzY4LjQyNSAxNjIuNDI5LDc5Ni42MDggLTE3Ljk0MiwxMTcwLjFjLTQzLjE0MSw4OS4zMzMgLTk1LjA4NywxNzIuNiAtMTU0LjUwOCwyNDguOTcxYy0yODEuNzMzLDM2My41NjcgLTc2OS43NjcsNDk3LjI5NiAtMTE5Ny40OCwzMjguMTI5Yy0xNzc3LjgyLC02NzguMzc1IC00MTIxLjMyLC0xMjgyLjAzIC01NjcwLjA0LC0yMTQ1Ljg1Yy0zMDExLjE4LC0xNjc5LjU0IC01MDg0LjY3LC0zMjgzLj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c1YzAsMTYzNi4wMyAtNjQ5LjkxMiwzMjA1LjA2IC0xODA2Ljc2LDQzNjEuOTJjLTE0OTMuNDYsMTQ5My40NSAtMTU2OS41NSwzODkwLjMgLTE3My44MjEsNTQ3NS40NmM4NzguMyw5OTcuNTE3IDE1NzkuNjUsMTc5NC4wNSAxNzY3LjM2LDIwMDcuMjVsLTAuMDA0LDAuMDQxWiI+PC9wYXRoPjwvY2xpcFBhdGg+PGcgY2xpcC1wYXRoPSJ1cmwoI19jbGlwMSkiPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIyNDU3OSIgaGVpZ2h0PSIyNDU3OSIgc3R5bGU9ImZpbGw6IHVybCgmcXVvdDsjX0xpbmVhcjImcXVvdDspOyI+PC9yZWN0PjwvZz48L2c+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJfTGluZWFyMiIgeDE9IjAiIHkxPSIwIiB4Mj0iMSIgeTI9IjAiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDI0NTc5LC0yNDU3OSwyNDU3OSwyNDU3OSwwLDI0NTc5KSI+PHN0b3Agb2Zmc2V0PSIwIiBzdHlsZT0ic3RvcC1jb2xvcjogcmdiKDI1NSwgMzIsIDYyKTsgc3RvcC1vcGFjaXR5OiAxOyI+PC9zdG9wPjxzdG9wIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6IHJnYig4MCwgNiwgMjU1KTsgc3RvcC1vcGFjaXR5OiAxOyI+PC9zdG9wPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==)](https://replugged.dev/install?identifier=YofukashiNo/Distify&source=github)

![distify](https://i.imgur.com/i7r0j9L.png)

Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"version": "1.0.5",
"updater": {
"type": "store",
"id": "dev.yofukashino.Distify"
"type": "github",
"id": "YofukashiNo/Distify"
},
"license": "MIT",
"type": "replugged-plugin",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Injector, Logger } from "replugged";
export const PluginLogger = Logger.plugin("Distify");
export const PluginLogger = Logger.plugin("Distify", "#b380ff");
export const PluginInjector = new Injector();
export const { utils: PluginInjectorUtils } = PluginInjector;
import Injections from "./injections/index";

export const start = (): void => {
void Injections.applyInjections();
void Injections.applyInjections().catch((err) => PluginLogger.error(err));
};

export const stop = (): void => {
Expand Down
20 changes: 16 additions & 4 deletions src/lib/requiredModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@ import Types from "../types";
export const Modules: Types.Modules = {};

Modules.loadModules = async (): Promise<void> => {
Modules.ElementParser ??= await webpack.waitForProps<Types.ElementParser>(
"sanitizeUrl",
"sanitizeText",
);
Modules.ElementParser ??= await webpack
.waitForProps<Types.ElementParser>(["sanitizeUrl", "sanitizeText"], {
timeout: 10000,
})
.catch(() => {
throw new Error("Failed To Find ElementParser Module");
});

Modules.ConnectedAccountsUtils ??= await webpack
.waitForProps<Types.ConnectedAccountsUtils>(["setShowActivity", "refreshAccessToken"], {
timeout: 10000,
})
.catch(() => {
throw new Error("Failed To Find ConnectedAccountsUtils Module");
});

Modules.ConnectedAccountsStore ??=
webpack.getByStoreName<Types.ConnectedAccountsStore>("ConnectedAccountsStore");
Modules.SpotifyStore ??= webpack.getByStoreName<Types.SpotifyStore>("SpotifyStore");
Expand Down
41 changes: 29 additions & 12 deletions src/lib/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,21 @@ export const ensureSpotifyPlayer = (): Promise<{
if (activePlayer) return Promise.resolve(activePlayer);
const playableDevices = SpotifyStore.getPlayableComputerDevices();
if (playableDevices.length > 0) {
const [{ socket, device }] = playableDevices;
return Promise.resolve({
socket,
device,
});
const playablePlayer = playableDevices.find(
({ socket, device }) => socket?.connected && device?.is_active != null,
);
return Promise.resolve(playablePlayer ?? {});
}
return new Promise((res) => {
const timer = { timeout: null };
const changeListerner = () => {
const playableDevices = SpotifyStore.getPlayableComputerDevices();
const [{ socket, device }] = playableDevices;
const playablePlayer = playableDevices.find(
({ socket, device }) => socket?.connected && device?.is_active != null,
);
clearTimeout(timer?.timeout);
SpotifyStore.removeChangeListener(changeListerner);
res({
socket,
device,
});
res(playablePlayer ?? {});
};
SpotifyStore.addChangeListener(changeListerner);
timer.timeout = setTimeout(() => {
Expand All @@ -56,7 +54,7 @@ export const error = async (res): Promise<Error> => {
return new Error("Unknown Error, Check the console and report the dev");
}
};
export const play = async (type: string, id: string): Promise<void> => {
export const play = async (type: string, id: string, retry?: boolean): Promise<void> => {
const { socket, device } = await ensureSpotifyPlayer();
if (!socket?.accessToken) {
throw new Error("Please link your Spotify to Discord in Settings > Connections");
Expand All @@ -77,10 +75,20 @@ export const play = async (type: string, id: string): Promise<void> => {
if (SpotifyResponse.ok) {
return;
}
if (!retry) {
const accecssToken = (await Modules.ConnectedAccountsUtils.refreshAccessToken(
"spotify",
socket?.accountId,
)) as string;
if (socket.accessToken !== accecssToken) socket.accessToken = accecssToken;
play(type, id, true);
return;
}

throw await error(SpotifyResponse);
};

export const queue = async (type: string, id: string): Promise<void> => {
export const queue = async (type: string, id: string, retry?: boolean): Promise<void> => {
const { socket, device } = await ensureSpotifyPlayer();
if (!socket?.accessToken) {
throw new Error("Please link your Spotify to Discord in Settings > Connections");
Expand All @@ -100,6 +108,15 @@ export const queue = async (type: string, id: string): Promise<void> => {
if (SpotifyResponse.ok) {
return;
}
if (!retry) {
const accecssToken = (await Modules.ConnectedAccountsUtils.refreshAccessToken(
"spotify",
socket?.accountId,
)) as string;
if (socket.accessToken !== accecssToken) socket.accessToken = accecssToken;
queue(type, id, true);
return;
}
throw await error(SpotifyResponse);
};

Expand Down
19 changes: 19 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ export namespace Types {
shouldShowActivity: DefaultTypes.AnyFunction;
wasAutoPaused: DefaultTypes.AnyFunction;
}
export interface ConnectedAccountsUtils {
authorize: DefaultTypes.AnyFunction;
callback: DefaultTypes.AnyFunction;
completeTwoWayLink: DefaultTypes.AnyFunction;
connect: DefaultTypes.AnyFunction;
disconnect: DefaultTypes.AnyFunction;
fetch: DefaultTypes.AnyFunction;
joinServer: DefaultTypes.AnyFunction;
linkDispatchAuthCallback: DefaultTypes.AnyFunction;
refresh: DefaultTypes.AnyFunction;
refreshAccessToken: DefaultTypes.AnyFunction;
setFriendSync: DefaultTypes.AnyFunction;
setMetadataVisibility: DefaultTypes.AnyFunction;
setShowActivity: DefaultTypes.AnyFunction;
setVisibility: DefaultTypes.AnyFunction;
submitPinCode: DefaultTypes.AnyFunction;
update: DefaultTypes.AnyFunction;
}
export interface SpotifySocket {
accessToken: string;
accountId: string;
Expand Down Expand Up @@ -114,6 +132,7 @@ export namespace Types {
export interface Modules {
loadModules?: () => Promise<void>;
ConnectedAccountsStore?: ConnectedAccountsStore;
ConnectedAccountsUtils?: ConnectedAccountsUtils;
ElementParser?: ElementParser;
SpotifyStore?: SpotifyStore;
}
Expand Down

0 comments on commit b428b80

Please sign in to comment.