1
0

Optimise icon- and totp-handling.

This commit is contained in:
2021-08-20 02:40:19 +02:00
parent 15770bd7a8
commit bb408537e5
3 changed files with 45 additions and 29 deletions

View File

@@ -41,6 +41,16 @@ class OnepifEntry():
return []
return self.raw["openContents"]["tags"]
def get_totp(self):
if "sections" in self.raw["secureContents"]:
for section in self.raw["secureContents"]["sections"]:
if "fields" not in section:
continue
for field in section["fields"]:
if field["n"][:5] == "TOTP_":
return field["v"]
return None
def is_trash(self):
if "trashed" in self.raw:
return self.raw["trashed"]