allow default startingPage

This commit is contained in:
Araxeus
2023-03-21 17:46:52 +02:00
parent f5758bfe93
commit 45fa963818
4 changed files with 3 additions and 5 deletions

View File

@ -16,7 +16,7 @@ const defaultConfig = {
autoResetAppCache: false, autoResetAppCache: false,
resumeOnStart: true, resumeOnStart: true,
proxy: "", proxy: "",
startingPage: "Home", startingPage: "",
}, },
plugins: { plugins: {
// Enabled plugins // Enabled plugins

View File

@ -10,9 +10,6 @@ const setDefaultPluginOptions = (store, plugin) => {
const migrations = { const migrations = {
">=1.20.0": (store) => { ">=1.20.0": (store) => {
// used only to make the radio button checked in the menu
store.set('options.startingPage', "Home");
setDefaultPluginOptions(store, "visualizer"); setDefaultPluginOptions(store, "visualizer");
if (store.get("plugins.notifications.toastStyle") === undefined) { if (store.get("plugins.notifications.toastStyle") === undefined) {

View File

@ -133,7 +133,7 @@ function onApiLoaded() {
// Navigate to "Starting page" // Navigate to "Starting page"
const startingPage = config.get("options.startingPage"); const startingPage = config.get("options.startingPage");
if (startingPage !== "home" && startingPages[startingPage]) { if (startingPage && startingPages[startingPage]) {
$('ytmusic-app')?.navigate_(startingPages[startingPage]); $('ytmusic-app')?.navigate_(startingPages[startingPage]);
} }

View File

@ -1,4 +1,5 @@
const startingPages = { const startingPages = {
Default: '',
Home: 'FEmusic_home', Home: 'FEmusic_home',
Explore: 'FEmusic_explore', Explore: 'FEmusic_explore',
'New Releases': 'FEmusic_new_releases', 'New Releases': 'FEmusic_new_releases',