Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.

Commit

Permalink
New Releases 2.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed May 29, 2022
1 parent b3775d3 commit 336ffd8
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**BetterDiscord**

- PluginRepo _Coming soon if everything is ready_
- [Download latest](https://github.com/Faelayis/RPC-Pc-Status-BetterDiscord/releases/download/v2.4.3/RPCPcStatus.plugin.js)
- [Download latest](https://github.com/Faelayis/RPC-Pc-Status-BetterDiscord/releases/download/v2.4.4/RPCPcStatus.plugin.js)

Original [RPC-Pc-Status](https://github.com/Faelayis/RPC-Pc-Status#readme)<br>

Expand Down
25 changes: 13 additions & 12 deletions RPCPcStatus.plugin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @name RPCPcStatus
* @version 2.4.3
* @version 2.4.4
* @description Rich Presence Pc Status for your Discord
* @authorLink https://discordapp.com/users/328731868096888833
* @author Faelayis
Expand Down Expand Up @@ -34,7 +34,7 @@
const config = {
"info": {
"name": "RPCPcStatus",
"version": "2.4.3",
"version": "2.4.4",
"description": "Rich Presence Pc Status for your Discord",
"authorLink": "https://discordapp.com/users/328731868096888833",
"authors": [{
Expand Down Expand Up @@ -12405,7 +12405,7 @@ function buildPlugin([BasePlugin, PluginApi]) {
}, {
title: "Fixed",
type: "fixed",
items: ["Fix Update pre release create new file", "Settings premid are reset on restart discord", "Features show premid not working"]
items: ["Pre release update loop", " Update pre release create new file", "Settings premid are reset on restart discord", "Features show premid not working"]
}, {
title: "Improved",
type: "improved",
Expand Down Expand Up @@ -12451,19 +12451,20 @@ function buildPlugin([BasePlugin, PluginApi]) {
}
}
async checkForUpdate() {
if (!this.settings.lastVersionSeen || 1 === function(a, b) {
a = a.toLowerCase().split(/[.-]/).map((x => /\d/.test(x[0]) ? x.padStart(10, "0") : x.padEnd(10, "0"))).join("");
b = b.toLowerCase().split(/[.-]/).map((x => /\d/.test(x[0]) ? x.padStart(10, "0") : x.padEnd(10, "0"))).join("");
if (a === b) return 0;
return a < b ? -1 : 1;
}(changelog.version, this.settings.lastChangelogVersionSeen || this.settings.lastVersionSeen)) {
if (!this.settings.lastVersionSeen || changelog.version !== this.settings.lastVersionSeen) {
ZLibrary.Modals.showChangelogModal(changelog.title, changelog.version, changelog.changelog);
this.settings.lastVersionSeen = changelog.version;
delete this.settings.lastChangelogVersionSeen;
this.updateSettings();
}
if (1 === this.settings.updatechannel) ZLibrary.PluginUpdater.checkForUpdate?.("RPCPcStatus", changelog.version, "https://raw.githubusercontent.com/Faelayis/RPC-Pc-Status-BetterDiscord/main/pre-release/RPCPcStatus.plugin.js");
else ZLibrary.PluginUpdater.checkForUpdate?.("RPCPcStatus", changelog.version, "https://raw.githubusercontent.com/Faelayis/RPC-Pc-Status-BetterDiscord/main/RPCPcStatus.plugin.js");
if (1 === this.settings.updatechannel) ZLibrary.PluginUpdater.checkForUpdate?.("RPCPcStatus", changelog.version, "https://raw.githubusercontent.com/Faelayis/RPC-Pc-Status-BetterDiscord/main/pre-release/RPCPcStatus.plugin.js", versioner, comparator);
else ZLibrary.PluginUpdater.checkForUpdate?.("RPCPcStatus", changelog.version, "https://raw.githubusercontent.com/Faelayis/RPC-Pc-Status-BetterDiscord/main/RPCPcStatus.plugin.js", versioner, comparator);
function versioner(file) {
const semVer = new RegExp(/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/);
return file.match(semVer)[0] || "0.0.0";
}
function comparator(current, remote) {
return current !== remote ? true : false;
}
}
formatRAM(freemem, totalmem, decimals = 0) {
if (0 === freemem) return "0 Bytes";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rpc-pc-status-betterdiscord",
"version": "2.4.3",
"version": "2.4.4",
"description": "",
"main": "RPCPcStatus.plugin.js",
"scripts": {
Expand Down
25 changes: 13 additions & 12 deletions pre-release/RPCPcStatus.plugin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @name RPCPcStatus
* @version 2.4.4-beta.2
* @version 2.4.4
* @description Rich Presence Pc Status for your Discord
* @authorLink https://discordapp.com/users/328731868096888833
* @author Faelayis
Expand Down Expand Up @@ -34,7 +34,7 @@
const config = {
"info": {
"name": "RPCPcStatus",
"version": "2.4.4-beta.2",
"version": "2.4.4",
"description": "Rich Presence Pc Status for your Discord",
"authorLink": "https://discordapp.com/users/328731868096888833",
"authors": [{
Expand Down Expand Up @@ -12405,7 +12405,7 @@ function buildPlugin([BasePlugin, PluginApi]) {
}, {
title: "Fixed",
type: "fixed",
items: ["Fix Update pre release create new file", "Settings premid are reset on restart discord", "Features show premid not working"]
items: ["Pre release update loop", " Update pre release create new file", "Settings premid are reset on restart discord", "Features show premid not working"]
}, {
title: "Improved",
type: "improved",
Expand Down Expand Up @@ -12451,19 +12451,20 @@ function buildPlugin([BasePlugin, PluginApi]) {
}
}
async checkForUpdate() {
if (!this.settings.lastVersionSeen || 1 === function(a, b) {
a = a.toLowerCase().split(/[.-]/).map((x => /\d/.test(x[0]) ? x.padStart(10, "0") : x.padEnd(10, "0"))).join("");
b = b.toLowerCase().split(/[.-]/).map((x => /\d/.test(x[0]) ? x.padStart(10, "0") : x.padEnd(10, "0"))).join("");
if (a === b) return 0;
return a < b ? -1 : 1;
}(changelog.version, this.settings.lastChangelogVersionSeen || this.settings.lastVersionSeen)) {
if (!this.settings.lastVersionSeen || changelog.version !== this.settings.lastVersionSeen) {
ZLibrary.Modals.showChangelogModal(changelog.title, changelog.version, changelog.changelog);
this.settings.lastVersionSeen = changelog.version;
delete this.settings.lastChangelogVersionSeen;
this.updateSettings();
}
if (1 === this.settings.updatechannel) ZLibrary.PluginUpdater.checkForUpdate?.("RPCPcStatus", changelog.version, "https://raw.githubusercontent.com/Faelayis/RPC-Pc-Status-BetterDiscord/main/pre-release/RPCPcStatus.plugin.js");
else ZLibrary.PluginUpdater.checkForUpdate?.("RPCPcStatus", changelog.version, "https://raw.githubusercontent.com/Faelayis/RPC-Pc-Status-BetterDiscord/main/RPCPcStatus.plugin.js");
if (1 === this.settings.updatechannel) ZLibrary.PluginUpdater.checkForUpdate?.("RPCPcStatus", changelog.version, "https://raw.githubusercontent.com/Faelayis/RPC-Pc-Status-BetterDiscord/main/pre-release/RPCPcStatus.plugin.js", versioner, comparator);
else ZLibrary.PluginUpdater.checkForUpdate?.("RPCPcStatus", changelog.version, "https://raw.githubusercontent.com/Faelayis/RPC-Pc-Status-BetterDiscord/main/RPCPcStatus.plugin.js", versioner, comparator);
function versioner(file) {
const semVer = new RegExp(/(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?/);
return file.match(semVer)[0] || "0.0.0";
}
function comparator(current, remote) {
return current !== remote ? true : false;
}
}
formatRAM(freemem, totalmem, decimals = 0) {
if (0 === freemem) return "0 Bytes";
Expand Down
2 changes: 1 addition & 1 deletion pre-release/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "2.4.4-beta.2"
"version": "2.4.4"
}
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"info": {
"name": "RPCPcStatus",
"version": "2.4.3",
"version": "2.4.4",
"description": "Rich Presence Pc Status for your Discord",
"authorLink": "https://discordapp.com/users/328731868096888833",
"authors": [
Expand Down

0 comments on commit 336ffd8

Please sign in to comment.