mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
remove obsolete func
This commit is contained in:
parent
49df458409
commit
36f5fd0e4c
2 changed files with 2 additions and 16 deletions
|
@ -283,6 +283,8 @@ insert or ignore into revlog values (?,?,?,?,?,?,?,?,?)""", revlog)
|
||||||
# Media
|
# Media
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
# note: this func only applies to imports of .anki2. for .apkg files, the
|
||||||
|
# apkg importer does the copying
|
||||||
def _importStaticMedia(self):
|
def _importStaticMedia(self):
|
||||||
# Import any '_foo' prefixed media files regardless of whether
|
# Import any '_foo' prefixed media files regardless of whether
|
||||||
# they're used on notes or not
|
# they're used on notes or not
|
||||||
|
|
|
@ -194,22 +194,6 @@ If the same name exists, compare checksums."""
|
||||||
|
|
||||||
# Copying on import
|
# Copying on import
|
||||||
##########################################################################
|
##########################################################################
|
||||||
# FIXME: check if the files are actually identical, and rewrite references
|
|
||||||
# if necessary
|
|
||||||
|
|
||||||
def copyTo(self, rdir):
|
|
||||||
"Copy media to RDIR. Return number of files copied."
|
|
||||||
ldir = self.dir()
|
|
||||||
if not os.path.exists(ldir):
|
|
||||||
return 0
|
|
||||||
cnt = 0
|
|
||||||
for f in os.listdir(ldir):
|
|
||||||
src = os.path.join(ldir, f)
|
|
||||||
dst = os.path.join(rdir, f)
|
|
||||||
if not os.path.exists(dst):
|
|
||||||
shutil.copyfile(src, dst)
|
|
||||||
cnt += 1
|
|
||||||
return cnt
|
|
||||||
|
|
||||||
def have(self, fname):
|
def have(self, fname):
|
||||||
return os.path.exists(os.path.join(self.dir(), fname))
|
return os.path.exists(os.path.join(self.dir(), fname))
|
||||||
|
|
Loading…
Reference in a new issue