mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #802288 (ISBN ID not recognized when not lower case)
This commit is contained in:
parent
fc02b538f5
commit
d3a93c500b
@ -1092,11 +1092,12 @@ class IdentifiersEdit(QLineEdit): # {{{
|
|||||||
for x in parts:
|
for x in parts:
|
||||||
c = x.split(':')
|
c = x.split(':')
|
||||||
if len(c) > 1:
|
if len(c) > 1:
|
||||||
if c[0] == 'isbn':
|
itype = c[0].lower()
|
||||||
|
if itype == 'isbn':
|
||||||
v = check_isbn(c[1])
|
v = check_isbn(c[1])
|
||||||
if v is not None:
|
if v is not None:
|
||||||
c[1] = v
|
c[1] = v
|
||||||
ans[c[0]] = c[1]
|
ans[itype] = c[1]
|
||||||
return ans
|
return ans
|
||||||
def fset(self, val):
|
def fset(self, val):
|
||||||
if not val:
|
if not val:
|
||||||
@ -1112,7 +1113,7 @@ class IdentifiersEdit(QLineEdit): # {{{
|
|||||||
if v is not None:
|
if v is not None:
|
||||||
val[k] = v
|
val[k] = v
|
||||||
ids = sorted(val.iteritems(), key=keygen)
|
ids = sorted(val.iteritems(), key=keygen)
|
||||||
txt = ', '.join(['%s:%s'%(k, v) for k, v in ids])
|
txt = ', '.join(['%s:%s'%(k.lower(), v) for k, v in ids])
|
||||||
self.setText(txt.strip())
|
self.setText(txt.strip())
|
||||||
self.setCursorPosition(0)
|
self.setCursorPosition(0)
|
||||||
return property(fget=fget, fset=fset)
|
return property(fget=fget, fset=fset)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user