mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 00:12:25 -04:00
always downcase media extensions, fix path on win32
This commit is contained in:
parent
e7be3e080c
commit
d027892c5c
2 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ mediaDeletedTable = Table(
|
|||
def mediaFilename(path):
|
||||
"Return checksum.ext for path"
|
||||
new = checksum(open(path, "rb").read())
|
||||
ext = os.path.splitext(path)[1]
|
||||
ext = os.path.splitext(path)[1].lower()
|
||||
return "%s%s" % (new, ext)
|
||||
|
||||
def copyToMedia(deck, path):
|
||||
|
|
|
@ -1074,7 +1074,7 @@ class BulkMediaSyncerProxy(HttpSyncServerProxy):
|
|||
return self.unstuff(self.runCmd("missingMedia"))
|
||||
|
||||
def _splitMedia(self, fname):
|
||||
return os.path.join(fname[0:1], fname[0:2], fname)
|
||||
return "%s/%s/%s" % (fname[0:1], fname[0:2], fname)
|
||||
|
||||
def _relativeMediaPath(self, fname):
|
||||
return "http://ankimedia.ichi2.net/%s" % (
|
||||
|
|
Loading…
Reference in a new issue