Skip to content

Commit 457a8b5

Browse files
authored
Merge pull request #1259 from organization/feat/fork-to-main
2 parents e3b5afd + 0442e42 commit 457a8b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+3392
-2763
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
.eslintrc.js
2+
rollup.main.config.ts
3+
rollup.preload.config.ts

.github/workflows/build.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ jobs:
4040
- name: Build and release on Mac
4141
if: startsWith(matrix.os, 'macOS') && github.repository == 'th-ch/youtube-music'
4242
env:
43-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
43+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4444
run: |
4545
npm run release:mac
4646
4747
- name: Build and release on Linux
4848
if: startsWith(matrix.os, 'ubuntu') && github.repository == 'th-ch/youtube-music'
4949
env:
50-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5151
run: |
5252
npm run release:linux
5353
5454
- name: Build and release on Windows
5555
if: startsWith(matrix.os, 'windows') && github.repository == 'th-ch/youtube-music'
5656
env:
57-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
57+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5858
run: |
5959
npm run release:win
6060
@@ -107,7 +107,7 @@ jobs:
107107
uses: cardinalby/git-get-release-action@v1
108108
id: get_draft_release
109109
env:
110-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111111
with:
112112
latest: true
113113
draft: true
@@ -117,7 +117,7 @@ jobs:
117117
if: ${{ env.VERSION_HASH == '' }}
118118
uses: irongut/[email protected]
119119
with:
120-
token: ${{ secrets.GH_TOKEN }}
120+
token: ${{ secrets.GITHUB_TOKEN }}
121121
id: ${{ steps.get_draft_release.outputs.id }}
122122
draft: false
123123
prerelease: false
@@ -136,7 +136,7 @@ jobs:
136136
137137
- name: Commit changelog
138138
if: ${{ env.VERSION_HASH == '' }}
139-
uses: stefanzweifel/git-auto-commit-action@v4
139+
uses: stefanzweifel/git-auto-commit-action@v5
140140
with:
141141
commit_message: Update changelog for ${{ env.VERSION_TAG }}
142142
file_pattern: "changelog.md"

.github/workflows/dependency-review.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: "Checkout Repository"
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
- name: "Dependency Review"
2020
uses: actions/dependency-review-action@v3

assets/menu.svg

+3
Loading

assets/youtube-music.svg

+6
Loading

config/defaults.ts

+69-56
Original file line numberDiff line numberDiff line change
@@ -65,37 +65,46 @@ const defaultConfig = {
6565
proxy: '',
6666
startingPage: '',
6767
overrideUserAgent: false,
68-
themes: {} as string[],
68+
themes: [] as string[],
6969
},
70+
/** please order alphabetically */
7071
'plugins': {
71-
// Enabled plugins
72-
'navigation': {
73-
enabled: true,
74-
},
7572
'adblocker': {
7673
enabled: true,
7774
cache: true,
7875
blocker: 'With blocklists',
7976
additionalBlockLists: [], // Additional list of filters, e.g "https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt"
80-
disableDefaultLists: [],
77+
disableDefaultLists: false,
8178
},
8279
'album-color-theme': {},
8380
'ambient-mode': {},
84-
'lumiastream': {},
85-
// Disabled plugins
86-
'shortcuts': {
81+
'audio-compressor': {},
82+
'blur-nav-bar': {},
83+
'bypass-age-restrictions': {},
84+
'captions-selector': {
8785
enabled: false,
88-
overrideMediaKeys: false,
89-
global: {
90-
previous: '',
91-
playPause: '',
92-
next: '',
93-
} as Record<string, string>,
94-
local: {
95-
previous: '',
96-
playPause: '',
97-
next: '',
98-
} as Record<string, string>,
86+
disableCaptions: false,
87+
autoload: false,
88+
lastCaptionsCode: '',
89+
},
90+
'compact-sidebar': {},
91+
'crossfade': {
92+
enabled: false,
93+
fadeInDuration: 1500, // Ms
94+
fadeOutDuration: 5000, // Ms
95+
secondsBeforeEnd: 10, // S
96+
fadeScaling: 'linear', // 'linear', 'logarithmic' or a positive number in dB
97+
},
98+
'disable-autoplay': {
99+
applyOnce: false,
100+
},
101+
'discord': {
102+
enabled: false,
103+
autoReconnect: true, // If enabled, will try to reconnect to discord every 5 seconds after disconnecting or failing to connect
104+
activityTimoutEnabled: true, // If enabled, the discord rich presence gets cleared when music paused after the time specified below
105+
activityTimoutTime: 10 * 60 * 1000, // 10 minutes
106+
listenAlong: true, // Add a "listen along" button to rich presence
107+
hideDurationLeft: false, // Hides the start and end time of the song to rich presence
99108
},
100109
'downloader': {
101110
enabled: false,
@@ -105,6 +114,8 @@ const defaultConfig = {
105114
skipExisting: false,
106115
playlistMaxItems: undefined as number | undefined,
107116
},
117+
'exponential-volume': {},
118+
'in-app-menu': {},
108119
'last-fm': {
109120
enabled: false,
110121
token: undefined as string | undefined, // Token used for authentication
@@ -113,17 +124,14 @@ const defaultConfig = {
113124
api_key: '04d76faaac8726e60988e14c105d421a', // Api key registered by @semvis123
114125
secret: 'a5d2a36fdf64819290f6982481eaffa2',
115126
},
116-
'lyric-genius': {
127+
'lumiastream': {},
128+
'lyrics-genius': {
117129
romanizedLyrics: false,
118130
},
119-
'discord': {
120-
enabled: false,
121-
autoReconnect: true, // If enabled, will try to reconnect to discord every 5 seconds after disconnecting or failing to connect
122-
activityTimoutEnabled: true, // If enabled, the discord rich presence gets cleared when music paused after the time specified below
123-
activityTimoutTime: 10 * 60 * 1000, // 10 minutes
124-
listenAlong: true, // Add a "listen along" button to rich presence
125-
hideDurationLeft: false, // Hides the start and end time of the song to rich presence
131+
'navigation': {
132+
enabled: true,
126133
},
134+
'no-google-login': {},
127135
'notifications': {
128136
enabled: false,
129137
unpauseNotification: false,
@@ -135,6 +143,18 @@ const defaultConfig = {
135143
trayControls: true,
136144
hideButtonText: false,
137145
},
146+
'picture-in-picture': {
147+
'enabled': false,
148+
'alwaysOnTop': true,
149+
'savePosition': true,
150+
'saveSize': false,
151+
'hotkey': 'P',
152+
'pip-position': [10, 10],
153+
'pip-size': [450, 275],
154+
'isInPiP': false,
155+
'useNativePiP': false,
156+
},
157+
'playback-speed': {},
138158
'precise-volume': {
139159
enabled: false,
140160
steps: 1, // Percentage of volume to change
@@ -145,6 +165,24 @@ const defaultConfig = {
145165
},
146166
savedVolume: undefined as number | undefined, // Plugin save volume between session here
147167
},
168+
'quality-changer': {},
169+
'shortcuts': {
170+
enabled: false,
171+
overrideMediaKeys: false,
172+
global: {
173+
previous: '',
174+
playPause: '',
175+
next: '',
176+
} as Record<string, string>,
177+
local: {
178+
previous: '',
179+
playPause: '',
180+
next: '',
181+
} as Record<string, string>,
182+
},
183+
'skip-silences': {
184+
onlySkipBeginning: false,
185+
},
148186
'sponsorblock': {
149187
enabled: false,
150188
apiURL: 'https://sponsor.ajay.app',
@@ -157,41 +195,16 @@ const defaultConfig = {
157195
'music_offtopic',
158196
],
159197
},
198+
'taskbar-mediacontrol': {},
199+
'touchbar': {},
200+
'tuna-obs': {},
160201
'video-toggle': {
161202
enabled: false,
162203
hideVideo: false,
163204
mode: 'custom',
164205
forceHide: false,
165206
align: '',
166207
},
167-
'picture-in-picture': {
168-
'enabled': false,
169-
'alwaysOnTop': true,
170-
'savePosition': true,
171-
'saveSize': false,
172-
'hotkey': 'P',
173-
'pip-position': [10, 10],
174-
'pip-size': [450, 275],
175-
'isInPiP': false,
176-
'useNativePiP': false,
177-
},
178-
'captions-selector': {
179-
enabled: false,
180-
disableCaptions: false,
181-
autoload: false,
182-
lastCaptionsCode: '',
183-
disabledCaptions: false,
184-
},
185-
'skip-silences': {
186-
onlySkipBeginning: false,
187-
},
188-
'crossfade': {
189-
enabled: false,
190-
fadeInDuration: 1500, // Ms
191-
fadeOutDuration: 5000, // Ms
192-
secondsBeforeEnd: 10, // S
193-
fadeScaling: 'linear', // 'linear', 'logarithmic' or a positive number in dB
194-
},
195208
'visualizer': {
196209
enabled: false,
197210
type: 'butterchurn',

config/dynamic.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { getOptions, setMenuOptions, setOptions } from './plugins';
1010
import { sendToFront } from '../providers/app-controls';
1111
import { Entries } from '../utils/type-utils';
1212

13-
type DefaultPluginsConfig = typeof defaultConfig.plugins;
14-
type OneOfDefaultConfigKey = keyof DefaultPluginsConfig;
15-
type OneOfDefaultConfig = typeof defaultConfig.plugins[OneOfDefaultConfigKey];
13+
export type DefaultPluginsConfig = typeof defaultConfig.plugins;
14+
export type OneOfDefaultConfigKey = keyof DefaultPluginsConfig;
15+
export type OneOfDefaultConfig = typeof defaultConfig.plugins[OneOfDefaultConfigKey];
1616

1717
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1818
const activePlugins: { [key in OneOfDefaultConfigKey]?: PluginConfig<any> } = {};

0 commit comments

Comments
 (0)