Improve tv shows names suggestions.

This commit is contained in:
Damiano Galassi committed 2018-10-22 11:27:42 +02:00
1 parent 95e9c2c81d
commit 36d40f88a9
5 files changed
+40 -22

No files matched your search

+6 -2
View File
@@ -8,7 +8,7 @@
import Foundation
import MP42Foundation
public struct TheTVDB : MetadataService, MetadataNameService {
public struct TheTVDB : MetadataService {
private let session = TheTVDBService.sharedInstance
private static let bannerPath = "https://thetvdb.com/banners/"
@@ -46,7 +46,11 @@ public struct TheTVDB : MetadataService, MetadataNameService {
results.formUnion(englishResults)
}
return Array(results)
if results.isEmpty {
return TheMovieDB().search(tvShow: tvShow, language: language)
} else {
return Array(results)
}
}
// MARK: - TV Series ID search