Compare commits

..

No commits in common. "master" and "5.18.1" have entirely different histories.

14 changed files with 784 additions and 928 deletions

View File

@ -4,12 +4,12 @@ name: default
steps:
- name: install
image: node:22.17.0
image: node:19.4.0
commands:
- npm install
- name: build_with_linux
image: node:22.17.0
image: node:19.4.0
commands:
- apt-get update && apt-get upgrade -y
- apt-get install -y libarchive-tools rpm

View File

@ -24,27 +24,27 @@ jobs:
node-version: 22.4
- run: npm install
- run: npm run build
# - uses: actions/upload-artifact@master
# with:
# name: linux-builds
# path: dist/
- uses: actions/upload-artifact@master
with:
name: linux-builds
path: dist/
# build_on_mac:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@master
# - uses: actions/setup-node@master
# with:
# node-version: 22.4
# - run: npm install
# - run: npm run build
build_on_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 22.4
- run: npm install
- run: npm run build
# build_on_win:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@master
# - uses: actions/setup-node@master
# with:
# node-version: 22.4
# - run: npm install
# - run: npm run build
build_on_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 22.4
- run: npm install
- run: npm run build

View File

@ -29,30 +29,30 @@ jobs:
name: linux-builds
path: dist/
# build_on_mac:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@master
# - uses: actions/setup-node@master
# with:
# node-version: 22.4
# - run: npm install
# - run: npm run build
# - uses: actions/upload-artifact@master
# with:
# name: mac-builds
# path: ./dist/
build_on_mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 22.4
- run: npm install
- run: npm run build
- uses: actions/upload-artifact@master
with:
name: mac-builds
path: ./dist/
# build_on_win:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@master
# - uses: actions/setup-node@master
# with:
# node-version: 22.4
# - run: npm install
# - run: npm run build
# - uses: actions/upload-artifact@master
# with:
# name: windows-builds
# path: dist/
build_on_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 22.4
- run: npm install
- run: npm run build
- uses: actions/upload-artifact@master
with:
name: windows-builds
path: dist/

2
.nvmrc
View File

@ -1 +1 @@
22.17.0
19.8.1

View File

@ -4,18 +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).
## [5.19.0]
- Fixed the issue where media updates would cease to work after album names can't be found
- Will simply report an empty string when it can't find the album
- Updated various dependencies
## [5.18.2]
- Reverted to sass 1.79.4 to fix `Nix` builds
- Changed electron-builder.base.yml to now generate the correct .desktop entries again
- Should fix flatpak build
## [5.18.1]
- Fixed the login bug

View File

@ -17,25 +17,25 @@ linux:
executableName: tidal-hifi
executableArgs:
[
"--enable-features=UseOzonePlatform",
"--ozone-platform-hint=auto",
"--enable-features=WaylandWindowDecorations",
"--enable-wayland-ime",
"--use-angle",
]
desktop:
entry:
Encoding: "UTF-8"
Name: "TIDAL Hi-Fi"
GenericName: "TIDAL Hi-Fi"
Comment: "The web version of listen.tidal.com running in electron with hifi support thanks to widevine."
Icon: "tidal-hifi"
StartupNotify: "true"
Terminal: "false"
Type: "Application"
Categories: "Network;Application;AudioVideo;Audio;Video"
StartupWMClass: "tidal-hifi"
X-PulseAudio-Properties: "media.role=music"
MimeType: "x-scheme-handler/tidal;"
entry: |
[Desktop Entry]
Encoding=UTF-8
Name=TIDAL Hi-Fi
GenericName=TIDAL Hi-Fi
Comment=The web version of listen.tidal.com running in electron with hifi support thanks to widevine.
Icon=tidal-hifi
StartupNotify=true
Terminal=false
Type=Application
Categories=Network;Application;AudioVideo;Audio;Video
StartupWMClass=tidal-hifi
X-PulseAudio-Properties=media.role=music
MimeType=x-scheme-handler/tidal;
mac:
category: public.app-category.entertainment
win:

1452
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "tidal-hifi",
"version": "5.19.0",
"version": "5.18.1",
"description": "Tidal on Electron with widevine(hifi) support",
"main": "ts-dist/main.js",
"scripts": {
@ -43,12 +43,12 @@
"@electron/remote": "^2.1.2",
"@types/swagger-jsdoc": "^6.0.4",
"@xhayper/discord-rpc": "^1.2.1",
"axios": "^1.9.0",
"axios": "^1.8.4",
"electron-store": "^8.2.0",
"express": "^5.1.0",
"hotkeys-js": "^3.13.11",
"express": "^4.21.2",
"hotkeys-js": "^3.13.9",
"mpris-service": "^2.1.2",
"sass": "1.89.2",
"sass": "^1.79.4",
"swagger-ui-express": "^5.0.1",
"cors": "^2.8.5",
"request": "^2.88.2"
@ -56,28 +56,28 @@
"devDependencies": {
"@mastermindzh/prettier-config": "^1.0.0",
"@types/cors": "^2.8.17",
"@types/express": "^5.0.1",
"@types/node": "^22.0.0",
"@types/express": "^4.17.21",
"@types/node": "^20.14.10",
"@types/request": "^2.48.12",
"@types/swagger-ui-express": "^4.1.8",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"@types/swagger-ui-express": "^4.1.6",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.15.0",
"copyfiles": "^2.4.1",
"electron": "github:castlabs/electron-releases#v35.7.0+wvcus",
"electron": "github:castlabs/electron-releases#v35.1.1+wvcus",
"electron-builder": "~26.0.12",
"eslint": "^9.0.0",
"eslint": "^8.57.0",
"js-yaml": "^4.1.0",
"markdown-toc": "^1.2.0",
"nodemon": "^3.1.9",
"prettier": "^3.5.3",
"stylelint": "^16.18.0",
"stylelint-config-standard": "^38.0.0",
"stylelint-config-standard-scss": "^15.0.0",
"stylelint-prettier": "^5.0.3",
"nodemon": "^3.1.4",
"prettier": "^3.3.2",
"stylelint": "^16.6.1",
"stylelint-config-standard": "^36.0.1",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-prettier": "^5.0.0",
"swagger-jsdoc": "^6.2.8",
"ts-node": "^10.9.2",
"tsc-watch": "^7.0.0",
"typescript": "^5.8.3"
"tsc-watch": "^6.2.0",
"typescript": "^5.5.3"
},
"prettier": "@mastermindzh/prettier-config"
}

View File

@ -1,3 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}

View File

@ -88,9 +88,8 @@ export const addCurrentInfo = (expressApp: Router) => {
* schema:
* $ref: '#/components/schemas/MediaInfo'
*/
expressApp.get("/current", (_req, res) => {
res.json({ ...mediaInfo, artist: mediaInfo.artists });
});
expressApp.get("/current", (req, res) => res.json({ ...mediaInfo, artist: mediaInfo.artists }));
/**
* @swagger
* /current/image:

View File

@ -21,12 +21,8 @@ export const startApi = (mainWindow: BrowserWindow) => {
expressApp.use(cors());
expressApp.use(express.json());
expressApp.use("/docs", swaggerUi.serve, swaggerUi.setup(swaggerSpec));
expressApp.get("/", (req, res) => {
res.send("Hello World!");
});
expressApp.get("/swagger.json", (req, res) => {
res.json(swaggerSpec);
});
expressApp.get("/", (req, res) => res.send("Hello World!"));
expressApp.get("/swagger.json", (req, res) => res.json(swaggerSpec));
// add features
addLegacyApi(expressApp, mainWindow);

View File

@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "TIDAL Hi-Fi API",
"version": "5.19.0",
"version": "5.18.1",
"description": "",
"license": {
"name": "MIT",

View File

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="./settings.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body class="settings-window">
@ -478,7 +478,7 @@
<h4>TIDAL Hi-Fi</h4>
<div class="about-section__version">
<a target="_blank" rel="noopener"
href="https://github.com/Mastermindzh/tidal-hifi/releases/tag/5.19.0">5.19.0</a>
href="https://github.com/Mastermindzh/tidal-hifi/releases/tag/5.18.1">5.18.1</a>
</div>
<div class="about-section__links">
<a target="_blank" rel="noopener" href="https://github.com/mastermindzh/tidal-hifi/"

View File

@ -115,38 +115,34 @@ const elements = {
},
getAlbumName: function () {
try {
//If listening to an album, get its name from the header title
if (globalThis.location.href.includes("/album/")) {
const albumName = globalThis.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 (
globalThis.location.href.includes("/playlist/") ||
globalThis.location.href.includes("/mix/")
) {
if (this.currentlyPlaying === MediaStatus.playing) {
// find the currently playing element from the list (which might be in an album icon), traverse back up to the mediaItem (row) and select the album cell.
// document.querySelector("[class^='isPlayingIcon'], [data-test-is-playing='true']").closest('[data-type="mediaItem"]').querySelector('[class^="album"]').textContent
const row = window.document.querySelector(this.currentlyPlaying).closest(this.mediaItem);
if (row) {
return row.querySelector(this.album_name_cell).textContent;
}
//If listening to an album, get its name from the header title
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/")
) {
if (currentPlayStatus === MediaStatus.playing) {
// find the currently playing element from the list (which might be in an album icon), traverse back up to the mediaItem (row) and select the album cell.
// document.querySelector("[class^='isPlayingIcon'], [data-test-is-playing='true']").closest('[data-type="mediaItem"]').querySelector('[class^="album"]').textContent
const row = window.document.querySelector(this.currentlyPlaying).closest(this.mediaItem);
if (row) {
return row.querySelector(this.album_name_cell).textContent;
}
}
// see whether we're on the queue page and get it from there
const queueAlbumName = this.getText("queue_album");
if (queueAlbumName) {
return queueAlbumName;
}
return "";
} catch {
return "";
}
// see whether we're on the queue page and get it from there
const queueAlbumName = elements.getText("queue_album");
if (queueAlbumName) {
return queueAlbumName;
}
return "";
},
isMuted: function () {