Skip to content

Commit

Permalink
Merge pull request #433 from Araxeus/new-auto-confirm
Browse files Browse the repository at this point in the history
new auto confirm when paused
  • Loading branch information
th-ch authored Oct 24, 2021
2 parents a045d65 + 831b1ea commit 8b36139
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 43 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@
"build:mac": "yarn run clean && electron-builder --mac",
"build:win": "yarn run clean && electron-builder --win",
"lint": "xo",
"plugins": "yarn run plugin:adblocker && yarn run plugin:autoconfirm",
"plugins": "yarn run plugin:adblocker",
"plugin:adblocker": "rimraf plugins/adblocker/ad-blocker-engine.bin && node plugins/adblocker/blocker.js",
"plugin:autoconfirm": "yarn run generate:package YoutubeNonStop",
"release:linux": "yarn run clean && electron-builder --linux -p always -c.snap.publish=github",
"release:mac": "yarn run clean && electron-builder --mac -p always",
"release:win": "yarn run clean && electron-builder --win -p always"
Expand All @@ -67,7 +66,6 @@
"@cliqz/adblocker-electron": "^1.22.6",
"@ffmpeg/core": "^0.10.0",
"@ffmpeg/ffmpeg": "^0.10.0",
"YoutubeNonStop": "git://github.com/lawfx/YoutubeNonStop.git#v0.9.0",
"async-mutex": "^0.3.2",
"browser-id3-writer": "^4.4.0",
"custom-electron-prompt": "^1.1.0",
Expand Down
12 changes: 0 additions & 12 deletions plugins/auto-confirm-when-paused/front.js

This file was deleted.

7 changes: 3 additions & 4 deletions preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const { remote } = require("electron");
const config = require("./config");
const { fileExists } = require("./plugins/utils");
const setupFrontLogger = require("./providers/front-logger");
const setupSongControl = require("./providers/song-controls-front");
const setupSongInfo = require("./providers/song-info-front");

const plugins = config.plugins.getEnabled();
Expand Down Expand Up @@ -46,15 +45,15 @@ document.addEventListener("DOMContentLoaded", () => {
// inject song-info provider
setupSongInfo();

// inject song-control provider
setupSongControl();

// inject front logger
setupFrontLogger();

// Add action for reloading
global.reload = () =>
remote.getCurrentWindow().webContents.loadURL(config.get("url"));

// Blocks the "Are You Still There?" popup by setting the last active time to Date.now every 15min
setInterval(() => window._lact = Date.now(), 900000);
});

function listenForApiLoad() {
Expand Down
18 changes: 0 additions & 18 deletions providers/song-controls-front.js

This file was deleted.

2 changes: 1 addition & 1 deletion providers/song-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = (win) => {
// Playback
previous: () => pressKey(win, "k"),
next: () => pressKey(win, "j"),
playPause: () => win.webContents.send("playPause"),
playPause: () => pressKey(win, "space"),
like: () => pressKey(win, "_"),
dislike: () => pressKey(win, "+"),
go10sBack: () => pressKey(win, "h"),
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Install the `youtube-music-bin` package from the AUR. For AUR installation instr

## Available plugins:
- **Ad Blocker**: block all ads and tracking out of the box
- **Auto confirm when paused**: when the ["Continue Watching?"](https://user-images.githubusercontent.com/61631665/129977894-01c60740-7ec6-4bf0-9a2c-25da24491b0e.png) modal appears, automatically click "Yes"
- **Disable autoplay**: makes every song start in "paused" mode
- [**Discord**](https://discord.com/): show your friends what you listen to with [Rich Presence](https://user-images.githubusercontent.com/28219076/104362104-a7a0b980-5513-11eb-9744-bb89eabe0016.png)
- **Downloader**: downloads MP3 [directly from the interface](https://user-images.githubusercontent.com/61631665/129977677-83a7d067-c192-45e1-98ae-b5a4927393be.png) [(youtube-dl)](https://github.com/ytdl-org/youtube-dl)
Expand All @@ -51,6 +50,7 @@ Install the `youtube-music-bin` package from the AUR. For AUR installation instr
- [**SponsorBlock**](https://github.com/ajayyy/SponsorBlock): skips non-music parts
- **Taskbar media control**: control app from your [Windows taskbar](https://user-images.githubusercontent.com/78568641/111916130-24a35e80-8a82-11eb-80c8-5021c1aa27f4.png)
- **Touchbar**: custom TouchBar layout for macOS
- **Auto confirm when paused** (Always Enabled): disable the ["Continue Watching?"](https://user-images.githubusercontent.com/61631665/129977894-01c60740-7ec6-4bf0-9a2c-25da24491b0e.png) popup that pause music after a certain time

## Dev

Expand Down
4 changes: 0 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1518,10 +1518,6 @@
dependencies:
"@wdio/logger" "6.10.10"

"YoutubeNonStop@git://github.com/lawfx/YoutubeNonStop.git#v0.9.0":
version "0.0.0"
resolved "git://github.com/lawfx/YoutubeNonStop.git#7b6b97b31bb3fd2078179660db0fd3fcc7062259"

abab@^2.0.3:
version "2.0.5"
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
Expand Down

0 comments on commit 8b36139

Please sign in to comment.