Add a none option for the artworks in queue.

This commit is contained in:
Damiano Galassi committed 2019-09-14 10:19:09 +02:00
1 parent 154a56f6d4
commit fc04df2771
3 files changed
+17 -10

No files matched your search

@@ -25,6 +25,8 @@ public enum ArtworkType : Int, CustomStringConvertible {
return "backdrop"
case .iTunes:
return "iTunes"
case .none:
return NSLocalizedString("None", comment: "Queue metadata serach artwork type")
}
}
@@ -34,6 +36,7 @@ public enum ArtworkType : Int, CustomStringConvertible {
case episode
case backdrop
case iTunes
case none
}
public struct Artwork {
+2 -1
View File
@@ -260,7 +260,8 @@ class QueueMetadataAction : NSObject, QueueActionProtocol {
guard let metadata = searchMetadata(info: terms) else { return nil }
let artworks = metadata.remoteArtworks
if artworks.isEmpty == false {
if preferredArtwork != .none && artworks.isEmpty == false {
let artwork: Artwork? = {
let provider = terms.isMovie ? self.movieProvider : self.tvShowProvider
if let artwork = artworks.filter(by: preferredArtwork, service: provider) {