Skip to content

Commit

Permalink
Remove downloadTrackRaw
Browse files Browse the repository at this point in the history
  • Loading branch information
reloni committed Jun 24, 2019
1 parent e993bcd commit 0e18ae3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions RxGoogleMusic/GMusicClient/GMusicClient+Requests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,9 @@ public extension GMusicClient {
}

func downloadTrack(_ track: GMusicTrack) -> Single<Data> {
return downloadTrackRaw(track, byteRange: nil)
.map { $0.0 }
}

func downloadTrackRaw(_ track: GMusicTrack, byteRange: ClosedRange<Int>?) -> Single<(Data, HTTPURLResponse)> {
return gMusicRequest(.download(trackId: track.identifier ?? "", quality: .high, range: byteRange))
return gMusicRequest(.download(trackId: track.identifier ?? "", quality: .high, range: nil))
|> apiRequest
>>> singleMap { ($0.data, $0.response) }
>>> singleMap { $0.data }
}

func createDownloadRequest(for track: GMusicTrack, byteRange: ClosedRange<Int>?) -> Single<URLRequest> {
Expand Down

0 comments on commit 0e18ae3

Please sign in to comment.