mirror of
https://github.com/whoeevee/EeveeSpotifyReborn.git
synced 2026-01-09 00:23:20 +01:00
some improvements to match the recent pr
This commit is contained in:
@@ -27,7 +27,6 @@ struct GeniusLyricsRepository: LyricsRepository {
|
||||
|
||||
if !query.isEmpty {
|
||||
let queryString = query.queryString
|
||||
|
||||
stringUrl += "?\(queryString)"
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ struct LrcLibLyricsRepository: LyricsRepository {
|
||||
|
||||
if !query.isEmpty {
|
||||
let queryString = query.queryString
|
||||
|
||||
stringUrl += "?\(queryString)"
|
||||
}
|
||||
|
||||
|
||||
@@ -24,10 +24,7 @@ class MusixmatchLyricsRepository: LyricsRepository {
|
||||
finalQuery["usertoken"] = UserDefaults.musixmatchToken
|
||||
finalQuery["app_id"] = UIDevice.current.musixmatchAppId
|
||||
|
||||
let queryString = finalQuery.queryString.addingPercentEncoding(
|
||||
withAllowedCharacters: .urlHostAllowed
|
||||
)!
|
||||
|
||||
let queryString = finalQuery.queryString
|
||||
stringUrl += "?\(queryString)"
|
||||
|
||||
let request = URLRequest(url: URL(string: stringUrl)!)
|
||||
|
||||
@@ -22,9 +22,7 @@ struct PetitLyricsRepository: LyricsRepository {
|
||||
var request = URLRequest(url: URL(string: url)!)
|
||||
|
||||
request.httpMethod = "POST"
|
||||
request.httpBody = finalData.queryString.addingPercentEncoding(
|
||||
withAllowedCharacters: .urlHostAllowed
|
||||
)!.data(using: .utf8)
|
||||
request.httpBody = finalData.queryString.data(using: .utf8)
|
||||
|
||||
let semaphore = DispatchSemaphore(value: 0)
|
||||
var data: Data?
|
||||
|
||||
Reference in New Issue
Block a user