Collection.media.illegal() was renamed to Collection.media.hasIllegal() in Anki 2.0.12.
This commit is contained in:
parent
f210f728ea
commit
0311e25574
@ -174,8 +174,10 @@ class SyncMediaHandler(MediaSyncer):
|
|||||||
csum = checksum(data)
|
csum = checksum(data)
|
||||||
name = meta[i.filename]
|
name = meta[i.filename]
|
||||||
# can we store the file on this system?
|
# can we store the file on this system?
|
||||||
# TODO: this function changed it's name in Anki 2.0.12 to media.hasIllegal()
|
# NOTE: this function changed it's name in Anki 2.0.12 to media.hasIllegal()
|
||||||
if self.col.media.illegal(name):
|
if hasattr(self.col.media, 'illegal') and self.col.media.illegal(name):
|
||||||
|
continue
|
||||||
|
if hasattr(self.col.media, 'hasIllegal') and self.col.media.hasIllegal(name):
|
||||||
continue
|
continue
|
||||||
# save file
|
# save file
|
||||||
open(os.path.join(self.col.media.dir(), name), "wb").write(data)
|
open(os.path.join(self.col.media.dir(), name), "wb").write(data)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user