Bunkerbewohner / tidal-music-linux

An electron based wrapper around the Tidal web player for Linux
MIT License
45 stars 16 forks source link

Use flash-player-loader to find pepper flash #27

Closed ndrewtl closed 5 years ago

ndrewtl commented 5 years ago

After doing some digging on loading pepper-flash, I found a package that is dedicated to loading the player for electron apps. This means no costly brute-force searching at all, given that you supply a list of paths in which libpep might be located. In the best case, it also calls app.getPath("pepperFlashSystemPlugin") which is the 'correct' way to find the library.

The downside is the search directories need to be hardcoded. I added the original hardcoded directory and the one in which my libpep is installed, and the app seems to start up much faster, so I don't think any form of caching/persistent storage is necessary. If other users have different install locations for their libpep they can easily be added to pepper-paths.json.

I hope this is a better / satisfactory solution! Please review!

Bunkerbewohner commented 5 years ago

That looks great! Thank you very much! I actually also had in mind yesterday that a configuration option would be the easiest way to fix this for users if it doesn't work. So I like your solution a lot. Good work! 👍