Skip to content

Commit

Permalink
some improvements to match the recent pr
Browse files Browse the repository at this point in the history
  • Loading branch information
whoeevee committed Dec 30, 2024
1 parent 85a002b commit e24cf6b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ struct GeniusLyricsRepository: LyricsRepository {

if !query.isEmpty {
let queryString = query.queryString

stringUrl += "?\(queryString)"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ struct LrcLibLyricsRepository: LyricsRepository {

if !query.isEmpty {
let queryString = query.queryString

stringUrl += "?\(queryString)"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)!)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit e24cf6b

Please sign in to comment.