mirror of
https://github.com/a2-4am/passport.py.git
synced 2024-06-08 21:29:30 +00:00
keys are case-sensitive, don't lowercase them
This commit is contained in:
parent
86ca60775e
commit
862b58b492
|
@ -1,6 +1,9 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
from passport import *
|
from passport import eddimage, wozimage
|
||||||
|
from passport import DefaultLogger, DebugLogger
|
||||||
|
from passport import Crack, Verify, EDDToWoz
|
||||||
|
import os.path
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
def usage(error_code):
|
def usage(error_code):
|
||||||
|
@ -32,7 +35,7 @@ ext = ext.lower()
|
||||||
if ext == ".woz":
|
if ext == ".woz":
|
||||||
reader = wozimage.WozReader
|
reader = wozimage.WozReader
|
||||||
elif ext == ".edd":
|
elif ext == ".edd":
|
||||||
reader = wozimage.EDDReader
|
reader = eddimage.EDDReader
|
||||||
else:
|
else:
|
||||||
print("unrecognized file type")
|
print("unrecognized file type")
|
||||||
usage(1)
|
usage(1)
|
||||||
|
|
|
@ -441,17 +441,15 @@ class CommandEdit(BaseCommand):
|
||||||
output = WozWriter(self.woz_image.info.get("creator", __displayname__))
|
output = WozWriter(self.woz_image.info.get("creator", __displayname__))
|
||||||
output.tmap = self.woz_image.tmap
|
output.tmap = self.woz_image.tmap
|
||||||
output.tracks = self.woz_image.tracks
|
output.tracks = self.woz_image.tracks
|
||||||
output.info = self.woz_image.info
|
output.info = self.woz_image.info.copy()
|
||||||
output.meta = self.woz_image.meta
|
output.meta = self.woz_image.meta.copy()
|
||||||
# add all new info fields
|
# add all new info fields
|
||||||
for i in args.info or ():
|
for i in args.info or ():
|
||||||
k, v = i.split(":", 1)
|
k, v = i.split(":", 1)
|
||||||
k = k.lower()
|
|
||||||
output.info[k] = v
|
output.info[k] = v
|
||||||
# add all new metadata fields
|
# add all new metadata fields
|
||||||
for m in args.meta or ():
|
for m in args.meta or ():
|
||||||
k, v = m.split(":", 1)
|
k, v = m.split(":", 1)
|
||||||
k = k.lower()
|
|
||||||
v = v.split("|")
|
v = v.split("|")
|
||||||
if len(v) == 1:
|
if len(v) == 1:
|
||||||
v = v[0]
|
v = v[0]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user