mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-12 02:51:46 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 708ba3167e | |||
| b3c24a5212 | |||
| 9d343bf779 | |||
| cd78db4e84 | |||
| 5648a3020b | |||
| 828e8d472c |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
/dist
|
||||
/assets/generated
|
||||
/assets/generated
|
||||
electron-builder.yml
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 40 KiB |
20
index.js
20
index.js
@ -1,8 +1,9 @@
|
||||
"use strict";
|
||||
const path = require("path");
|
||||
|
||||
const electron = require("electron");
|
||||
const isDev = require("electron-is-dev");
|
||||
const electron = require("electron");
|
||||
const isDev = require("electron-is-dev");
|
||||
const { autoUpdater } = require("electron-updater");
|
||||
|
||||
const { setApplicationMenu } = require("./menu");
|
||||
const { getEnabledPlugins, store } = require("./store");
|
||||
@ -15,6 +16,7 @@ require("electron-debug")();
|
||||
|
||||
// Prevent window being garbage collected
|
||||
let mainWindow;
|
||||
autoUpdater.autoDownload = false;
|
||||
|
||||
let icon = "assets/youtube-music.png";
|
||||
if (process.platform == "win32") {
|
||||
@ -120,6 +122,20 @@ app.on("activate", () => {
|
||||
app.on("ready", () => {
|
||||
setApplicationMenu();
|
||||
mainWindow = createMainWindow();
|
||||
if (!isDev) {
|
||||
autoUpdater.checkForUpdatesAndNotify();
|
||||
autoUpdater.on("update-available", () => {
|
||||
const dialogOpts = {
|
||||
type : "info",
|
||||
buttons: ["OK"],
|
||||
title : "Application Update",
|
||||
message: "A new version is available",
|
||||
detail :
|
||||
"A new version is available and can be downloaded at https://github.com/th-ch/youtube-music/releases/latest"
|
||||
};
|
||||
electron.dialog.showMessageBox(dialogOpts);
|
||||
});
|
||||
}
|
||||
|
||||
// Optimized for Mac OS X
|
||||
if (process.platform === "darwin") {
|
||||
|
||||
1283
package-lock.json
generated
1283
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
33
package.json
33
package.json
@ -1,8 +1,8 @@
|
||||
{
|
||||
"name" : "youtube-music",
|
||||
"productName": "YouTube Music",
|
||||
"version" : "1.0.0",
|
||||
"description": "",
|
||||
"version" : "1.1.0",
|
||||
"description": "YouTube Music Desktop App - including custom plugins",
|
||||
"license" : "MIT",
|
||||
"repository" : "th-ch/youtube-music",
|
||||
"author" : {
|
||||
@ -10,28 +10,47 @@
|
||||
"email": "th-ch@users.noreply.github.com",
|
||||
"url" : "https://github.com/th-ch/youtube-music"
|
||||
},
|
||||
"build": {
|
||||
"appId" : "com.github.th-ch.youtube-music",
|
||||
"productName": "YouTube Music",
|
||||
"mac" : {
|
||||
"identity": null,
|
||||
"icon" : "assets/generated/icons/mac/icon.icns"
|
||||
},
|
||||
"win": {
|
||||
"icon": "assets/generated/icons/win/icon.ico"
|
||||
},
|
||||
"linux": {
|
||||
"icon" : "assets/generated/icons/png",
|
||||
"category": "Audio"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test" : "xo",
|
||||
"start" : "electron .",
|
||||
"icon" : "electron-icon-maker --input=assets/youtube-music.png --output=assets/generated",
|
||||
"icon" : "rimraf assets/generated && electron-icon-maker --input=assets/youtube-music.png --output=assets/generated",
|
||||
"postinstall": "npm run icon && npm rebuild && node plugins/adblocker/generator.js && electron-rebuild",
|
||||
"build" : "electron-packager . --out=dist --asar --overwrite --all --icon=assets/generated/icons/mac/icon.icns --prune=true",
|
||||
"build:macos": "electron-packager . --platform=darwin --arch=x64 --out=dist --asar --overwrite --icon=assets/generated/icons/mac/icon.icns --prune=true"
|
||||
"clean" : "rimraf dist",
|
||||
"build" : "npm run clean && build --win --mac --linux",
|
||||
"build:mac" : "npm run clean && build --mac",
|
||||
"release" : "npm run clean && build --win --mac --linux -p always"
|
||||
},
|
||||
"dependencies": {
|
||||
"ad-block" : "^4.1.3",
|
||||
"electron-debug" : "^2.0.0",
|
||||
"electron-is-dev" : "^1.0.1",
|
||||
"electron-localshortcut": "^3.1.0",
|
||||
"electron-store" : "^2.0.0"
|
||||
"electron-store" : "^2.0.0",
|
||||
"electron-updater" : "^4.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"devtron" : "^1.4.0",
|
||||
"electron" : "^4.0.8",
|
||||
"electron-builder" : "^20.40.2",
|
||||
"electron-devtools-installer": "^2.2.4",
|
||||
"electron-icon-maker" : "0.0.4",
|
||||
"electron-packager" : "^13.1.1",
|
||||
"electron-rebuild" : "^1.8.4",
|
||||
"rimraf" : "^2.6.3",
|
||||
"xo" : "^0.24.0"
|
||||
},
|
||||
"xo": {
|
||||
|
||||
20
readme.md
20
readme.md
@ -1,4 +1,7 @@
|
||||
# YouTube Music [](https://github.com/sindresorhus/xo)
|
||||
# YouTube Music
|
||||
[](https://GitHub.com/th-ch/youtube-music/releases/)
|
||||
[](https://github.com/th-ch/youtube-music/blob/master/LICENSE)
|
||||
[](https://github.com/sindresorhus/xo)
|
||||
|
||||

|
||||
|
||||
@ -7,6 +10,15 @@
|
||||
- Native look & feel, aims at keeping the original interface
|
||||
- Framework for custom plugins: change YouTube Music to your needs (style, content, features), enable/disable plugins in one click
|
||||
|
||||
## Download
|
||||
|
||||
You can check out the [latest release](https://github.com/th-ch/youtube-music/releases/latest) to quickly find the latest version.
|
||||
Here are the links to the current version:
|
||||
|
||||
- [Mac](https://github.com/th-ch/youtube-music/releases/download/v1.0.0/youtube-music-1.0.0.dmg)
|
||||
- [Windows](https://github.com/th-ch/youtube-music/releases/download/v1.0.0/youtube-music-setup-1.0.0.exe)
|
||||
- [Linux](https://github.com/th-ch/youtube-music/releases/download/v1.0.0/youtube-music-1.0.0-x86_64.AppImage)
|
||||
|
||||
## Available plugins:
|
||||
|
||||
- **Ad Blocker**: block all ads and tracking out of the box
|
||||
@ -47,7 +59,7 @@ module.exports = win => {
|
||||
```
|
||||
module.exports = () => {
|
||||
// This function will be called as a preload script
|
||||
// So you can use front features like `document.querySelector`
|
||||
// So you can use front features like `document.querySelector`
|
||||
};
|
||||
```
|
||||
|
||||
@ -77,10 +89,10 @@ module.exports = () => {
|
||||
## Build
|
||||
|
||||
```
|
||||
$ npm run build
|
||||
npm run build
|
||||
```
|
||||
|
||||
Builds the app for macOS, Linux, and Windows, using [electron-packager](https://github.com/electron-userland/electron-packager).
|
||||
Builds the app for macOS, Linux, and Windows, using [electron-builder](https://github.com/electron-userland/electron-builder).
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user