mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-09-10 22:04:53 +02:00
Compare commits
5 Commits
3.0.0
...
207a61d199
Author | SHA1 | Date | |
---|---|---|---|
207a61d199 | |||
|
7b18322e17 | ||
8f47756244 | |||
|
cdcf9431bf | ||
374f3da740 |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -4,6 +4,22 @@ 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/),
|
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).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## 4.0.0
|
||||||
|
|
||||||
|
- Updated to Electron 19.0.5
|
||||||
|
|
||||||
|
## 3.1.1
|
||||||
|
|
||||||
|
- Media update timeout set to 500 instead of 200
|
||||||
|
- Updated property name for duration because of a tidal update
|
||||||
|
- flag for "disable hardware media keys" now working again
|
||||||
|
|
||||||
|
## 3.1.0
|
||||||
|
|
||||||
|
- Added a separate advanced options settings panel with flags
|
||||||
|
- Added gpu-rasterization flag
|
||||||
|
- config setting `disableHardwareMediaKeys` moved to `flags.disableHardwareMediaKeys`, it will be migrated automatically
|
||||||
|
|
||||||
## 3.0.0
|
## 3.0.0
|
||||||
|
|
||||||
- Updated to Electron 15
|
- Updated to Electron 15
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
appId: com.rickvanlieshout.tidal-hifi
|
appId: com.rickvanlieshout.tidal-hifi
|
||||||
electronVersion: 15.5.2
|
electronVersion: 19.0.5
|
||||||
electronDownload:
|
electronDownload:
|
||||||
version: 15.5.2-wvvmp
|
version: 19.0.5+wvcus
|
||||||
mirror: https://github.com/castlabs/electron-releases/releases/download/v
|
mirror: https://github.com/castlabs/electron-releases/releases/download/v
|
||||||
snap:
|
snap:
|
||||||
plugs:
|
plugs:
|
||||||
|
511
package-lock.json
generated
511
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tidal-hifi",
|
"name": "tidal-hifi",
|
||||||
"version": "3.0.0",
|
"version": "4.0.0",
|
||||||
"description": "Tidal on Electron with widevine(hifi) support",
|
"description": "Tidal on Electron with widevine(hifi) support",
|
||||||
"main": "src/main.js",
|
"main": "src/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -34,8 +34,8 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@mastermindzh/prettier-config": "^1.0.0",
|
"@mastermindzh/prettier-config": "^1.0.0",
|
||||||
"electron": "git+https://github.com/castlabs/electron-releases.git#v15.5.2-wvvmp",
|
"electron": "git+https://github.com/castlabs/electron-releases.git#v19.0.5+wvcus",
|
||||||
"electron-builder": "^22.14.5",
|
"electron-builder": "^23.2.0",
|
||||||
"prettier": "^2.5.0"
|
"prettier": "^2.5.0"
|
||||||
},
|
},
|
||||||
"prettier": "@mastermindzh/prettier-config"
|
"prettier": "@mastermindzh/prettier-config"
|
||||||
|
6
src/constants/flags.js
Normal file
6
src/constants/flags.js
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
const flags = {
|
||||||
|
gpuRasterization: [{ flag: "enable-gpu-rasterization", value: undefined }],
|
||||||
|
disableHardwareMediaKeys: [{ flag: "disable-features", value: "HardwareMediaKeyHandling" }],
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = flags;
|
@@ -21,6 +21,10 @@ const settings = {
|
|||||||
},
|
},
|
||||||
singleInstance: "singleInstance",
|
singleInstance: "singleInstance",
|
||||||
disableHardwareMediaKeys: "disableHardwareMediaKeys",
|
disableHardwareMediaKeys: "disableHardwareMediaKeys",
|
||||||
|
flags: {
|
||||||
|
disableHardwareMediaKeys: "flags.disableHardwareMediaKeys",
|
||||||
|
gpuRasterization: "flags.gpuRasterization",
|
||||||
|
},
|
||||||
mpris: "mpris",
|
mpris: "mpris",
|
||||||
enableCustomHotkeys: "enableCustomHotkeys",
|
enableCustomHotkeys: "enableCustomHotkeys",
|
||||||
trayIcon: "trayIcon",
|
trayIcon: "trayIcon",
|
||||||
|
33
src/main.js
33
src/main.js
@@ -1,5 +1,5 @@
|
|||||||
require("@electron/remote/main").initialize();
|
require("@electron/remote/main").initialize();
|
||||||
const { app, BrowserWindow, globalShortcut, ipcMain } = require("electron");
|
const { app, BrowserWindow, components, globalShortcut, ipcMain } = require("electron");
|
||||||
const {
|
const {
|
||||||
settings,
|
settings,
|
||||||
store,
|
store,
|
||||||
@@ -17,20 +17,30 @@ const mediaKeys = require("./constants/mediaKeys");
|
|||||||
const mediaInfoModule = require("./scripts/mediaInfo");
|
const mediaInfoModule = require("./scripts/mediaInfo");
|
||||||
const discordModule = require("./scripts/discord");
|
const discordModule = require("./scripts/discord");
|
||||||
const globalEvents = require("./constants/globalEvents");
|
const globalEvents = require("./constants/globalEvents");
|
||||||
|
const flagValues = require("./constants/flags");
|
||||||
|
|
||||||
let mainWindow;
|
let mainWindow;
|
||||||
let icon = path.join(__dirname, "../assets/icon.png");
|
let icon = path.join(__dirname, "../assets/icon.png");
|
||||||
|
|
||||||
/**
|
setFlags();
|
||||||
* Fix Display Compositor issue.
|
|
||||||
*/
|
|
||||||
app.commandLine.appendSwitch("disable-seccomp-filter-sandbox");
|
|
||||||
|
|
||||||
/**
|
function setFlags() {
|
||||||
* Disable media keys when requested
|
const flags = store.get().flags;
|
||||||
*/
|
if (flags) {
|
||||||
if (store.get(settings.disableHardwareMediaKeys)) {
|
for (const [key, value] of Object.entries(flags)) {
|
||||||
app.commandLine.appendSwitch("disable-features", "HardwareMediaKeyHandling");
|
if (value) {
|
||||||
|
flagValues[key].forEach((flag) => {
|
||||||
|
console.log(`enabling command line switch ${flag.flag} with value ${flag.value}`);
|
||||||
|
app.commandLine.appendSwitch(flag.flag, flag.value);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fix Display Compositor issue.
|
||||||
|
*/
|
||||||
|
app.commandLine.appendSwitch("disable-seccomp-filter-sandbox");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -114,8 +124,9 @@ function addGlobalShortcuts() {
|
|||||||
// This method will be called when Electron has finished
|
// This method will be called when Electron has finished
|
||||||
// initialization and is ready to create browser windows.
|
// initialization and is ready to create browser windows.
|
||||||
// Some APIs can only be used after this event occurs.
|
// Some APIs can only be used after this event occurs.
|
||||||
app.on("ready", () => {
|
app.on("ready", async () => {
|
||||||
if (isMainInstanceOrMultipleInstancesAllowed()) {
|
if (isMainInstanceOrMultipleInstancesAllowed()) {
|
||||||
|
await components.whenReady();
|
||||||
createWindow();
|
createWindow();
|
||||||
addMenu();
|
addMenu();
|
||||||
createSettingsWindow();
|
createSettingsWindow();
|
||||||
|
@@ -11,7 +11,8 @@ let trayIcon,
|
|||||||
menuBar,
|
menuBar,
|
||||||
mutedArtists,
|
mutedArtists,
|
||||||
singleInstance,
|
singleInstance,
|
||||||
disableHardwareMediaKeys;
|
disableHardwareMediaKeys,
|
||||||
|
gpuRasterization;
|
||||||
|
|
||||||
const { store, settings } = require("./../../scripts/settings");
|
const { store, settings } = require("./../../scripts/settings");
|
||||||
const { ipcRenderer } = require("electron");
|
const { ipcRenderer } = require("electron");
|
||||||
@@ -35,7 +36,8 @@ function refreshSettings() {
|
|||||||
muteArtists.checked = store.get(settings.muteArtists);
|
muteArtists.checked = store.get(settings.muteArtists);
|
||||||
mutedArtists.value = store.get(settings.mutedArtists).join("\n");
|
mutedArtists.value = store.get(settings.mutedArtists).join("\n");
|
||||||
singleInstance.checked = store.get(settings.singleInstance);
|
singleInstance.checked = store.get(settings.singleInstance);
|
||||||
disableHardwareMediaKeys.checked = store.get(settings.disableHardwareMediaKeys);
|
disableHardwareMediaKeys.checked = store.get(settings.flags.disableHardwareMediaKeys);
|
||||||
|
gpuRasterization.checked = store.get(settings.flags.gpuRasterization);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -117,6 +119,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
mutedArtists = get("mutedArtists");
|
mutedArtists = get("mutedArtists");
|
||||||
singleInstance = get("singleInstance");
|
singleInstance = get("singleInstance");
|
||||||
disableHardwareMediaKeys = get("disableHardwareMediaKeys");
|
disableHardwareMediaKeys = get("disableHardwareMediaKeys");
|
||||||
|
gpuRasterization = get("gpuRasterization");
|
||||||
|
|
||||||
refreshSettings();
|
refreshSettings();
|
||||||
|
|
||||||
@@ -133,5 +136,6 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
addInputListener(muteArtists, settings.muteArtists);
|
addInputListener(muteArtists, settings.muteArtists);
|
||||||
addTextAreaListener(mutedArtists, settings.mutedArtists);
|
addTextAreaListener(mutedArtists, settings.mutedArtists);
|
||||||
addInputListener(singleInstance, settings.singleInstance);
|
addInputListener(singleInstance, settings.singleInstance);
|
||||||
addInputListener(disableHardwareMediaKeys, settings.disableHardwareMediaKeys);
|
addInputListener(disableHardwareMediaKeys, settings.flags.disableHardwareMediaKeys);
|
||||||
|
addInputListener(gpuRasterization, settings.flags.gpuRasterization);
|
||||||
});
|
});
|
||||||
|
@@ -37,6 +37,9 @@
|
|||||||
<input type="radio" name="tabset" id="integrations" />
|
<input type="radio" name="tabset" id="integrations" />
|
||||||
<label for="integrations">Integrations</label>
|
<label for="integrations">Integrations</label>
|
||||||
|
|
||||||
|
<!-- advanced tab -->
|
||||||
|
<input type="radio" name="tabset" id="advanced" />
|
||||||
|
<label for="advanced">Advanced</label>
|
||||||
<!-- about tab -->
|
<!-- about tab -->
|
||||||
<input type="radio" name="tabset" id="about" />
|
<input type="radio" name="tabset" id="about" />
|
||||||
<label for="about">About</label>
|
<label for="about">About</label>
|
||||||
@@ -122,17 +125,6 @@
|
|||||||
<span class="slider round"></span>
|
<span class="slider round"></span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="option">
|
|
||||||
<h4>Disable hardware media keys</h4>
|
|
||||||
<p>
|
|
||||||
Disable built-in media keys. <br />
|
|
||||||
Also prevents certain desktop environments from recognizing the chrome MPRIS client separetely from the custom MPRIS client.
|
|
||||||
</p>
|
|
||||||
<label class="switch">
|
|
||||||
<input id="disableHardwareMediaKeys" type="checkbox">
|
|
||||||
<span class="slider round"></span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="api" class="tab-panel">
|
<section id="api" class="tab-panel">
|
||||||
@@ -196,16 +188,44 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section id="about" class="tab-panel">
|
|
||||||
<div class="section">
|
|
||||||
<img alt="tidal icon" style="width: 100px; height: auto; display: block; margin: 0 auto; margin-bottom: 20px; margin-top: 20px;" src = "./icon.png">
|
|
||||||
<p style="max-width: 350px; display:block; margin: 0 auto; text-align: center;">
|
|
||||||
<a id="openExternal" style="text-decoration: underline; cursor: pointer;" data-url="https://github.com/Mastermindzh/tidal-hifi">Tidal-hifi</a> is made by <a id="openExternal" data-url="https://www.rickvanlieshout.com" style="text-decoration: underline; cursor: pointer;">Rick van Lieshout</a>.<br />
|
|
||||||
It uses <a style="text-decoration: underline; cursor: pointer;" id="openExternal" data-url="https://castlabs.com/">Castlabs'</a> versions of Electron for widevine support.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
<section id="advanced" class="tab-panel">
|
||||||
|
<div class="section">
|
||||||
|
<h3>Flags</h3>
|
||||||
|
<div class="option">
|
||||||
|
<h4>Disable hardware media keys</h4>
|
||||||
|
<p>
|
||||||
|
Disable built-in media keys. <br />
|
||||||
|
Also prevents certain desktop environments from recognizing the chrome MPRIS client separetely from the custom MPRIS client.
|
||||||
|
</p>
|
||||||
|
<label class="switch">
|
||||||
|
<input id="disableHardwareMediaKeys" type="checkbox">
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
<div class="option">
|
||||||
|
<h4>Enable GPU rasterization</h4>
|
||||||
|
<p>
|
||||||
|
Move a part of the rendering to the GPU for increased performance.
|
||||||
|
</p>
|
||||||
|
<label class="switch">
|
||||||
|
<input id="gpuRasterization" type="checkbox">
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- about -->
|
||||||
|
<section id="about" class="tab-panel">
|
||||||
|
<div class="section">
|
||||||
|
<img alt="tidal icon" style="width: 100px; height: auto; display: block; margin: 0 auto; margin-bottom: 20px; margin-top: 20px;" src = "./icon.png">
|
||||||
|
<p style="max-width: 350px; display:block; margin: 0 auto; text-align: center;">
|
||||||
|
<a id="openExternal" style="text-decoration: underline; cursor: pointer;" data-url="https://github.com/Mastermindzh/tidal-hifi">Tidal-hifi</a> is made by <a id="openExternal" data-url="https://www.rickvanlieshout.com" style="text-decoration: underline; cursor: pointer;">Rick van Lieshout</a>.<br />
|
||||||
|
It uses <a style="text-decoration: underline; cursor: pointer;" id="openExternal" data-url="https://castlabs.com/">Castlabs'</a> versions of Electron for widevine support.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<small>Some settings require a restart of Tidal-hifi. To do so, click the button below:</small>
|
<small>Some settings require a restart of Tidal-hifi. To do so, click the button below:</small>
|
||||||
<button id="restart" style ="width: 100%">Restart Tidal-hifi</button>
|
<button id="restart" style ="width: 100%">Restart Tidal-hifi</button>
|
||||||
|
@@ -37,7 +37,7 @@ const elements = {
|
|||||||
media: '*[data-test="current-media-imagery"]',
|
media: '*[data-test="current-media-imagery"]',
|
||||||
image: "img",
|
image: "img",
|
||||||
current: '*[data-test="current-time"]',
|
current: '*[data-test="current-time"]',
|
||||||
duration: '*[data-test="duration-time"]',
|
duration: '*[data-test="duration"]',
|
||||||
bar: '*[data-test="progress-bar"]',
|
bar: '*[data-test="progress-bar"]',
|
||||||
footer: "#footerPlayer",
|
footer: "#footerPlayer",
|
||||||
album_header_title: '.header-details [data-test="title"]',
|
album_header_title: '.header-details [data-test="title"]',
|
||||||
@@ -429,7 +429,7 @@ setInterval(function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 200);
|
}, 500);
|
||||||
|
|
||||||
if (process.platform === "linux" && store.get(settings.mpris)) {
|
if (process.platform === "linux" && store.get(settings.mpris)) {
|
||||||
try {
|
try {
|
||||||
|
@@ -24,6 +24,19 @@ const store = new Store({
|
|||||||
enableCustomHotkeys: false,
|
enableCustomHotkeys: false,
|
||||||
enableDiscord: false,
|
enableDiscord: false,
|
||||||
windowBounds: { width: 800, height: 600 },
|
windowBounds: { width: 800, height: 600 },
|
||||||
|
flags: {
|
||||||
|
gpuRasterization: true,
|
||||||
|
disableHardwareMediaKeys: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
migrations: {
|
||||||
|
"3.1.0": (migrationStore) => {
|
||||||
|
console.log("running migrations for 3.1.0");
|
||||||
|
migrationStore.set(
|
||||||
|
settings.flags.disableHardwareMediaKeys,
|
||||||
|
migrationStore.get("disableHardwareMediaKeys") ?? false
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user