spicetify / marketplace

Download extensions and themes directly from Spicetify
MIT License
1.04k stars 174 forks source link

Make custom app run on start, not just when its tab is clicked #11

Closed theRealPadster closed 2 years ago

theRealPadster commented 2 years ago

Last I checked, extensions aren't loaded in until you open the marketplace app. We want them to be loaded in on Spotify launch.

afonsojramos commented 2 years ago

I actually think this may be part of the error in lyrics-plus 🤔 https://github.com/khanhas/spicetify-cli/issues/1090

CharlieS1103 commented 2 years ago

@afonsojramos Nah it's an issue with this, I was super lazy lol.

theRealPadster commented 2 years ago

It's because it activates extensions in loadPage(), which is when the app is clicked in the sidebar. Needs to be in some other place.

theRealPadster commented 2 years ago

Just updating the issue status:

It looks like Custom Apps can't execute any code until their icon is clicked. I put a console.log('loaded') just at the top of the main index.js file and it doesn't log until you click on it in the sidebar. I think we need some sort of hook or something added to Spicetify so that custom apps are able to execute code on app start, like extensions can.

Possible solution suggested was to add a value in the CustomApp's manifest for a js file that gets run as an extension (since they can run code on app start).

theRealPadster commented 2 years ago

This is implemented now! 🎉

93d1e70f9c6db257e69245e8422e19e8d287aee5 332483a66966a6489f5bd392f31901995240dd5e a43ce36597403866e6c2c1a77e005b47ab9c1b70