mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2091152 [Enhancement Request: Resolve doi.org links when pasting identifiers](https://bugs.launchpad.net/calibre/+bug/2091152)
This commit is contained in:
parent
8c02414d84
commit
6e13089def
@ -1808,6 +1808,18 @@ class IdentifiersEdit(QLineEdit, ToMetadataMixin, LineEditIndicators):
|
||||
return True
|
||||
except Exception:
|
||||
pass
|
||||
for (key, prefix) in (
|
||||
('doi', 'https://dx.doi.org/'),
|
||||
('doi', 'https://doi.org/'),
|
||||
('arxiv', 'https://arxiv.org/abs/'),
|
||||
('oclc', 'https://www.worldcat.org/oclc/'),
|
||||
('issn', 'https://www.worldcat.org/issn/'),
|
||||
):
|
||||
if text.startswith(prefix):
|
||||
vals = self.current_val
|
||||
vals[key] = text[len(prefix):].strip()
|
||||
self.current_val = vals
|
||||
return True
|
||||
|
||||
return False
|
||||
# }}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user