mirror of
https://github.com/danbee/persephone
synced 2025-03-04 08:39:11 +00:00
Couple of tweaks
This commit is contained in:
parent
ce5b0be2e1
commit
0147ffbfda
@ -52,24 +52,3 @@ class AlbumArtService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//getCachedArtwork
|
|
||||||
// .then {
|
|
||||||
// callback($0)
|
|
||||||
// }
|
|
||||||
// .catch {
|
|
||||||
// getFileSystemArtwork
|
|
||||||
// }
|
|
||||||
// .then {
|
|
||||||
// callback($0)
|
|
||||||
// }
|
|
||||||
// .catch {
|
|
||||||
// getRemoteArtwork
|
|
||||||
// }4
|
|
||||||
// .then {
|
|
||||||
// callback($0)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//// [() -> Promise<NSImage?>]
|
|
||||||
//// () -> Promise<NSImage>
|
|
||||||
|
|||||||
@ -36,9 +36,8 @@ extension AlbumArtService {
|
|||||||
}.compactMap {
|
}.compactMap {
|
||||||
$0["releases"][0]["id"].string
|
$0["releases"][0]["id"].string
|
||||||
}.compactMap {
|
}.compactMap {
|
||||||
URLComponents(string: "https://coverartarchive.org/release/\($0)/front-500")
|
URLComponents(string: "https://coverartarchive.org/release/\($0)/front-500")?.url
|
||||||
}.then { (urlComponents: URLComponents?) -> Promise<(data: Data, response: URLResponse)> in
|
}.then { (url: URL?) -> Promise<(data: Data, response: URLResponse)> in
|
||||||
let url = urlComponents!.url
|
|
||||||
return URLSession.shared.dataTask(.promise, with: url!).validate()
|
return URLSession.shared.dataTask(.promise, with: url!).validate()
|
||||||
}.compactMap {
|
}.compactMap {
|
||||||
NSImage(data: $0.data)?.toFitBox(
|
NSImage(data: $0.data)?.toFitBox(
|
||||||
|
|||||||
10
bin/release
Executable file
10
bin/release
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -o pipefail && \
|
||||||
|
|
||||||
|
xcodebuild \
|
||||||
|
-project Persephone.xcodeproj \
|
||||||
|
-scheme Persephone \
|
||||||
|
-destination platform\=macOS build \
|
||||||
|
-configuration Release \
|
||||||
|
| xcpretty
|
||||||
Loading…
Reference in New Issue
Block a user