Skip to content

Commit 30e6968

Browse files
author
Daniel Kovacs
committed
1.0
1 parent b7ea2f0 commit 30e6968

File tree

4 files changed

+181
-1
lines changed

4 files changed

+181
-1
lines changed

.gitignore

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
2+
# Created by https://www.toptal.com/developers/gitignore/api/phpstorm+all
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=phpstorm+all
4+
5+
### PhpStorm+all ###
6+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
7+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8+
9+
# User-specific stuff
10+
.idea/**/workspace.xml
11+
.idea/**/tasks.xml
12+
.idea/**/usage.statistics.xml
13+
.idea/**/dictionaries
14+
.idea/**/shelf
15+
16+
# Generated files
17+
.idea/**/contentModel.xml
18+
19+
# Sensitive or high-churn files
20+
.idea/**/dataSources/
21+
.idea/**/dataSources.ids
22+
.idea/**/dataSources.local.xml
23+
.idea/**/sqlDataSources.xml
24+
.idea/**/dynamic.xml
25+
.idea/**/uiDesigner.xml
26+
.idea/**/dbnavigator.xml
27+
28+
# Gradle
29+
.idea/**/gradle.xml
30+
.idea/**/libraries
31+
32+
# Gradle and Maven with auto-import
33+
# When using Gradle or Maven with auto-import, you should exclude module files,
34+
# since they will be recreated, and may cause churn. Uncomment if using
35+
# auto-import.
36+
# .idea/artifacts
37+
# .idea/compiler.xml
38+
# .idea/jarRepositories.xml
39+
# .idea/modules.xml
40+
# .idea/*.iml
41+
# .idea/modules
42+
# *.iml
43+
# *.ipr
44+
45+
# CMake
46+
cmake-build-*/
47+
48+
# Mongo Explorer plugin
49+
.idea/**/mongoSettings.xml
50+
51+
# File-based project format
52+
*.iws
53+
54+
# IntelliJ
55+
out/
56+
57+
# mpeltonen/sbt-idea plugin
58+
.idea_modules/
59+
60+
# JIRA plugin
61+
atlassian-ide-plugin.xml
62+
63+
# Cursive Clojure plugin
64+
.idea/replstate.xml
65+
66+
# Crashlytics plugin (for Android Studio and IntelliJ)
67+
com_crashlytics_export_strings.xml
68+
crashlytics.properties
69+
crashlytics-build.properties
70+
fabric.properties
71+
72+
# Editor-based Rest Client
73+
.idea/httpRequests
74+
75+
# Android studio 3.1+ serialized cache file
76+
.idea/caches/build_file_checksums.ser
77+
78+
### PhpStorm+all Patch ###
79+
# Ignores the whole .idea folder and all .iml files
80+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
81+
82+
.idea/
83+
84+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
85+
86+
*.iml
87+
modules.xml
88+
.idea/misc.xml
89+
*.ipr
90+
91+
# Sonarlint plugin
92+
.idea/sonarlint
93+
94+
# End of https://www.toptal.com/developers/gitignore/api/phpstorm+all
95+
/SpotifySilicon-darwin-arm64/

README.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,41 @@
1-
spotify-silicon
1+
### SpotifySilicon
2+
For MacOS Big Sur (Apple M1)
3+
4+
Since the original spotify app keeps crashing on mac, I wrapped up the web player with an electron and turned it into M1 architecture.
5+
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.
6+
7+
## Download
8+
9+
The latest version of SpotifySilicon for macOS is available [here](https://github.com/progcode/spotify-silicon/releases).
10+
11+
**Currently only Macos 11.3+ supported**
12+
13+
## Features
14+
15+
- Fully supported online player
16+
- Widevine
17+
18+
## Screenshots
19+
20+
<p align="center">
21+
<img src="https://assets-github.s3.amazonaws.com/repo/progcode/img/Screenshot+2021-06-03+at+20.56.15.png" />
22+
</p>
23+
24+
----------
25+
> **v1.0.0 (build 100):**
26+
> - First version
27+
28+
## Development
29+
Build your own version with this command. You must sign your app: https://github.com/nativefier/nativefier/blob/master/CATALOG.md#spotify
30+
31+
```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"```
32+
You can see available options [here](https://github.com/jiahaog/nativefier/blob/master/docs/api.md)
33+
34+
## License
35+
36+
MIT © [Iconocoders](https://iconocoders.com/license)
37+
38+
## Legal
39+
40+
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.
41+
81.3 KB
Binary file not shown.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
function dontShowBrowserNoticePage() {
2+
const browserNotice = document.getElementById('browser-support-notice');
3+
console.log({ browserNotice })
4+
if (browserNotice) {
5+
// When Spotify displays the browser notice, it's not just the notice,
6+
// but the entire page is focused on not allowing you to proceed.
7+
// So in this case, we hide the body element (so nothing shows)
8+
// until our JS deletes the service worker and reload (which will actually load the player)
9+
document.getElementsByTagName('body')[0].style.display = 'none';
10+
}
11+
}
12+
13+
function reload() {
14+
window.location.href = window.location.href;
15+
}
16+
17+
function nukeWorkers() {
18+
dontShowBrowserNoticePage();
19+
if ('serviceWorker' in navigator) {
20+
caches.keys().then(function (cacheNames) {
21+
cacheNames.forEach(function (cacheName) {
22+
console.debug('Deleting cache', cacheName);
23+
caches.delete(cacheName);
24+
});
25+
});
26+
navigator.serviceWorker.getRegistrations().then((registrations) => {
27+
registrations.forEach((worker) =>
28+
worker.unregister().then((u) => {
29+
console.debug('Unregistered worker', worker);
30+
reload();
31+
}).catch((e) =>
32+
console.error('Unable to unregister worker', error, { worker })
33+
)
34+
);
35+
});
36+
}
37+
}
38+
39+
document.addEventListener('DOMContentLoaded', () => {
40+
nukeWorkers()
41+
});
42+
43+
if (document.readyState === "interactive") {
44+
nukeWorkers();
45+
}

0 commit comments

Comments
 (0)