mirror of
https://gitlab.com/deeplydrumming/DeemixFix.git
synced 2026-01-15 08:22:59 -03:00
root folder update: package.json, readme, latest version, credits, gitignore, gitmodules, preload formatting
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -35,6 +35,7 @@ build/Release
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
yarn.lock
|
||||
|
||||
# Typescript v1 declaration files
|
||||
typings/
|
||||
@@ -68,6 +69,6 @@ typings/
|
||||
*.map
|
||||
dev.sh
|
||||
|
||||
# distribution
|
||||
# distribution and temp bundles
|
||||
dist/*
|
||||
server-dist/*
|
||||
webui/public/js/*
|
||||
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -1,3 +1,12 @@
|
||||
[submodule "webui"]
|
||||
path = webui
|
||||
url = ../deemix-webui
|
||||
[submodule "deemix"]
|
||||
path = deemix
|
||||
url = ../deemix
|
||||
[submodule "server"]
|
||||
path = server
|
||||
url = ../server
|
||||
[submodule "spotify-web-api-node"]
|
||||
path = spotify-web-api-node
|
||||
url = ../spotify-web-api-node
|
||||
18
README.md
18
README.md
@@ -1,15 +1,12 @@
|
||||
# deemix-gui
|
||||
An electron app that wraps deemix-webui and lets you use the deemix-js library
|
||||
An hybrid app that wraps deemix-webui and lets you use the deemix-js library
|
||||
|
||||
## Downloads
|
||||
Downloads are available [here](https://www.reddit.com/r/deemix/comments/hmrhhs/download_links/)
|
||||
https://bit.ly/DeemixFixBuilds
|
||||
|
||||
## Running from source
|
||||
You need to use nodejs 16.x, using `yarn` is recommended.
|
||||
You need to use `yarn`.
|
||||
|
||||
If you're using git to get this repo you should use `git submodule update --init --recursive` as well. If you're just downloading the archive.zip, make sure you download and extract deemix-webui into the webui folder.
|
||||
|
||||
Install the dependencies using `yarn install-all` for production.
|
||||
Install the dependencies using `yarn install-all-dev` for development.
|
||||
Then you should be able to run the app with `yarn start`.
|
||||
If you want to further develop deemix-gui and propose a PR, use `yarn dev`
|
||||
@@ -17,10 +14,8 @@ If you want to further develop deemix-gui and propose a PR, use `yarn dev`
|
||||
Commands for easy setup:
|
||||
|
||||
```sh
|
||||
# Production
|
||||
git clone https://gitlab.com/RemixDev/deemix-gui.git . && git submodule update --init --recursive && yarn install-all
|
||||
# Development
|
||||
git clone https://gitlab.com/RemixDev/deemix-gui.git . && git submodule update --init --recursive && yarn install-all-dev
|
||||
git clone https://gitlab.com/deeplydrumming/DeemixFix.git && cd DeemixFix && git submodule update --init --recursive && yarn install-all-dev
|
||||
```
|
||||
|
||||
You can change the default port by setting the environment variable `PORT` to any other number before starting the app.
|
||||
@@ -28,10 +23,7 @@ You can change the default port by setting the environment variable `PORT` to an
|
||||
## Building the app
|
||||
To build the app you need to have git installed and the repo cloned with `git`.
|
||||
Make sure you've installed the dependencies for all packages (the root folder, `server` and `webui`).
|
||||
Then from the root folder run `yarn dist` to make a distributable package for your current OS or `yarn dist-server` to make an executable for only the server.
|
||||
|
||||
## Feature requests
|
||||
Before asking for a feature make sure it isn't an already open issue on the repo
|
||||
Then from the root folder run `yarn dist` to make a distributable package for your current OS or `yarn dist-server` to make an executable for the server versions.
|
||||
|
||||
# License
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
4
credits.txt
Normal file
4
credits.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
https://gitlab.com/RemixDev -> For the original project
|
||||
https://gitlab.com/waLplanet -> For an updated UI
|
||||
https://gitlab.com/uh_wot -> for how to fix a recent Deezer API affecting the download of Spotify playlists
|
||||
|
||||
34
index.js
34
index.js
@@ -6,11 +6,11 @@ const os = require('os')
|
||||
const yargs = require('yargs/yargs')
|
||||
const { hideBin } = require('yargs/helpers')
|
||||
const argv = yargs(hideBin(process.argv)).options({
|
||||
port: { type: 'string', default: '6595' },
|
||||
host: { type: 'string', default: '127.0.0.1' },
|
||||
dev: { type: 'boolean', default: false}
|
||||
port: { type: 'string', default: '6595' },
|
||||
host: { type: 'string', default: '127.0.0.1' },
|
||||
dev: { type: 'boolean', default: false }
|
||||
}).argv
|
||||
const { DeemixServer }= require('./server/dist/app.js')
|
||||
const { DeemixServer } = require('./server/dist/app.js')
|
||||
|
||||
const PORT = process.env.DEEMIX_SERVER_PORT || argv.port
|
||||
process.env.DEEMIX_SERVER_PORT = PORT
|
||||
@@ -41,7 +41,7 @@ function createWindow () {
|
||||
|
||||
win.setMenu(null)
|
||||
|
||||
if (argv.dev){
|
||||
if (argv.dev) {
|
||||
const menu = new Menu()
|
||||
menu.append(new MenuItem({
|
||||
label: 'DevTools',
|
||||
@@ -54,7 +54,7 @@ function createWindow () {
|
||||
}
|
||||
|
||||
// Open links in external browser
|
||||
win.webContents.on('new-window', function(e, url) {
|
||||
win.webContents.on('new-window', function (e, url) {
|
||||
e.preventDefault()
|
||||
shell.openExternal(url)
|
||||
})
|
||||
@@ -62,14 +62,14 @@ function createWindow () {
|
||||
win.loadURL(`http://${argv.host}:${PORT}`)
|
||||
|
||||
if (windowState.maximized) {
|
||||
win.maximize();
|
||||
win.maximize()
|
||||
}
|
||||
|
||||
win.on('close', (event)=>{
|
||||
windowState.saveState(win);
|
||||
if (server.deemixApp.getSettings().settings.clearQueueOnExit){
|
||||
server.deemixApp.cancelAllDownloads()
|
||||
}
|
||||
win.on('close', (event) => {
|
||||
windowState.saveState(win)
|
||||
if (server.deemixApp.getSettings().settings.clearQueueOnExit) {
|
||||
server.deemixApp.cancelAllDownloads()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -95,15 +95,15 @@ app.on('window-all-closed', () => {
|
||||
}
|
||||
})
|
||||
|
||||
ipcMain.on('openDownloadsFolder', (event)=>{
|
||||
ipcMain.on('openDownloadsFolder', (event) => {
|
||||
const { downloadLocation } = server.deemixApp.getSettings().settings
|
||||
shell.openPath(downloadLocation)
|
||||
})
|
||||
|
||||
ipcMain.on('selectDownloadFolder', async (event, downloadLocation)=>{
|
||||
let path = await dialog.showOpenDialog(win, {
|
||||
ipcMain.on('selectDownloadFolder', async (event, downloadLocation) => {
|
||||
const path = await dialog.showOpenDialog(win, {
|
||||
defaultPath: downloadLocation,
|
||||
properties: ["openDirectory", "createDirectory"]
|
||||
properties: ['openDirectory', 'createDirectory']
|
||||
})
|
||||
if (path.filePaths[0]) win.webContents.send("downloadFolderSelected", path.filePaths[0])
|
||||
if (path.filePaths[0]) win.webContents.send('downloadFolderSelected', path.filePaths[0])
|
||||
})
|
||||
|
||||
1
latest.txt
Normal file
1
latest.txt
Normal file
@@ -0,0 +1 @@
|
||||
2024.7.22-r15.2420ef2d75
|
||||
21
package.json
21
package.json
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "deemix-gui",
|
||||
"version": "0.0.0",
|
||||
"name": "deemix-fix",
|
||||
"description": "An hybrid app that wraps deemix-webui and lets you use the deemix-js library",
|
||||
"main": "index.js",
|
||||
"repository": "https://gitlab.com/RemixDev/deemix-gui.git",
|
||||
"author": "RemixDev <RemixDev64@gmail.com>",
|
||||
"repository": "https://gitlab.com/deeplydrumming/DeemixFix2.git",
|
||||
"author": "Deeplydrumming",
|
||||
"license": "GPL-3.0-only",
|
||||
"scripts": {
|
||||
"install-all": "yarn install && yarn --cwd server install --production && yarn --cwd webui install --production",
|
||||
"install-all-dev": "yarn install && yarn --cwd server install && yarn --cwd webui install",
|
||||
"install-all": "yarn install && yarn --cwd deemix install --production && yarn --cwd server install && yarn --cwd spotify-web-api-node install --production && yarn --cwd webui install --production",
|
||||
"install-all-dev": "yarn install && yarn --cwd deemix install && yarn --cwd server install && yarn --cwd spotify-web-api-node install && yarn --cwd webui install",
|
||||
"dev": "yarn --cwd webui dev",
|
||||
"start": "electron . --dev",
|
||||
"start": "electron . --dev ",
|
||||
"predist": "yarn build-server && yarn build-webui",
|
||||
"dist": "yarn set-version && electron-builder && yarn reset-version",
|
||||
"dist:dir": "yarn set-version && yarn predist && electron-builder --dir && yarn reset-version",
|
||||
@@ -21,9 +21,9 @@
|
||||
"reset-version": "node scripts/reset-version.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@yao-pkg/pkg": "5.12.0",
|
||||
"electron": "^22.0.0",
|
||||
"electron-builder": "^23.6.0",
|
||||
"pkg": "^5.8.0"
|
||||
"electron-builder": "^23.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"electron-context-menu": "^3.6.1",
|
||||
@@ -88,5 +88,6 @@
|
||||
"artifactName": "${productName}.${ext}",
|
||||
"requestExecutionLevel": "user"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": "0.0.0"
|
||||
}
|
||||
|
||||
38
preload.js
38
preload.js
@@ -1,25 +1,25 @@
|
||||
const {
|
||||
contextBridge,
|
||||
ipcRenderer
|
||||
} = require("electron");
|
||||
contextBridge,
|
||||
ipcRenderer
|
||||
} = require('electron')
|
||||
|
||||
// Expose protected methods that allow the renderer process to use
|
||||
// the ipcRenderer without exposing the entire object
|
||||
contextBridge.exposeInMainWorld(
|
||||
"api", {
|
||||
send: (channel, data) => {
|
||||
// whitelist channels
|
||||
let validChannels = ["openDownloadsFolder", "selectDownloadFolder"];
|
||||
if (validChannels.includes(channel)) {
|
||||
ipcRenderer.send(channel, data);
|
||||
}
|
||||
},
|
||||
receive: (channel, func) => {
|
||||
let validChannels = ["downloadFolderSelected"];
|
||||
if (validChannels.includes(channel)) {
|
||||
// Deliberately strip event as it includes `sender`
|
||||
ipcRenderer.on(channel, (event, ...args) => func(...args));
|
||||
}
|
||||
}
|
||||
'api', {
|
||||
send: (channel, data) => {
|
||||
// whitelist channels
|
||||
const validChannels = ['openDownloadsFolder', 'selectDownloadFolder']
|
||||
if (validChannels.includes(channel)) {
|
||||
ipcRenderer.send(channel, data)
|
||||
}
|
||||
},
|
||||
receive: (channel, func) => {
|
||||
const validChannels = ['downloadFolderSelected']
|
||||
if (validChannels.includes(channel)) {
|
||||
// Deliberately strip event as it includes `sender`
|
||||
ipcRenderer.on(channel, (event, ...args) => func(...args))
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user