yaamp: upgrade to 0.0.4
This commit is contained in:
parent
82aa812048
commit
b3dfe23750
@ -1,6 +1,7 @@
|
|||||||
--- yaamp-0.0.1/package.json 2023-10-22 18:12:32.000000000 +0600
|
diff -Naur a/package.json b/package.json
|
||||||
+++ yaamp-0.0.1/package.json.linux 2023-11-20 12:06:56.489617767 +0600
|
--- a/package.json 2024-01-29 22:04:04.000000000 +0600
|
||||||
@@ -7,8 +7,8 @@
|
+++ b/package.json 2024-02-27 13:27:32.434079494 +0600
|
||||||
|
@@ -7,19 +7,19 @@
|
||||||
"main": false
|
"main": false
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -11,16 +12,22 @@
|
|||||||
"build": "yarn run copy && yarn build:src",
|
"build": "yarn run copy && yarn build:src",
|
||||||
"build:src": "npx parcel build --public-url ./ ./src/index.html",
|
"build:src": "npx parcel build --public-url ./ ./src/index.html",
|
||||||
"watch": "npx parcel watch --public-url ./ --hmr-hostname 127.0.0.1 --hmr-port 54439 ./src/index.html",
|
"watch": "npx parcel watch --public-url ./ --hmr-hostname 127.0.0.1 --hmr-port 54439 ./src/index.html",
|
||||||
@@ -23,7 +23,7 @@
|
"test": "jest",
|
||||||
|
"electron": "./node_modules/.bin/electron .",
|
||||||
|
"start": "yarn run build && electron .",
|
||||||
|
- "pack:win": "electron-builder build -w --x64",
|
||||||
|
- "pack:linux": "electron-builder build -l --x64",
|
||||||
|
- "pack:mac": "electron-builder build -m --x64",
|
||||||
|
+ "pack:win": "./node_modules/electron-builder/cli.js build -w --x64",
|
||||||
|
+ "pack:linux": "./node_modules/electron-builder/cli.js build -l --x64",
|
||||||
|
+ "pack:mac": "./node_modules/electron-builder/cli.js build -m --x64",
|
||||||
|
"pack": "yarn run pack:win && yarn run pack:linux && yarn run pack:mac",
|
||||||
|
- "dist": "yarn run build && build --x64"
|
||||||
|
+ "dist": "yarn run build && ./node_modules/electron-builder/cli.js build --x64"
|
||||||
},
|
},
|
||||||
"homepage": "https://yaamp.ru",
|
"homepage": "https://yaamp.ru",
|
||||||
"repository": "https://github.com/umnik1/yaamp",
|
"repository": "https://github.com/umnik1/yaamp",
|
||||||
- "author": "Maksim Chingin",
|
@@ -84,8 +84,7 @@
|
||||||
+ "author": "Maksim Chingin <someone@example.com>",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"axios": "^1.5.1",
|
|
||||||
@@ -84,8 +83,7 @@
|
|
||||||
},
|
},
|
||||||
"linux": {
|
"linux": {
|
||||||
"target": [
|
"target": [
|
||||||
|
@ -1,67 +1,102 @@
|
|||||||
--- yaamp-0.0.1/main.js_ 2023-10-22 18:12:32.000000000 +0600
|
diff -Naur a/main.js b/main.js
|
||||||
+++ yaamp-0.0.1/main.js 2023-11-20 13:29:34.191950115 +0600
|
--- a/main.js 2024-01-29 22:04:04.000000000 +0600
|
||||||
@@ -292,35 +292,35 @@
|
+++ b/main.js 2024-02-27 11:16:45.506897863 +0600
|
||||||
})
|
@@ -3,7 +3,7 @@
|
||||||
|
const url = require('url')
|
||||||
|
const { ipcMain, webContents, session, remote } = require('electron')
|
||||||
|
const crypto = require("crypto");
|
||||||
|
-const DiscordRPC = require('discord-rpc');
|
||||||
|
+//const DiscordRPC = require('discord-rpc');
|
||||||
|
|
||||||
// Discord Integration
|
const checkForUpdatesAndNotify = require('./src/node/updates.js')
|
||||||
- await client.tracks.getTracks({"track-ids": [trackid]}).then((data) => {
|
const interceptStreamProtocol = require('./src/node/protocol.js')
|
||||||
- const element = data.result[0];
|
@@ -39,11 +39,11 @@
|
||||||
- const startTimestamp = new Date();
|
const sessionId = crypto.randomBytes(20).toString('hex');
|
||||||
-
|
const clientId = '1161295534770892860';
|
||||||
- let artist = [];
|
|
||||||
-
|
|
||||||
- element.artists.forEach((a) => {
|
|
||||||
- artist.push(a.name);
|
|
||||||
- });
|
|
||||||
-
|
|
||||||
- const presObj = {
|
|
||||||
- details: `${element.title}`,
|
|
||||||
- state: `${artist.join(', ')}`,
|
|
||||||
- largeImageKey: 'https://' + element.coverUri.replace("%%", "200x200"),
|
|
||||||
- largeImageText: `${artist.join(', ')} - ${element.title}`,
|
|
||||||
- smallImageKey: 'https://yaamp.ru/icon.png',
|
|
||||||
- smallImageText: 'Yaamp.ru',
|
|
||||||
- buttons: [
|
|
||||||
- {
|
|
||||||
- label: 'Listen this track',
|
|
||||||
- url: `https://music.yandex.ru/track/${element.id}`,
|
|
||||||
- },
|
|
||||||
- ],
|
|
||||||
- };
|
|
||||||
-
|
|
||||||
- rpc.setActivity(presObj);
|
|
||||||
-
|
|
||||||
- return data;
|
|
||||||
- })
|
|
||||||
+// await client.tracks.getTracks({"track-ids": [trackid]}).then((data) => {
|
|
||||||
+// const element = data.result[0];
|
|
||||||
+// const startTimestamp = new Date();
|
|
||||||
+//
|
|
||||||
+// let artist = [];
|
|
||||||
+//
|
|
||||||
+// element.artists.forEach((a) => {
|
|
||||||
+// artist.push(a.name);
|
|
||||||
+// });
|
|
||||||
+//
|
|
||||||
+// const presObj = {
|
|
||||||
+// details: `${element.title}`,
|
|
||||||
+// state: `${artist.join(', ')}`,
|
|
||||||
+// largeImageKey: 'https://' + element.coverUri.replace("%%", "200x200"),
|
|
||||||
+// largeImageText: `${artist.join(', ')} - ${element.title}`,
|
|
||||||
+// smallImageKey: 'https://yaamp.ru/icon.png',
|
|
||||||
+// smallImageText: 'Yaamp.ru',
|
|
||||||
+// buttons: [
|
|
||||||
+// {
|
|
||||||
+// label: 'Listen this track',
|
|
||||||
+// url: `https://music.yandex.ru/track/${element.id}`,
|
|
||||||
+// },
|
|
||||||
+// ],
|
|
||||||
+// };
|
|
||||||
+//
|
|
||||||
+// rpc.setActivity(presObj);
|
|
||||||
+//
|
|
||||||
+// return data;
|
|
||||||
+// })
|
|
||||||
|
|
||||||
return data;
|
-DiscordRPC.register(clientId);
|
||||||
|
+//DiscordRPC.register(clientId);
|
||||||
|
|
||||||
|
-const rpc = new DiscordRPC.Client({ transport: 'ipc' });
|
||||||
|
+//const rpc = new DiscordRPC.Client({ transport: 'ipc' });
|
||||||
|
|
||||||
|
-rpc.login({ clientId }).catch(console.error);
|
||||||
|
+//rpc.login({ clientId }).catch(console.error);
|
||||||
|
|
||||||
|
// Keep a global reference of the window object, if you don't, the window will
|
||||||
|
// be closed automatically when the JavaScript object is garbage collected.
|
||||||
|
@@ -321,40 +321,40 @@
|
||||||
|
return data;
|
||||||
|
})
|
||||||
|
|
||||||
|
- // Discord Integration
|
||||||
|
-
|
||||||
|
- // Check on uploaded track
|
||||||
|
- if (!/^.*-.*-.*-.*-.*$/.test(trackid)) {
|
||||||
|
- await client.tracks.getTracks({"track-ids": [trackid]}).then((data) => {
|
||||||
|
- const element = data.result[0];
|
||||||
|
- const startTimestamp = new Date();
|
||||||
|
-
|
||||||
|
- let artist = [];
|
||||||
|
-
|
||||||
|
- element.artists.forEach((a) => {
|
||||||
|
- artist.push(a.name);
|
||||||
|
- });
|
||||||
|
-
|
||||||
|
- const presObj = {
|
||||||
|
- details: `${element.title}`,
|
||||||
|
- state: `${artist.join(', ')}`,
|
||||||
|
- largeImageKey: 'https://' + element.coverUri.replace("%%", "200x200"),
|
||||||
|
- largeImageText: `${artist.join(', ')} - ${element.title}`,
|
||||||
|
- smallImageKey: 'https://yaamp.ru/icon.png',
|
||||||
|
- smallImageText: 'Yaamp.ru',
|
||||||
|
- buttons: [
|
||||||
|
- {
|
||||||
|
- label: 'Listen this track',
|
||||||
|
- url: `https://music.yandex.ru/track/${element.id}`,
|
||||||
|
- },
|
||||||
|
- ],
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- rpc.setActivity(presObj);
|
||||||
|
-
|
||||||
|
- return data;
|
||||||
|
- })
|
||||||
|
- }
|
||||||
|
+// // Discord Integration
|
||||||
|
+//
|
||||||
|
+// // Check on uploaded track
|
||||||
|
+// if (!/^.*-.*-.*-.*-.*$/.test(trackid)) {
|
||||||
|
+// await client.tracks.getTracks({"track-ids": [trackid]}).then((data) => {
|
||||||
|
+// const element = data.result[0];
|
||||||
|
+// const startTimestamp = new Date();
|
||||||
|
+//
|
||||||
|
+// let artist = [];
|
||||||
|
+//
|
||||||
|
+// element.artists.forEach((a) => {
|
||||||
|
+// artist.push(a.name);
|
||||||
|
+// });
|
||||||
|
+//
|
||||||
|
+// const presObj = {
|
||||||
|
+// details: `${element.title}`,
|
||||||
|
+// state: `${artist.join(', ')}`,
|
||||||
|
+// largeImageKey: 'https://' + element.coverUri.replace("%%", "200x200"),
|
||||||
|
+// largeImageText: `${artist.join(', ')} - ${element.title}`,
|
||||||
|
+// smallImageKey: 'https://yaamp.ru/icon.png',
|
||||||
|
+// smallImageText: 'Yaamp.ru',
|
||||||
|
+// buttons: [
|
||||||
|
+// {
|
||||||
|
+// label: 'Listen this track',
|
||||||
|
+// url: `https://music.yandex.ru/track/${element.id}`,
|
||||||
|
+// },
|
||||||
|
+// ],
|
||||||
|
+// };
|
||||||
|
+//
|
||||||
|
+// rpc.setActivity(presObj);
|
||||||
|
+//
|
||||||
|
+// return data;
|
||||||
|
+// })
|
||||||
|
+// }
|
||||||
|
|
||||||
|
return data;
|
||||||
|
} else {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Name: yaamp
|
Name: yaamp
|
||||||
Version: 0.0.1
|
Version: 0.0.4
|
||||||
Release: 1%{dist}
|
Release: 1%{dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Summary: Winamp-like audio player designed to be used with the Yandex.Music service
|
Summary: Winamp-like audio player designed to be used with the Yandex.Music service
|
||||||
@ -14,7 +14,7 @@ Patch1: yaamp-build-fixes.patch
|
|||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: libstdc++-devel
|
BuildRequires: libstdc++-devel
|
||||||
BuildRequires: nodejs-devel >= 12.0
|
BuildRequires: nodejs-devel >= 1:12.0
|
||||||
BuildRequires: npm
|
BuildRequires: npm
|
||||||
BuildRequires: yarnpkg
|
BuildRequires: yarnpkg
|
||||||
BuildRequires: pkgconfig(x11)
|
BuildRequires: pkgconfig(x11)
|
||||||
@ -22,6 +22,9 @@ BuildRequires: pkgconfig(libpng)
|
|||||||
BuildRequires: pkgconfig(zlib)
|
BuildRequires: pkgconfig(zlib)
|
||||||
BuildRequires: pkgconfig(xtst)
|
BuildRequires: pkgconfig(xtst)
|
||||||
|
|
||||||
|
# Damn electron requirements
|
||||||
|
BuildRequires: nss nspr gtk3 atk at-spi2-atk libXcomposite libXdamage libXrandr
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
@ -30,13 +33,16 @@ BuildRequires: pkgconfig(xtst)
|
|||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
npm config set update-notifier false
|
||||||
|
|
||||||
yarn cache clean
|
yarn cache clean
|
||||||
|
|
||||||
yarn global add node-gyp
|
yarn global add node-gyp
|
||||||
|
|
||||||
yarn --link-duplicates --pure-lockfile
|
yarn --link-duplicates --pure-lockfile
|
||||||
|
|
||||||
yarn dist --linux
|
yarn dist --linux --dir
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -55,5 +61,8 @@ install res/icon.png %{buildroot}/%{_datadir}/icons/hicolor/512x512/apps/yaamp.p
|
|||||||
%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
|
%{_datadir}/icons/hicolor/512x512/apps/%{name}.png
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 27 2024 Raven <raven@sysadmins.ws> - 0.0.4-1
|
||||||
|
- update to 0.0.4
|
||||||
|
|
||||||
* Mon Nov 20 2023 Raven <raven@sysadmins.ws> - 0.0.1-1
|
* Mon Nov 20 2023 Raven <raven@sysadmins.ws> - 0.0.1-1
|
||||||
- initial build
|
- initial build
|
Loading…
x
Reference in New Issue
Block a user