File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { Scrobble } from "./types/Scrobble";
33
44import type { AnyRecord } from "@inrixia/helpers" ;
55import { findModuleProperty , ftch } from "@luna/core" ;
6- import { clipboardWriteText } from "@luna/lib.native" ;
6+ import { openExternal } from "@luna/lib.native" ;
77import { storage } from "./Settings" ;
88import { hash } from "./hash.native" ;
99
@@ -79,8 +79,7 @@ export class LastFM {
7979 public static async authenticate ( ) {
8080 const { token } = await LastFM . sendRequest < { token : string } > ( "auth.getToken" ) ;
8181 const authUrl = `https://www.last.fm/api/auth/?api_key=${ this . apiKey } &token=${ token } ` ;
82- window . open ( authUrl , "_blank" ) ;
83- await clipboardWriteText ( authUrl ) ;
82+ await openExternal ( authUrl ) ;
8483 for ( let i = 0 ; i < 10 ; i ++ ) {
8584 const session = await this . sendRequest < { session : LastFmSession } > ( "auth.getSession" , { token } ) . catch ( ( ) => undefined ) ;
8685 if ( session !== undefined ) return session ;
You can’t perform that action at this time.
0 commit comments