fixing more issues with audio
This commit is contained in:
parent
7d39517280
commit
f109f89d2f
@ -649,12 +649,13 @@ class AnkiConnect:
|
|||||||
if audio is not None and len(audio['fields']) > 0:
|
if audio is not None and len(audio['fields']) > 0:
|
||||||
try:
|
try:
|
||||||
data = self.download(audio['url'])
|
data = self.download(audio['url'])
|
||||||
if audio['skipHash'] is None:
|
skipHash = audio.get('skipHash')
|
||||||
|
if skipHash is None:
|
||||||
skip = False
|
skip = False
|
||||||
else:
|
else:
|
||||||
m = hashlib.md5()
|
m = hashlib.md5()
|
||||||
m.update(data)
|
m.update(data)
|
||||||
skip = audio['skipHash'] == m.hexdigest()
|
skip = skipHash == m.hexdigest()
|
||||||
|
|
||||||
if not skip:
|
if not skip:
|
||||||
for field in audio['fields']:
|
for field in audio['fields']:
|
||||||
|
Loading…
Reference in New Issue
Block a user