Skip to content

Commit

Permalink
1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kovacs committed Jun 3, 2021
1 parent b7ea2f0 commit 30e6968
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 1 deletion.
95 changes: 95 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@

# Created by https://www.toptal.com/developers/gitignore/api/phpstorm+all
# Edit at https://www.toptal.com/developers/gitignore?templates=phpstorm+all

### PhpStorm+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### PhpStorm+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360

.idea/

# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023

*.iml
modules.xml
.idea/misc.xml
*.ipr

# Sonarlint plugin
.idea/sonarlint

# End of https://www.toptal.com/developers/gitignore/api/phpstorm+all
/SpotifySilicon-darwin-arm64/
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,41 @@
spotify-silicon
### SpotifySilicon
For MacOS Big Sur (Apple M1)

Since the original spotify app keeps crashing on mac, I wrapped up the web player with an electron and turned it into M1 architecture.
The build also includes [widevine support](https://support.spotify.com/article/enable-the-spotify-web-player/) and is signed with [Castlab](https://github.com/castlabs/electron-releases) so you can play DRM-protected content without error.

## Download

The latest version of SpotifySilicon for macOS is available [here](https://github.com/progcode/spotify-silicon/releases).

**Currently only Macos 11.3+ supported**

## Features

- Fully supported online player
- Widevine

## Screenshots

<p align="center">
<img src="https://assets-github.s3.amazonaws.com/repo/progcode/img/Screenshot+2021-06-03+at+20.56.15.png" />
</p>

----------
> **v1.0.0 (build 100):**
> - First version
## Development
Build your own version with this command. You must sign your app: https://github.com/nativefier/nativefier/blob/master/CATALOG.md#spotify

```nativefier "nativefier "https://play.spotify.com" --inject ./build/assets/js/service-worker-fix.js --icon ./build/assets/icons/spotify-multi-size.icns -a arm64 --widevine --internal-urls ".*" --name="SpotifySilicon" --app-version 1.0.0 --build-version 100 --width 1440 --height 900 --min-width 1440 --min-height 900 --fast-quit --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" --disable-dev-tools"```
You can see available options [here](https://github.com/jiahaog/nativefier/blob/master/docs/api.md)

## License

MIT © [Iconocoders](https://iconocoders.com/license)

## Legal

This code is in no way affiliated with, authorised, maintained, sponsored or endorsed by Instagram or any of its affiliates or subsidiaries. This is an independent and unofficial Spotify app. Use it at your own risk.

Binary file added build/assets/icons/spotify-multi-size.icns
Binary file not shown.
45 changes: 45 additions & 0 deletions build/assets/js/service-worker-fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
function dontShowBrowserNoticePage() {
const browserNotice = document.getElementById('browser-support-notice');
console.log({ browserNotice })
if (browserNotice) {
// When Spotify displays the browser notice, it's not just the notice,
// but the entire page is focused on not allowing you to proceed.
// So in this case, we hide the body element (so nothing shows)
// until our JS deletes the service worker and reload (which will actually load the player)
document.getElementsByTagName('body')[0].style.display = 'none';
}
}

function reload() {
window.location.href = window.location.href;
}

function nukeWorkers() {
dontShowBrowserNoticePage();
if ('serviceWorker' in navigator) {
caches.keys().then(function (cacheNames) {
cacheNames.forEach(function (cacheName) {
console.debug('Deleting cache', cacheName);
caches.delete(cacheName);
});
});
navigator.serviceWorker.getRegistrations().then((registrations) => {
registrations.forEach((worker) =>
worker.unregister().then((u) => {
console.debug('Unregistered worker', worker);
reload();
}).catch((e) =>
console.error('Unable to unregister worker', error, { worker })
)
);
});
}
}

document.addEventListener('DOMContentLoaded', () => {
nukeWorkers()
});

if (document.readyState === "interactive") {
nukeWorkers();
}

0 comments on commit 30e6968

Please sign in to comment.