Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mpris support #394

Closed
wants to merge 550 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
550 commits
Select commit Hold shift + click to select a range
25d0f50
Create readme.md
Araxeus Apr 5, 2021
a215035
refactor and css fix
Araxeus Apr 5, 2021
724c213
xo --fix
Araxeus Apr 5, 2021
0e9b157
add inline doc
Araxeus Apr 5, 2021
17fd499
fix typo
Araxeus Apr 5, 2021
980ffb4
Create readme.md
Araxeus Apr 6, 2021
47eace9
Merge branch 'menu-fixes' of https:/Araxeus/youtube-music…
Araxeus Apr 6, 2021
e6efddc
add windows interactive notifications
Araxeus Apr 8, 2021
30675e0
remove appID because of bug:
Araxeus Apr 8, 2021
d8dc465
stylecheck
Araxeus Apr 8, 2021
ba62447
minify
Araxeus Apr 8, 2021
80b1207
fix rare crash due to unfocus effect
Araxeus Apr 8, 2021
0951967
add note to notifications.interactive
Araxeus Apr 8, 2021
9c0a633
fix unPause option compatibility
Araxeus Apr 9, 2021
18f041f
clarify button purpose
Araxeus Apr 9, 2021
e6d77c1
Center Icon on ALL notifications
Araxeus Apr 9, 2021
46ac0a1
change notification priority to show only on linux
Araxeus Apr 9, 2021
3d41d04
Revert "fix rare crash due to unfocus effect"
Araxeus Apr 9, 2021
09d9f72
add unresponsive listener
Araxeus Apr 9, 2021
193c382
remove downloads-folder and use electron instead
Araxeus Apr 9, 2021
9f2362d
update dependecies
Araxeus Apr 9, 2021
61d83be
taskbar-mediacontrol no longer override win.hide
Araxeus Apr 9, 2021
2b6cecc
Update ytpl
Araxeus Apr 12, 2021
c764d65
cleanup unresponsiveDialog
Araxeus Apr 14, 2021
a2207a2
remove " - Topic" from artist name
Araxeus Apr 14, 2021
bb6ad14
navbar background black fix visual bug
Araxeus Apr 15, 2021
ff6a486
fix unresponsive dialog response
Araxeus Apr 15, 2021
f765fb6
scrape artistName from playBar
Araxeus Apr 15, 2021
9f848e3
fix: upgrade @cliqz/adblocker-electron from 1.20.3 to 1.20.4
snyk-bot Apr 16, 2021
40968d5
add precise scrollwheel control + precise tooltip
Araxeus Apr 16, 2021
c0ec1bc
update inline doc
Araxeus Apr 16, 2021
02896ca
xo --fix
Araxeus Apr 16, 2021
06958c4
refactor
Araxeus Apr 16, 2021
b65bc65
save volume to settings
Araxeus Apr 16, 2021
5adcc3e
fix set volume on first run after not using plugin
Araxeus Apr 16, 2021
94e152b
add optional arrowkeys controls option
Araxeus Apr 17, 2021
8342024
enable changing shortcut setting without restart
Araxeus Apr 17, 2021
49698ea
fix changing settings when plugin is disabled
Araxeus Apr 17, 2021
12a2517
xo --fix
Araxeus Apr 17, 2021
c48260f
add advanced option to change volume steps
Araxeus Apr 17, 2021
341a06a
add prompt with number counter
Araxeus Apr 17, 2021
3f50ab7
lint
Araxeus Apr 17, 2021
97a9e63
xo --fix
Araxeus Apr 17, 2021
b7b1316
add rapidFire option to counter prompt
Araxeus Apr 17, 2021
00468c7
use timeout ID to stop callback
Araxeus Apr 17, 2021
72716af
lint
Araxeus Apr 17, 2021
10dffdb
refactor + lint
Araxeus Apr 18, 2021
5fa8f3e
add option for plugin to have a preload.js
Araxeus Apr 22, 2021
021d2a8
disable native volume-slider listeners
Araxeus Apr 22, 2021
65f6822
Show volume slider on volume change
Araxeus Apr 22, 2021
0bc1b5e
lint
Araxeus Apr 22, 2021
064facb
remove slider on-hover after 3 seconds if !focused
Araxeus Apr 22, 2021
6509454
simple fix
Araxeus Apr 23, 2021
20123d8
revert to original lint format
Araxeus Apr 23, 2021
7c6ed7b
`once` instead of `on`
Araxeus Apr 23, 2021
a194046
`win.once()` instead of `win.on`
Araxeus Apr 23, 2021
eae4cca
Update readme.md
Araxeus Apr 23, 2021
8b1bbdf
Add Video Player Mousewheel Volume Control
Araxeus Apr 23, 2021
d4fdced
addEventListener insead of .onwheel
Araxeus Apr 24, 2021
5a77528
enable global volume shortcuts in advanced config
Araxeus Apr 26, 2021
98fd624
update inline doc
Araxeus Apr 26, 2021
8decdf4
Merge pull request #239 from Araxeus/discord-fix
th-ch Apr 27, 2021
5dc1179
implement keybind prompt
Araxeus Apr 27, 2021
e9d7dde
defensive code
Araxeus Apr 27, 2021
395eac2
switch function name to camelCase
Araxeus Apr 27, 2021
8dc486f
remove local prompt
Araxeus Apr 27, 2021
0adb36c
leave debug for next PR
Araxeus Apr 28, 2021
0491bab
fix typo
Araxeus Apr 28, 2021
b77643b
remove proxy from menu
Araxeus Apr 28, 2021
7297143
update camelCase
Araxeus Apr 28, 2021
d2925ee
make variable names clearer
Araxeus Apr 28, 2021
66517af
fix typo
Araxeus Apr 28, 2021
e272d38
fix typo
Araxeus Apr 28, 2021
d0800bb
small refactor
Araxeus Apr 28, 2021
5312b36
Merge pull request #196 from semvis123/lastfm
th-ch Apr 28, 2021
ba02d37
Update yarn.lock
th-ch Apr 28, 2021
c380351
fix: upgrade electron-store from 7.0.2 to 7.0.3
snyk-bot Apr 29, 2021
8a5c39e
Fix download URL
th-ch Apr 29, 2021
c11ecd3
Set max file length to 255 in downloader
th-ch Apr 29, 2021
dfbda7c
Set metadata in back (to have cover)
th-ch Apr 29, 2021
a406ba4
Merge pull request #245 from th-ch/fix-downloader-metadata
th-ch Apr 29, 2021
79d95d9
Merge branch 'master' into dependencies-update
th-ch Apr 29, 2021
f95e29d
Merge pull request #231 from Araxeus/dependencies-update
th-ch Apr 29, 2021
0468a23
Fix getFolder util (main/renderer process)
th-ch Apr 29, 2021
603bcf7
Merge pull request #233 from th-ch/snyk-upgrade-db0717b422c1c3d1fcb50…
th-ch Apr 29, 2021
b63eb1c
Merge pull request #244 from th-ch/snyk-upgrade-99aee86a0f7b96c0f871b…
th-ch Apr 29, 2021
2567702
Merge pull request #236 from Araxeus/precise-volume
th-ch May 2, 2021
6082a65
Merge branch 'master' into interactive-notifications
th-ch May 2, 2021
442aafd
remove redundant dialog import
Araxeus May 2, 2021
1f69048
minify switch case
Araxeus May 2, 2021
02d16ca
fix typo
Araxeus May 2, 2021
8575996
Merge branch 'menu-fixes' of https:/Araxeus/youtube-music…
Araxeus May 2, 2021
472462c
Merge pull request #228 from Araxeus/interactive-notifications
th-ch May 2, 2021
f65c6c8
Fix package.json indent, update yarn.lock
th-ch May 2, 2021
8f766bc
resolve merge conflict
Araxeus May 2, 2021
7dbb5fc
Update electron to 11.4.4
th-ch May 2, 2021
c7ff536
Bump version to 1.12.0
th-ch May 3, 2021
d5b9e3c
stringify did-fail-load error
Araxeus May 3, 2021
fb81e1b
ignore did-fail-load error code `-3`
Araxeus May 3, 2021
8aeddcf
Merge pull request #224 from Araxeus/menu-fixes
th-ch May 4, 2021
4cb658d
Remove preload.js in plugin uses and use front plugin injection
th-ch May 4, 2021
bf40996
Import front logger at top level
th-ch May 4, 2021
d4811b7
Revert "Remove preload.js in plugin uses and use front plugin injection"
th-ch May 4, 2021
dd6455a
update in-app-menu
Araxeus May 5, 2021
4508464
update custom-electron-titlebar version
Araxeus May 5, 2021
78974c0
save in-app-menu activation state on launch
Araxeus May 5, 2021
844edbe
fix metadata when downloading unplayed song
Araxeus May 5, 2021
ca41c12
use media propery if exist in song-info
Araxeus May 5, 2021
f190b51
lint
Araxeus May 5, 2021
e18b7c1
allow unlimited playlist size
Araxeus May 5, 2021
d96fefb
fix error thrown when downloading playlist
Araxeus May 5, 2021
61c5494
custom metadata on playlist-download
Araxeus May 6, 2021
13fb686
started playlist downlaod messageBox
Araxeus May 6, 2021
53bf7c5
playlist download progressBar using `chokidar`
Araxeus May 6, 2021
2d6e858
lint
Araxeus May 6, 2021
25e9f44
fix listener override condition
Araxeus May 6, 2021
ef0813e
fix `preventDefault()` being called on *all* keys
Araxeus May 6, 2021
c0a185b
refactor addEventListener
Araxeus May 6, 2021
d000c03
lint
Araxeus May 6, 2021
4b6fe78
fix css not inserting on reload
Araxeus May 6, 2021
6b72599
directly playPause video element
Araxeus May 6, 2021
a98b894
lint
Araxeus May 6, 2021
d274e80
minify
Araxeus May 6, 2021
bf89842
Merge pull request #255 from Araxeus/fix-css-on-reload
th-ch May 6, 2021
9b821a0
Bump ua-parser-js from 0.7.23 to 0.7.28
dependabot[bot] May 6, 2021
d1795a8
Merge pull request #253 from Araxeus/fix-precise-volume-listener-over…
th-ch May 6, 2021
b396431
Merge pull request #260 from th-ch/dependabot/npm_and_yarn/ua-parser-…
th-ch May 6, 2021
c76d8c7
Bump version to 1.12.1
th-ch May 6, 2021
88e738c
check if `yns_pause` exists
Araxeus May 7, 2021
8b471c0
create `cleanupArtistName()` in song-info
Araxeus May 7, 2021
e00be8f
lint
Araxeus May 7, 2021
250940d
Merge pull request #259 from Araxeus/force-pause
th-ch May 7, 2021
3fb08d2
Add `start:debug` command to enable dev with electron debug
th-ch May 7, 2021
1140c3e
lint
Araxeus May 7, 2021
5faeddb
Merge pull request #252 from Araxeus/fix-download-idtag-if-not-playing
th-ch May 7, 2021
3522925
remove `open` dependency
Araxeus May 7, 2021
090ca82
Merge branch 'master' into update-in-app-menu
Araxeus May 7, 2021
e985b78
lint
Araxeus May 7, 2021
cceb453
debug videoUrl from `start Radio` button in menu
Araxeus May 8, 2021
2168cbc
use image from imageSrc if transfered
Araxeus May 8, 2021
a8ac2c3
download progress bar on taskbar
Araxeus May 8, 2021
3ea17e6
refactor
Araxeus May 8, 2021
96a74f8
use original metadata only if not already captured from ytpl.getInfo()
Araxeus May 8, 2021
b3da77a
small refactor
Araxeus May 8, 2021
e46e7b7
fix sendError()
Araxeus May 8, 2021
3831e61
differentiate names of different metadata sources
Araxeus May 8, 2021
ccd320d
minimize getArtist()
Araxeus May 8, 2021
da3c709
remove videoDetails?.media query from XHR
Araxeus May 8, 2021
6b88397
lint
Araxeus May 8, 2021
d634c41
Merge pull request #262 from Araxeus/remove-`open`-dependency
th-ch May 8, 2021
d7e4247
lint
Araxeus May 8, 2021
cf4bbf9
update radioButton querySelector
Araxeus May 8, 2021
d2a5110
querySelector optimization #2
Araxeus May 8, 2021
0a59122
Merge pull request #265 from Araxeus/ensure-download-from-radio-button
th-ch May 8, 2021
163dc7e
Downloader: catch error when fetching playlist
th-ch May 8, 2021
a3778af
Downloader: rename UrlToJPG to urlToJPG
th-ch May 8, 2021
792c293
fix config overwrite on each start
Araxeus May 9, 2021
7942efa
Merge pull request #267 from Araxeus/last-fm-config-check-fix
th-ch May 9, 2021
7cf78c6
setup SongInfo **once**
Araxeus May 10, 2021
cb743de
refactor notifications plugin
Araxeus May 10, 2021
b266037
lint
Araxeus May 10, 2021
8284b56
set appID on windows
Araxeus May 10, 2021
93d4d3c
writeShortcut on windows
Araxeus May 10, 2021
8cca9f3
create shortcut only if needed
Araxeus May 10, 2021
78a7dcb
lint
Araxeus May 10, 2021
cb5ef1d
check that app is installed / unpacked
Araxeus May 10, 2021
d615030
register appID on windows reguardless of shortcut
Araxeus May 10, 2021
cb6a5a4
lint
Araxeus May 11, 2021
0e8e783
Upgrade electron to v12
th-ch May 11, 2021
541c7f3
restore menuItems roles that were fixed
Araxeus May 15, 2021
5b00465
Merge pull request #273 from th-ch/upgrade-electron
th-ch May 16, 2021
5bc8e86
Merge pull request #270 from Araxeus/fix-normal-notification-showing-…
th-ch May 16, 2021
bbe5a7d
fix: upgrade ytpl from 2.1.1 to 2.2.0
snyk-bot May 17, 2021
4fb0b1d
switch to `registerCallback()` on song info
Araxeus May 18, 2021
177ce57
fix: upgrade filenamify from 4.2.0 to 4.3.0
snyk-bot May 19, 2021
8124623
fix notificationOnUnpause option
Araxeus May 22, 2021
33855f1
update refreshMenu() function
Araxeus May 23, 2021
fb61dbf
fix: upgrade @ffmpeg/core from 0.8.5 to 0.9.0
snyk-bot May 26, 2021
14dc789
fix: upgrade ytdl-core from 4.5.0 to 4.7.0
snyk-bot May 26, 2021
c5f84b5
fix: upgrade @cliqz/adblocker-electron from 1.20.4 to 1.20.5
snyk-bot May 26, 2021
cd613aa
Bump browserslist from 4.16.3 to 4.16.6
dependabot[bot] May 27, 2021
d8f3246
Bump electron to 12.0.8
th-ch May 28, 2021
3515bf3
Merge pull request #269 from Araxeus/fix-XHR-duplicate-callback
th-ch May 28, 2021
55a8787
Merge pull request #285 from th-ch/snyk-upgrade-7b9c569f5bdd092f76adf…
th-ch May 28, 2021
5033de1
Merge pull request #293 from th-ch/snyk-upgrade-335ec370c7caa5a759c54…
th-ch May 28, 2021
4ab07dc
Merge pull request #298 from th-ch/snyk-upgrade-d305cdce94133f6db9615…
th-ch May 28, 2021
c540788
Merge branch 'master' of github.com:th-ch/youtube-music into snyk-upg…
th-ch May 28, 2021
28aa1c0
Merge pull request #299 from th-ch/snyk-upgrade-37e43892f5a34f935e848…
th-ch May 28, 2021
4489a40
Merge branch 'master' of github.com:th-ch/youtube-music into snyk-upg…
th-ch May 28, 2021
e1cc49a
Merge pull request #300 from th-ch/snyk-upgrade-ce2777733d9dee231391c…
th-ch May 28, 2021
6dbf413
Merge pull request #301 from th-ch/dependabot/npm_and_yarn/browsersli…
th-ch May 28, 2021
e5dc1f8
Bump ws from 7.4.3 to 7.4.6
dependabot[bot] May 28, 2021
c52c2d8
Merge pull request #303 from th-ch/dependabot/npm_and_yarn/ws-7.4.6
th-ch May 28, 2021
f186da0
fix: upgrade @ffmpeg/ffmpeg from 0.9.7 to 0.9.8
snyk-bot May 29, 2021
b26748d
Merge pull request #305 from th-ch/snyk-upgrade-15656c519a90f5bc0f5c8…
th-ch May 31, 2021
b8c6ebf
Set test environment per test file
th-ch Jun 3, 2021
30e94d1
Refactor videoElement getter into a provider with callback
th-ch Jun 3, 2021
ca64a77
Add SponsorBlock plugin
th-ch Jun 3, 2021
cda07c9
Update adblocking
th-ch Jun 3, 2021
4a60aa9
Keep segments when skipping
th-ch Jun 3, 2021
3485d26
Merge pull request #308 from th-ch/sponsorblock-plugin
th-ch Jun 4, 2021
1943116
fix: upgrade custom-electron-titlebar from 3.2.6 to 3.2.7
snyk-bot Jun 5, 2021
cc4dae6
fix: upgrade @ffmpeg/ffmpeg from 0.9.8 to 0.10.0
snyk-bot Jun 8, 2021
1987ad1
fix: upgrade @ffmpeg/core from 0.9.0 to 0.10.0
snyk-bot Jun 8, 2021
8eb3827
fix unsupported hidden webp coverart
Araxeus Jun 9, 2021
2a58dc8
check if native image is empty before writing id tag
Araxeus Jun 9, 2021
4387cb4
Bump trim-newlines from 3.0.0 to 3.0.1
dependabot[bot] Jun 9, 2021
fffeac2
Bump normalize-url from 4.5.0 to 4.5.1
dependabot[bot] Jun 11, 2021
b7ebb7d
fix: upgrade electron-updater from 4.3.8 to 4.3.9
snyk-bot Jun 12, 2021
2a192f3
fix: upgrade ytdl-core from 4.8.0 to 4.8.2
snyk-bot Jun 19, 2021
e0cb132
Merge pull request #318 from Araxeus/fix-hidden-webp-cover-art
th-ch Jun 19, 2021
0c58bec
Bump hosted-git-info from 2.8.8 to 2.8.9
dependabot[bot] Jun 19, 2021
8a29946
Merge pull request #311 from th-ch/snyk-upgrade-44a5db26689d4091f6a2c…
th-ch Jun 24, 2021
8f5d06d
Merge pull request #316 from th-ch/snyk-upgrade-6e93904bf885d198521c6…
th-ch Jun 24, 2021
18e69c9
Merge branch 'master' of github.com:th-ch/youtube-music into snyk-upg…
th-ch Jun 24, 2021
0b98eef
Merge pull request #317 from th-ch/snyk-upgrade-a785f5d95c7765e2d4773…
th-ch Jun 24, 2021
3c0a5db
Merge pull request #320 from th-ch/dependabot/npm_and_yarn/trim-newli…
th-ch Jun 24, 2021
82abb4d
Merge pull request #323 from th-ch/dependabot/npm_and_yarn/normalize-…
th-ch Jun 24, 2021
12568c2
Merge pull request #324 from th-ch/snyk-upgrade-f650e2139b30a36951a4a…
th-ch Jun 24, 2021
ca95d10
Merge pull request #328 from th-ch/snyk-upgrade-dacfb8f0b574367961e40…
th-ch Jun 24, 2021
8ce71d6
Bump lodash from 4.17.20 to 4.17.21
dependabot[bot] Jun 24, 2021
ef0a891
Merge pull request #330 from th-ch/dependabot/npm_and_yarn/lodash-4.1…
th-ch Jun 24, 2021
9687c6c
Merge pull request #331 from th-ch/dependabot/npm_and_yarn/hosted-git…
th-ch Jun 24, 2021
c89f6af
fix: upgrade @cliqz/adblocker-electron from 1.22.0 to 1.22.1
snyk-bot Jun 25, 2021
492a473
Merge branch 'master' into update-in-app-menu
Araxeus Jun 25, 2021
c93eabb
Merge pull request #249 from Araxeus/update-in-app-menu
th-ch Jun 25, 2021
47a5dec
Merge pull request #337 from th-ch/snyk-upgrade-fe663d0d7c5fc658f327e…
th-ch Jun 25, 2021
641ae27
Update ytdl-core and ytpl
th-ch Jun 27, 2021
49194f8
nit: re-order dependencies
th-ch Jun 27, 2021
e5ab50c
Override content security policy to allow FFmpeg worker
th-ch Jun 27, 2021
a9a5d99
Do not add network filters in adblocker cache to fix session enhancing
th-ch Jun 27, 2021
38ef452
Bump ffmpeg version
th-ch Jun 27, 2021
af12787
Merge pull request #339 from th-ch/fix-downloader-plugin
th-ch Jun 27, 2021
496836b
Bump dependencies to fix vulnerabilities
th-ch Jun 27, 2021
46285a5
Bump glob-parent and add lint script (xo)
th-ch Jun 27, 2021
2cb6f56
Bump version
th-ch Jul 1, 2021
fddd060
fix: upgrade electron-updater from 4.3.9 to 4.3.10
snyk-bot Jul 2, 2021
6f5f938
fix: upgrade chokidar from 3.5.1 to 3.5.2
snyk-bot Jul 7, 2021
c01506d
Bump ytdl/ytpl
th-ch Aug 6, 2021
53a7725
Merge pull request #354 from th-ch/snyk-upgrade-1a48119c8989bb533950b…
th-ch Aug 6, 2021
0535686
Merge branch 'master' of github.com:th-ch/youtube-music into snyk-upg…
th-ch Aug 6, 2021
c6f8c42
Merge pull request #350 from th-ch/snyk-upgrade-4809caaf0847354b9b537…
th-ch Aug 6, 2021
7fa1278
Add "Listen Along" button
konhi Aug 19, 2021
6bc1d16
Bump node to v14
th-ch Aug 22, 2021
d089487
Merge pull request #386 from th-ch/bump-node-version
th-ch Aug 22, 2021
fe0f213
Merge pull request #383 from konhi/discord
th-ch Aug 22, 2021
e255777
Add mpris support
itzmanish Sep 2, 2021
c289c87
Merge branch 'master' of https:/itzmanish/youtube-music i…
itzmanish Sep 2, 2021
21ebffd
merge master
itzmanish Sep 2, 2021
a2663ab
Merge branch 'feat/mpris-support' into mpris
itzmanish Sep 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v1
with:
node-version: "12.x"
node-version: "14.x"

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
82 changes: 82 additions & 0 deletions config/defaults.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
const defaultConfig = {
"window-size": {
width: 1100,
height: 550,
},
url: "https://music.youtube.com",
options: {
tray: false,
appVisible: true,
autoUpdates: true,
hideMenu: false,
startAtLogin: false,
disableHardwareAcceleration: false,
restartOnConfigChanges: false,
trayClickPlayPause: false,
autoResetAppCache: false,
resumeOnStart: true,
proxy: "",
},
plugins: {
// Enabled plugins
navigation: {
enabled: true,
},
adblocker: {
enabled: true,
cache: true,
additionalBlockLists: [], // Additional list of filters, e.g "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt"
},
// Disabled plugins
shortcuts: {
enabled: false,
},
downloader: {
enabled: false,
ffmpegArgs: [], // e.g. ["-b:a", "192k"] for an audio bitrate of 192kb/s
downloadFolder: undefined, // Custom download folder (absolute path)
},
"last-fm": {
enabled: false,
api_root: "http://ws.audioscrobbler.com/2.0/",
api_key: "04d76faaac8726e60988e14c105d421a", // api key registered by @semvis123
secret: "a5d2a36fdf64819290f6982481eaffa2",
},
discord: {
enabled: false,
activityTimoutEnabled: true, // if enabled, the discord rich presence gets cleared when music paused after the time specified below
activityTimoutTime: 10 * 60 * 1000 // 10 minutes
},
notifications: {
enabled: false,
unpauseNotification: false,
urgency: "normal", //has effect only on Linux
interactive: false //has effect only on Windows
},
"precise-volume": {
enabled: false,
steps: 1, //percentage of volume to change
arrowsShortcut: true, //enable ArrowUp + ArrowDown local shortcuts
globalShortcuts: {
enabled: false, // enable global shortcuts
volumeUp: "Shift+PageUp", // Keybind default can be changed
volumeDown: "Shift+PageDown"
},
savedVolume: undefined //plugin save volume between session here
},
sponsorblock: {
enabled: false,
apiURL: "https://sponsor.ajay.app",
categories: [
"sponsor",
"intro",
"outro",
"interaction",
"selfpromo",
"music_offtopic",
],
},
},
};

module.exports = defaultConfig;
23 changes: 23 additions & 0 deletions config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const defaultConfig = require("./defaults");
const plugins = require("./plugins");
const store = require("./store");

const set = (key, value) => {
store.set(key, value);
};

const get = (key) => {
return store.get(key);
};

module.exports = {
defaultConfig,
get,
set,
edit: () => store.openInEditor(),
watch: (cb) => {
store.onDidChange("options", cb);
store.onDidChange("plugins", cb);
},
plugins,
};
46 changes: 46 additions & 0 deletions config/plugins.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const store = require("./store");

function getEnabled() {
const plugins = store.get("plugins");
const enabledPlugins = Object.entries(plugins).filter(([plugin, options]) =>
isEnabled(plugin)
);
return enabledPlugins;
}

function isEnabled(plugin) {
const pluginConfig = store.get("plugins")[plugin];
return pluginConfig !== undefined && pluginConfig.enabled;
}

function setOptions(plugin, options) {
const plugins = store.get("plugins");
store.set("plugins", {
...plugins,
[plugin]: {
...plugins[plugin],
...options,
},
});
}

function getOptions(plugin) {
return store.get("plugins")[plugin];
}

function enable(plugin) {
setOptions(plugin, { enabled: true });
}

function disable(plugin) {
setOptions(plugin, { enabled: false });
}

module.exports = {
isEnabled,
getEnabled,
enable,
disable,
setOptions,
getOptions,
};
45 changes: 45 additions & 0 deletions config/store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const Store = require("electron-store");

const defaults = require("./defaults");

const migrations = {
">=1.11.0": (store) => {
if (store.get("options.resumeOnStart") === undefined) {
store.set("options.resumeOnStart", true);
}
},
">=1.7.0": (store) => {
const enabledPlugins = store.get("plugins");
if (!Array.isArray(enabledPlugins)) {
console.warn("Plugins are not in array format, cannot migrate");
return;
}

// Include custom options
const plugins = {
adblocker: {
enabled: true,
cache: true,
additionalBlockLists: [],
},
downloader: {
enabled: false,
ffmpegArgs: [], // e.g. ["-b:a", "192k"] for an audio bitrate of 192kb/s
downloadFolder: undefined, // Custom download folder (absolute path)
},
};
enabledPlugins.forEach((enabledPlugin) => {
plugins[enabledPlugin] = {
...plugins[enabledPlugin],
enabled: true,
};
});
store.set("plugins", plugins);
},
};

module.exports = new Store({
defaults,
clearInvalidConfig: false,
migrations,
});
Binary file added docs/favicon/favicon.ico
Binary file not shown.
Binary file added docs/favicon/favicon_144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/favicon/favicon_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/favicon/favicon_48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/favicon/favicon_96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/img/adblock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/img/bg-bottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/img/bg-top.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/img/code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/img/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/img/footer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/img/plugins.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/youtube-music.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/img/youtube-music.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading