Skip to content

Commit

Permalink
chore(AnimeLib): remove unnecessary getStrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitosight committed Dec 28, 2024
1 parent 37953c6 commit 005a17f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 2 additions & 0 deletions websites/A/AnimeLib/lib.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable camelcase */

interface CommonData {
id: number;
name: string;
Expand Down
14 changes: 5 additions & 9 deletions websites/A/AnimeLib/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ presence.on("UpdateData", async () => {
startTimestamp: browsingTimestamp,
smallImageText: "AnimeLIB",
},
strings = await presence.getStrings({
play: "general.playing",
pause: "general.paused",
}),
isWatchingPrivately = await presence.getSetting<boolean>(
"private-watching"
),
Expand Down Expand Up @@ -107,7 +103,7 @@ presence.on("UpdateData", async () => {
presenceData.largeImageKey = animeData.cover.default;

presenceData.smallImageKey = Assets.Pause;
presenceData.smallImageText = strings.pause;
presenceData.smallImageText = "На паузе";
}

if (video || iFrameVideo) {
Expand All @@ -118,8 +114,8 @@ presence.on("UpdateData", async () => {
? Assets.Pause
: Assets.Play;
presenceData.smallImageText = video.paused
? strings.pause
: strings.play;
? "На паузе"
: "Воспроизводится";

iFrameVideo = null;
} else {
Expand All @@ -131,8 +127,8 @@ presence.on("UpdateData", async () => {
? Assets.Pause
: Assets.Play;
presenceData.smallImageText = iFrameVideo.paused
? strings.pause
: strings.play;
? "На паузе"
: "Воспроизводится";
}

presenceData.startTimestamp = startTimestamp;
Expand Down

0 comments on commit 005a17f

Please sign in to comment.