mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-09-12 14:49:40 +02:00
Compare commits
32 Commits
5.7.0
...
98f75418eb
Author | SHA1 | Date | |
---|---|---|---|
98f75418eb | |||
|
0d1a533f71 | ||
000bade444 | |||
69f2e26ca9 | |||
|
60d7da4652 | ||
|
6ef6bc0d40 | ||
89592bcf4d | |||
f5185c6627 | |||
|
a01fcd0791 | ||
|
69eef58f8e | ||
ff060a31e5 | |||
cbc7fc4a4e | |||
173c502143 | |||
|
5111af6a71 | ||
|
f094139794 | ||
b3d9b187c1 | |||
|
276632ea9d | ||
|
c298b73773 | ||
d14dbad9ea | |||
9e8f6a61f3 | |||
387a544b0f | |||
|
76fa8de96c | ||
|
fc2d5d20ca | ||
|
9ba2d0fe26 | ||
d94d42e2bd | |||
|
00db9f753e | ||
696a2730be | |||
6a5814c446 | |||
|
2326c6dd6a | ||
0dadce4596 | |||
9e2cbaed38 | |||
|
b3fffc78ec |
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [5.7.1]
|
||||
|
||||
- Fixed mpris not being set up correctly due to capitalization of the instance name.
|
||||
|
||||
## [5.7.0]
|
||||
|
||||
- Renamed app to TIDAL Hi-Fi.
|
||||
|
54
package-lock.json
generated
54
package-lock.json
generated
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"name": "TIDAL Hi-Fi",
|
||||
"version": "5.6.0",
|
||||
"name": "tidal-hifi",
|
||||
"version": "5.7.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "TIDAL Hi-Fi",
|
||||
"version": "5.6.0",
|
||||
"name": "tidal-hifi",
|
||||
"version": "5.7.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@electron/remote": "^2.0.10",
|
||||
"axios": "^1.4.0",
|
||||
"@electron/remote": "^2.1.0",
|
||||
"axios": "^1.6.4",
|
||||
"discord-rpc": "^4.0.1",
|
||||
"electron-store": "^8.1.0",
|
||||
"express": "^4.18.2",
|
||||
"hotkeys-js": "^3.12.0",
|
||||
"hotkeys-js": "^3.12.1",
|
||||
"mpris-service": "^2.1.2",
|
||||
"request": "^2.88.2",
|
||||
"sass": "^1.64.1"
|
||||
"sass": "^1.69.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mastermindzh/prettier-config": "^1.0.0",
|
||||
@@ -510,9 +510,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@electron/remote": {
|
||||
"version": "2.0.10",
|
||||
"resolved": "https://registry.npmjs.org/@electron/remote/-/remote-2.0.10.tgz",
|
||||
"integrity": "sha512-3SFKKaQXcyWgwmibud+UqJl/XlHOgLcI3fwtB9pNelPSJAcTxocOJrF6FaxBIQaj1+R05Di6xuAswZpXAW7xhA==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@electron/remote/-/remote-2.1.0.tgz",
|
||||
"integrity": "sha512-38jzz2beoYTo0DNS+aoaGyLS/fHeNTAc1Aom6HlYsxKnvVWjcg4xriC7J2IUkYSEDHGKX/D7jUst+mH4dHR6QA==",
|
||||
"peerDependencies": {
|
||||
"electron": ">= 13.0.0"
|
||||
}
|
||||
@@ -1976,11 +1976,11 @@
|
||||
"integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg=="
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz",
|
||||
"integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==",
|
||||
"version": "1.6.4",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.4.tgz",
|
||||
"integrity": "sha512-heJnIs6N4aa1eSthhN9M5ioILu8Wi8vmQW9iHQ9NUvfkJb0lEEDUiIdQNAuBtfUt3FxReaKdpQA5DbmMOqzF/A==",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.0",
|
||||
"follow-redirects": "^1.15.4",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
@@ -4234,9 +4234,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"version": "1.15.4",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz",
|
||||
"integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
@@ -4855,9 +4855,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/hotkeys-js": {
|
||||
"version": "3.12.0",
|
||||
"resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.12.0.tgz",
|
||||
"integrity": "sha512-Z+N573ycUKIGwFYS3ID1RzMJiGmtWMGKMiaNLyJS8B1ei+MllF4ZYmKS2T0kMWBktOz+WZLVNikftEgnukOrXg=="
|
||||
"version": "3.12.1",
|
||||
"resolved": "https://registry.npmjs.org/hotkeys-js/-/hotkeys-js-3.12.1.tgz",
|
||||
"integrity": "sha512-Z0yc462GuhzPGVTveM3QIW/lg8pshmopLRX8DPG8rm67CPMSRqXmdkVzcSmhqSu4ULivhkUeJy9umTPE6i73lg=="
|
||||
},
|
||||
"node_modules/html-tags": {
|
||||
"version": "3.3.1",
|
||||
@@ -6977,9 +6977,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.25",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.25.tgz",
|
||||
"integrity": "sha512-7taJ/8t2av0Z+sQEvNzCkpDynl0tX3uJMCODi6nT3PfASC7dYCWV9aQ+uiCf+KBD4SEFcu+GvJdGdwzQ6OSjCw==",
|
||||
"version": "8.4.31",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
||||
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -7794,9 +7794,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/sass": {
|
||||
"version": "1.64.1",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.64.1.tgz",
|
||||
"integrity": "sha512-16rRACSOFEE8VN7SCgBu1MpYCyN7urj9At898tyzdXFhC+a+yOX5dXwAR7L8/IdPJ1NB8OYoXmD55DM30B2kEQ==",
|
||||
"version": "1.69.5",
|
||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz",
|
||||
"integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==",
|
||||
"dependencies": {
|
||||
"chokidar": ">=3.0.0 <4.0.0",
|
||||
"immutable": "^4.0.0",
|
||||
|
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tidal-hifi",
|
||||
"version": "5.7.0",
|
||||
"version": "5.7.1",
|
||||
"description": "Tidal on Electron with widevine(hifi) support",
|
||||
"main": "ts-dist/main.js",
|
||||
"scripts": {
|
||||
@@ -38,15 +38,15 @@
|
||||
"homepage": "https://github.com/Mastermindzh/tidal-hifi",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@electron/remote": "^2.0.10",
|
||||
"axios": "^1.4.0",
|
||||
"@electron/remote": "^2.1.0",
|
||||
"axios": "^1.6.4",
|
||||
"discord-rpc": "^4.0.1",
|
||||
"electron-store": "^8.1.0",
|
||||
"express": "^4.18.2",
|
||||
"hotkeys-js": "^3.12.0",
|
||||
"hotkeys-js": "^3.12.1",
|
||||
"mpris-service": "^2.1.2",
|
||||
"request": "^2.88.2",
|
||||
"sass": "^1.64.1"
|
||||
"sass": "^1.69.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mastermindzh/prettier-config": "^1.0.0",
|
||||
@@ -72,4 +72,4 @@
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"prettier": "@mastermindzh/prettier-config"
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ import { settingsStore } from "../../scripts/settings";
|
||||
import { Logger } from "../logger";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function addCustomCss(app: any, logger: typeof Logger) {
|
||||
export function addCustomCss(app: any) {
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
const selectedTheme = settingsStore.get<string, string>(settings.theme);
|
||||
if (selectedTheme !== "none") {
|
||||
@@ -13,7 +13,7 @@ export function addCustomCss(app: any, logger: typeof Logger) {
|
||||
const themeFile = fs.existsSync(userThemePath) ? userThemePath : resourcesThemePath;
|
||||
fs.readFile(themeFile, "utf-8", (err, data) => {
|
||||
if (err) {
|
||||
logger.alert("An error ocurred reading the theme file.", err, alert);
|
||||
Logger.alert("An error ocurred reading the theme file.", err, alert);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ let adBlock: HTMLInputElement,
|
||||
discord_details_prefix: HTMLInputElement,
|
||||
discord_button_text: HTMLInputElement;
|
||||
|
||||
addCustomCss(app, Logger.bind(this));
|
||||
addCustomCss(app);
|
||||
|
||||
function getThemeFiles() {
|
||||
const selectElement = document.getElementById("themesList") as HTMLSelectElement;
|
||||
|
@@ -389,7 +389,7 @@
|
||||
<img alt="tidal icon" class="about-section__icon" src="./icon.png" />
|
||||
<h4>TIDAL Hi-Fi</h4>
|
||||
<div class="about-section__version">
|
||||
<a href="">5.7.0</a>
|
||||
<a href="">5.7.1</a>
|
||||
</div>
|
||||
<div class="about-section__links">
|
||||
<a href="https://github.com/mastermindzh/tidal-hifi/" class="about-section__button">Github <i
|
||||
@@ -411,4 +411,4 @@
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
111
src/preload.ts
111
src/preload.ts
@@ -354,6 +354,60 @@ function updateMediaInfo(options: Options, notify: boolean) {
|
||||
}
|
||||
}
|
||||
|
||||
function addMPRIS() {
|
||||
if (process.platform === "linux" && settingsStore.get(settings.mpris)) {
|
||||
try {
|
||||
player = Player({
|
||||
name: "tidal-hifi",
|
||||
identity: "tidal-hifi",
|
||||
supportedUriSchemes: ["file"],
|
||||
supportedMimeTypes: [
|
||||
"audio/mpeg",
|
||||
"audio/flac",
|
||||
"audio/x-flac",
|
||||
"application/ogg",
|
||||
"audio/wav",
|
||||
],
|
||||
supportedInterfaces: ["player"],
|
||||
desktopEntry: "tidal-hifi",
|
||||
});
|
||||
// Events
|
||||
const events = {
|
||||
next: "next",
|
||||
previous: "previous",
|
||||
pause: "pause",
|
||||
playpause: "playpause",
|
||||
stop: "stop",
|
||||
play: "play",
|
||||
loopStatus: "repeat",
|
||||
shuffle: "shuffle",
|
||||
seek: "seek",
|
||||
} as { [key: string]: string };
|
||||
Object.keys(events).forEach(function (eventName) {
|
||||
player.on(eventName, function () {
|
||||
const eventValue = events[eventName];
|
||||
switch (events[eventValue]) {
|
||||
case events.playpause:
|
||||
playPause();
|
||||
break;
|
||||
default:
|
||||
elements.click(eventValue);
|
||||
}
|
||||
});
|
||||
});
|
||||
// Override get position function
|
||||
player.getPosition = function () {
|
||||
return convertDuration(elements.getText("current")) * 1000 * 1000;
|
||||
};
|
||||
player.on("quit", function () {
|
||||
app.quit();
|
||||
});
|
||||
} catch (exception) {
|
||||
Logger.log("MPRIS player api not working", exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateMpris(options: Options) {
|
||||
if (player) {
|
||||
player.metadata = {
|
||||
@@ -517,61 +571,8 @@ setInterval(function () {
|
||||
}
|
||||
}, getUpdateFrequency());
|
||||
|
||||
if (process.platform === "linux" && settingsStore.get(settings.mpris)) {
|
||||
try {
|
||||
player = Player({
|
||||
name: "TIDAL Hi-Fi",
|
||||
identity: "TIDAL Hi-Fi",
|
||||
supportedUriSchemes: ["file"],
|
||||
supportedMimeTypes: [
|
||||
"audio/mpeg",
|
||||
"audio/flac",
|
||||
"audio/x-flac",
|
||||
"application/ogg",
|
||||
"audio/wav",
|
||||
],
|
||||
supportedInterfaces: ["player"],
|
||||
desktopEntry: "tidal-hifi",
|
||||
});
|
||||
// Events
|
||||
const events = {
|
||||
next: "next",
|
||||
previous: "previous",
|
||||
pause: "pause",
|
||||
playpause: "playpause",
|
||||
stop: "stop",
|
||||
play: "play",
|
||||
loopStatus: "repeat",
|
||||
shuffle: "shuffle",
|
||||
seek: "seek",
|
||||
} as { [key: string]: string };
|
||||
Object.keys(events).forEach(function (eventName) {
|
||||
player.on(eventName, function () {
|
||||
const eventValue = events[eventName];
|
||||
switch (events[eventValue]) {
|
||||
case events.playpause:
|
||||
playPause();
|
||||
break;
|
||||
|
||||
default:
|
||||
elements.click(eventValue);
|
||||
}
|
||||
});
|
||||
});
|
||||
// Override get position function
|
||||
player.getPosition = function () {
|
||||
return convertDuration(elements.getText("current")) * 1000 * 1000;
|
||||
};
|
||||
|
||||
player.on("quit", function () {
|
||||
app.quit();
|
||||
});
|
||||
} catch (exception) {
|
||||
console.log("player api not working");
|
||||
}
|
||||
}
|
||||
|
||||
addCustomCss(app, Logger.bind(this));
|
||||
addMPRIS();
|
||||
addCustomCss(app);
|
||||
addHotKeys();
|
||||
addIPCEventListeners();
|
||||
addFullScreenListeners();
|
||||
|
Reference in New Issue
Block a user