mirror of
https://github.com/Wojtek242/qobuz-dl.git
synced 2024-11-22 11:05:25 +01:00
Tolerate missing fields from search results
This commit is contained in:
parent
1d9f5d9445
commit
0cc107d9c3
@ -28,6 +28,7 @@ class Search:
|
||||
self.Total.append("[RELEASE] {} - {} - {} [{}]".format(*items))
|
||||
self.appendInfo(i, True)
|
||||
except KeyError:
|
||||
try:
|
||||
items = (
|
||||
i["performer"]["name"],
|
||||
i["title"],
|
||||
@ -36,6 +37,14 @@ class Search:
|
||||
)
|
||||
self.Total.append("[TRACK] {} - {} - {} [{}]".format(*items))
|
||||
self.appendInfo(i, False)
|
||||
except KeyError:
|
||||
items = (
|
||||
i["title"],
|
||||
self.seconds(i["duration"]),
|
||||
"HI-RES" if i["hires"] else "Lossless",
|
||||
)
|
||||
self.Total.append("[TRACK] {} [{}]".format(*items))
|
||||
self.appendInfo(i, False)
|
||||
|
||||
def getResults(self, tracks=False):
|
||||
self.itResults(self.Albums)
|
||||
|
Loading…
Reference in New Issue
Block a user