forked from Blendman974/faceclaw
Use Spotify API if an API key is provided
This commit is contained in:
1 parent
f47d82b871
commit
49ea8a7d74
18 files changed
+736
-39
No files matched your search
@@ -3,6 +3,7 @@ import { downloadBinary } from "./binary-http.ios";
|
||||
import { grayImageFromPacket, PHOTO_TONE } from "./image-files";
|
||||
import { fromData, toData } from "./kotlin-data";
|
||||
import type { WebSignIn } from "./spotify-auth";
|
||||
import { SPOTIFY_IOS_BUNDLE_ID } from "./spotify-player";
|
||||
import { SpotifyService } from "./spotify-service";
|
||||
|
||||
declare const FaceclawAppleMusic: any;
|
||||
@@ -37,6 +38,7 @@ let service: SpotifyService | null = null;
|
||||
/** The Spotify service, created on first use (main thread only: it owns timers and the sign-in sheet). */
|
||||
export function spotifyService(): SpotifyService | null {
|
||||
service ??= new SpotifyService({
|
||||
packageName: SPOTIFY_IOS_BUNDLE_ID,
|
||||
fetch: (url, init) => fetchTextWithUserAgent(url, init),
|
||||
webSignIn,
|
||||
download: async (url) => {
|
||||
|
||||
Reference in new issue
Block a user