mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-05-10 21:13:05 +02:00
Compare commits
No commits in common. "53cecbcd18aab8b7d7b7fa0b55a26c2d1d46a30e" and "d51d5cdc24fb02388008c6c3d619451082e5d673" have entirely different histories.
53cecbcd18
...
d51d5cdc24
@ -4,10 +4,6 @@ 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).
|
||||
|
||||
## 2.7.1
|
||||
|
||||
- Fixed bug: Triggering fullscreen from the Tidal web app would cause the menubar to be visible even if it was disabled in the settings
|
||||
|
||||
## 2.7.0
|
||||
|
||||
- Switched to the native Notifier (removed node-notifier)
|
||||
|
@ -77,7 +77,7 @@ To install and work with the code on this project follow these steps:
|
||||
- Custom hotkeys ([source](https://defkey.com/tidal-desktop-shortcuts))
|
||||
- API for status and playback
|
||||
- Custom [integrations](#integrations)
|
||||
- [Settings feature](./docs/settings.png) to disable certain functionality. (`ctrl+=` or `ctrl+0`)
|
||||
- [Settings feature](./docs/settings.png) to disable certain functionality. (`ctrl+=`)
|
||||
- AlbumArt in integrations ([best-effort](https://github.com/Mastermindzh/tidal-hifi/pull/88#pullrequestreview-840814847))
|
||||
|
||||
## Integrations
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "tidal-hifi",
|
||||
"version": "2.7.1",
|
||||
"version": "2.7.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "tidal-hifi",
|
||||
"version": "2.7.1",
|
||||
"version": "2.7.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"discord-rpc": "^4.0.1",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "tidal-hifi",
|
||||
"version": "2.7.1",
|
||||
"version": "2.7.0",
|
||||
"description": "Tidal on Electron with widevine(hifi) support",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
@ -6,7 +6,6 @@ const globalEvents = {
|
||||
previous: "previous",
|
||||
updateInfo: "update-info",
|
||||
hideSettings: "hideSettings",
|
||||
refreshMenuBar: "refreshMenubar",
|
||||
showSettings: "showSettings",
|
||||
storeChanged: "storeChanged",
|
||||
error: "error",
|
||||
|
17
src/main.js
17
src/main.js
@ -29,14 +29,6 @@ if (!app.isPackaged) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the menuBarVisbility according to the store value
|
||||
*
|
||||
*/
|
||||
function syncMenuBarWithStore() {
|
||||
mainWindow.setMenuBarVisibility(store.get(settings.menuBar));
|
||||
}
|
||||
|
||||
function createWindow(options = {}) {
|
||||
// Create the browser window.
|
||||
mainWindow = new BrowserWindow({
|
||||
@ -56,7 +48,7 @@ function createWindow(options = {}) {
|
||||
},
|
||||
});
|
||||
|
||||
syncMenuBarWithStore();
|
||||
mainWindow.setMenuBarVisibility(store.get(settings.menuBar));
|
||||
|
||||
// load the Tidal website
|
||||
mainWindow.loadURL(tidalUrl);
|
||||
@ -103,7 +95,6 @@ app.on("ready", () => {
|
||||
store.get(settings.trayIcon) && addTray({ icon }) && refreshTray();
|
||||
store.get(settings.api) && expressModule.run(mainWindow);
|
||||
store.get(settings.enableDiscord) && discordModule.initRPC();
|
||||
// mainWindow.webContents.openDevTools();
|
||||
});
|
||||
|
||||
app.on("activate", function () {
|
||||
@ -126,12 +117,8 @@ ipcMain.on(globalEvents.showSettings, (event, arg) => {
|
||||
showSettingsWindow();
|
||||
});
|
||||
|
||||
ipcMain.on(globalEvents.refreshMenuBar, (event, arg) => {
|
||||
syncMenuBarWithStore();
|
||||
});
|
||||
|
||||
ipcMain.on(globalEvents.storeChanged, (event, arg) => {
|
||||
syncMenuBarWithStore();
|
||||
mainWindow.setMenuBarVisibility(store.get(settings.menuBar));
|
||||
|
||||
if (store.get(settings.enableDiscord) && !discordModule.rpc) {
|
||||
discordModule.initRPC();
|
||||
|
@ -82,16 +82,13 @@ const elements = {
|
||||
|
||||
getAlbumName: function () {
|
||||
//If listening to an album, get its name from the header title
|
||||
if (window.location.href.includes("/album/")) {
|
||||
if(window.location.href.includes('/album/')) {
|
||||
const albumName = window.document.querySelector(this.album_header_title);
|
||||
if(albumName) {
|
||||
return albumName.textContent;
|
||||
}
|
||||
//If listening to a playlist or a mix, get album name from the list
|
||||
} else if (
|
||||
window.location.href.includes("/playlist/") ||
|
||||
window.location.href.includes("/mix/")
|
||||
) {
|
||||
} else if(window.location.href.includes('/playlist/') || window.location.href.includes('/mix/')) {
|
||||
if(currentPlayStatus === statuses.playing) {
|
||||
const row = window.document.querySelector(this.playing_title).closest(this.tracklist_row);
|
||||
if(row) {
|
||||
@ -183,9 +180,6 @@ function addHotKeys() {
|
||||
hotkeys.add("control+=", function () {
|
||||
ipcRenderer.send(globalEvents.showSettings);
|
||||
});
|
||||
hotkeys.add("control+0", function () {
|
||||
ipcRenderer.send(globalEvents.showSettings);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -219,12 +213,6 @@ function handleLogout() {
|
||||
);
|
||||
}
|
||||
|
||||
function addFullScreenListeners() {
|
||||
window.document.addEventListener("fullscreenchange", (event) => {
|
||||
ipcRenderer.send(globalEvents.refreshMenuBar);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add ipc event listeners.
|
||||
* Some actions triggered outside of the site need info from the site.
|
||||
@ -343,7 +331,7 @@ setInterval(function () {
|
||||
url: currentURL,
|
||||
current: current,
|
||||
duration: duration,
|
||||
"app-name": appName,
|
||||
'app-name': appName,
|
||||
};
|
||||
|
||||
const playStatusChanged = currentStatus !== currentPlayStatus;
|
||||
@ -464,4 +452,3 @@ if (process.platform === "linux" && store.get(settings.mpris)) {
|
||||
|
||||
addHotKeys();
|
||||
addIPCEventListeners();
|
||||
addFullScreenListeners();
|
||||
|
Loading…
x
Reference in New Issue
Block a user